diff options
author | Vivek Sekhar <vsekhar@codeaurora.org> | 2014-10-22 17:03:42 -0700 |
---|---|---|
committer | Vivek Sekhar <vsekhar@codeaurora.org> | 2014-10-23 11:14:07 -0700 |
commit | 3bec6a3b7fe6dd30e9dd2a2065ffca19ff6af542 (patch) | |
tree | b9a75dba5245a4ee39ccc0d5163e9f93acd57a30 /src/com/android/browser/TabBar.java | |
parent | 46c3ec0fec8a2fc53619cead8dae5edbae2a6f3a (diff) | |
download | android_packages_apps_Gello-3bec6a3b7fe6dd30e9dd2a2065ffca19ff6af542.tar.gz android_packages_apps_Gello-3bec6a3b7fe6dd30e9dd2a2065ffca19ff6af542.tar.bz2 android_packages_apps_Gello-3bec6a3b7fe6dd30e9dd2a2065ffca19ff6af542.zip |
Remove quick controls
Change-Id: I0fa64f0fcd800db0c8d5c91dcbbcc265f4d8eb48
Diffstat (limited to 'src/com/android/browser/TabBar.java')
-rw-r--r-- | src/com/android/browser/TabBar.java | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/src/com/android/browser/TabBar.java b/src/com/android/browser/TabBar.java index 4078ba42..a4e039dc 100644 --- a/src/com/android/browser/TabBar.java +++ b/src/com/android/browser/TabBar.java @@ -86,7 +86,6 @@ public class TabBar extends LinearLayout implements OnClickListener { private int mTabOverlap; private int mAddTabOverlap; private int mTabSliceWidth; - private boolean mUseQuickControls; public TabBar(Activity activity, UiController controller, XLargeUi ui) { super(activity); @@ -135,12 +134,6 @@ public class TabBar extends LinearLayout implements OnClickListener { mTabs.updateLayout(); } - void setUseQuickControls(boolean useQuickControls) { - mUseQuickControls = useQuickControls; - mNewTab.setVisibility(mUseQuickControls ? View.GONE - : View.VISIBLE); - } - int getTabCount() { return mTabMap.size(); } @@ -160,9 +153,7 @@ public class TabBar extends LinearLayout implements OnClickListener { super.onMeasure(hspec, vspec); int w = getMeasuredWidth(); // adjust for new tab overlap - if (!mUseQuickControls) { - w -= mAddTabOverlap; - } + w -= mAddTabOverlap; setMeasuredDimension(w, getMeasuredHeight()); } @@ -173,35 +164,22 @@ public class TabBar extends LinearLayout implements OnClickListener { int pt = getPaddingTop(); int sw = mTabs.getMeasuredWidth(); int w = right - left - pl; - if (mUseQuickControls) { - mButtonWidth = 0; - } else { - mButtonWidth = mNewTab.getMeasuredWidth() - mAddTabOverlap; - if (w-sw < mButtonWidth) { - sw = w - mButtonWidth; - } + mButtonWidth = mNewTab.getMeasuredWidth() - mAddTabOverlap; + if (w-sw < mButtonWidth) { + sw = w - mButtonWidth; } mTabs.layout(pl, pt, pl + sw, bottom - top); // adjust for overlap - if (!mUseQuickControls) { - mNewTab.layout(pl + sw - mAddTabOverlap, pt, - pl + sw + mButtonWidth - mAddTabOverlap, bottom - top); - } + mNewTab.layout(pl + sw - mAddTabOverlap, pt, + pl + sw + mButtonWidth - mAddTabOverlap, bottom - top); + } public void onClick(View view) { if (mNewTab == view) { mUiController.openTabToHomePage(); } else if (mTabs.getSelectedTab() == view) { - if (mUseQuickControls) { - if (mUi.isTitleBarShowing() && !isLoading()) { - mUi.stopEditingUrl(); - mUi.hideTitleBar(); - } else { - mUi.stopWebViewScrolling(); - mUi.editUrl(false, false); - } - } else if (mUi.isTitleBarShowing() && !isLoading()) { + if (mUi.isTitleBarShowing() && !isLoading()) { mUi.stopEditingUrl(); mUi.hideTitleBar(); } else { |