diff options
author | John Reck <jreck@google.com> | 2011-06-17 16:23:42 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-06-17 16:23:42 -0700 |
commit | 67f3363c1fa95aa06b6a90e1f07ad950e4e22a3a (patch) | |
tree | 7186bd66f29ef58a6e37f278d7a92a10aeed908b /src | |
parent | b3fb20e6dfa8778846af067b67006c685e30acd6 (diff) | |
download | packages_apps_Browser-67f3363c1fa95aa06b6a90e1f07ad950e4e22a3a.zip packages_apps_Browser-67f3363c1fa95aa06b6a90e1f07ad950e4e22a3a.tar.gz packages_apps_Browser-67f3363c1fa95aa06b6a90e1f07ad950e4e22a3a.tar.bz2 |
Omnibox improvements
Bug: 4603029
Reduce padding on phone
Full width on phone
Fix focus-stealing bug on phone
Change-Id: I4498f239a03fa7c2d55da4d72058b79c27992ae3
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/browser/TitleBarPhone.java | 25 |
1 files changed, 9 insertions, 16 deletions
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 |