diff options
author | John Reck <jreck@google.com> | 2011-07-07 15:38:43 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-07-11 17:13:11 -0700 |
commit | 0f602f3933dcd88702fdb514b6611e3066ca7a2b (patch) | |
tree | e60b25ca74f692980972a9c11227750579ee661d /src/com/android/browser/XLargeUi.java | |
parent | 017ffabc8af29b0cf14fecc6aad4a61acb8373a2 (diff) | |
download | packages_apps_Browser-0f602f3933dcd88702fdb514b6611e3066ca7a2b.zip packages_apps_Browser-0f602f3933dcd88702fdb514b6611e3066ca7a2b.tar.gz packages_apps_Browser-0f602f3933dcd88702fdb514b6611e3066ca7a2b.tar.bz2 |
TitleBar refactor
Change-Id: I0a2df041529143c8e0ff17af341376a3f827be04
Diffstat (limited to 'src/com/android/browser/XLargeUi.java')
-rw-r--r-- | src/com/android/browser/XLargeUi.java | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/src/com/android/browser/XLargeUi.java b/src/com/android/browser/XLargeUi.java index 290bbf7..a868331 100644 --- a/src/com/android/browser/XLargeUi.java +++ b/src/com/android/browser/XLargeUi.java @@ -40,7 +40,7 @@ public class XLargeUi extends BaseUi { private ActionBar mActionBar; private TabBar mTabBar; - private TitleBarXLarge mTitleBar; + private NavigationBarTablet mNavBar; private PieControlXLarge mPieControl; private Handler mHandler; @@ -52,9 +52,7 @@ public class XLargeUi extends BaseUi { public XLargeUi(Activity browser, UiController controller) { super(browser, controller); mHandler = new Handler(); - mTitleBar = new TitleBarXLarge(mActivity, mUiController, this, - mContentView); - mTitleBar.setProgress(100); + mNavBar = (NavigationBarTablet) mTitleBar.getNavigationBar(); mTabBar = new TabBar(mActivity, mUiController, this); mActionBar = mActivity.getActionBar(); setupActionBar(); @@ -129,7 +127,7 @@ public class XLargeUi extends BaseUi { public void onResume() { super.onResume(); if (!BrowserSettings.getInstance().useInstantSearch()) { - mTitleBar.clearCompletions(); + mNavBar.clearCompletions(); } } @@ -187,7 +185,7 @@ public class XLargeUi extends BaseUi { mPieControl.forceToTop(mContentView); } else { // check if title bar is already attached by animation - if (mTitleBar.getParent() == null && !tab.isSnapshot()) { + if (mTitleBar.getParent() == null) { view.setEmbeddedTitleBar(mTitleBar); } } @@ -231,13 +229,13 @@ public class XLargeUi extends BaseUi { @Override public void editUrl(boolean clearInput) { if (mUseQuickControls) { - getTitleBar().setShowProgressOnly(false); + mTitleBar.setShowProgressOnly(false); } super.editUrl(clearInput); } void stopEditingUrl() { - mTitleBar.stopEditingUrl(); + mTitleBar.getNavigationBar().stopEditingUrl(); } @Override @@ -255,11 +253,6 @@ public class XLargeUi extends BaseUi { } @Override - protected TitleBarBase getTitleBar() { - return mTitleBar; - } - - @Override protected void setTitleGravity(int gravity) { if (!mUseQuickControls) { super.setTitleGravity(gravity); @@ -291,7 +284,7 @@ public class XLargeUi extends BaseUi { @Override protected void updateNavigationState(Tab tab) { - mTitleBar.updateNavigationState(tab); + mNavBar.updateNavigationState(tab); } @Override @@ -308,19 +301,6 @@ public class XLargeUi extends BaseUi { } @Override - public void showVoiceTitleBar(String title, List<String> vsresults) { - mTitleBar.setInVoiceMode(true, vsresults); - mTitleBar.setDisplayTitle(title); - } - - @Override - public void revertVoiceTitleBar(Tab tab) { - mTitleBar.setInVoiceMode(false, null); - String url = tab.getUrl(); - mTitleBar.setDisplayTitle(url); - } - - @Override public void showCustomView(View view, int requestedOrientation, CustomViewCallback callback) { super.showCustomView(view, requestedOrientation, callback); |