From 67f3363c1fa95aa06b6a90e1f07ad950e4e22a3a Mon Sep 17 00:00:00 2001 From: John Reck Date: Fri, 17 Jun 2011 16:23:42 -0700 Subject: Omnibox improvements Bug: 4603029 Reduce padding on phone Full width on phone Fix focus-stealing bug on phone Change-Id: I4498f239a03fa7c2d55da4d72058b79c27992ae3 --- src/com/android/browser/TitleBarPhone.java | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/com/android/browser/TitleBarPhone.java b/src/com/android/browser/TitleBarPhone.java index 75b9fb7..de5fb7f 100644 --- a/src/com/android/browser/TitleBarPhone.java +++ b/src/com/android/browser/TitleBarPhone.java @@ -72,6 +72,7 @@ public class TitleBarPhone extends TitleBarBase implements OnFocusChangeListener mStopDrawable = res.getDrawable(R.drawable.ic_stop_holo_dark); mRefreshDrawable = res.getDrawable(R.drawable.ic_refresh_holo_dark); setUaSwitcher(mFavicon); + mUrlInput.setContainer(this); } @Override @@ -110,16 +111,6 @@ public class TitleBarPhone extends TitleBarBase implements OnFocusChangeListener } @Override - protected void onProgressStarted() { - setFocusState(mUrlInput.hasFocus()); - } - - @Override - protected void onProgressStopped() { - setFocusState(mUrlInput.hasFocus()); - } - - @Override void setProgress(int progress) { super.setProgress(progress); if (progress == 100) { @@ -137,13 +128,15 @@ public class TitleBarPhone extends TitleBarBase implements OnFocusChangeListener */ @Override void setDisplayTitle(String title) { - if (title == null) { - mUrlInput.setText(R.string.new_tab); - } else { - mUrlInput.setText(title); + if (!isEditingUrl()) { + if (title == null) { + mUrlInput.setText(R.string.new_tab); + } else { + mUrlInput.setText(title); + } + mUrlInput.setSelection(0); + updateNavigationState(); } - mUrlInput.setSelection(0); - updateNavigationState(); } @Override -- cgit v1.1