diff options
author | John Reck <jreck@google.com> | 2012-05-23 14:40:19 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2012-05-23 14:40:19 -0700 |
commit | 0f9aaebdf2b1fbf230cf497598c684d7cff66653 (patch) | |
tree | 87f6481b05394c58d1313031a016c32d8b69f112 /src | |
parent | af58d393e3c62a946ffd434e857819521dc01a28 (diff) | |
download | packages_apps_Browser-0f9aaebdf2b1fbf230cf497598c684d7cff66653.zip packages_apps_Browser-0f9aaebdf2b1fbf230cf497598c684d7cff66653.tar.gz packages_apps_Browser-0f9aaebdf2b1fbf230cf497598c684d7cff66653.tar.bz2 |
Disable fixed title bar in quick controls
Bug: 6546959
Change-Id: I7511497869ddf7b5107d73c378b88a6363d08ce6
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/browser/TitleBar.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/com/android/browser/TitleBar.java b/src/com/android/browser/TitleBar.java index 9b2a947..ffe5553 100644 --- a/src/com/android/browser/TitleBar.java +++ b/src/com/android/browser/TitleBar.java @@ -67,7 +67,7 @@ public class TitleBar extends RelativeLayout { mBaseUi = ui; mContentView = contentView; initLayout(context); - setFixedTitleBar(!mContext.getResources().getBoolean(R.bool.hide_title)); + setFixedTitleBar(); } private void initLayout(Context context) { @@ -101,7 +101,7 @@ public class TitleBar extends RelativeLayout { @Override protected void onConfigurationChanged(Configuration config) { super.onConfigurationChanged(config); - setFixedTitleBar(!mContext.getResources().getBoolean(R.bool.hide_title)); + setFixedTitleBar(); } @Override @@ -110,10 +110,14 @@ public class TitleBar extends RelativeLayout { if (mIsFixedTitleBar) { int margin = getMeasuredHeight() - calculateEmbeddedHeight(); mBaseUi.setContentViewMarginTop(-margin); + } else { + mBaseUi.setContentViewMarginTop(0); } } - private void setFixedTitleBar(boolean isFixed) { + private void setFixedTitleBar() { + boolean isFixed = !mUseQuickControls + && !mContext.getResources().getBoolean(R.bool.hide_title); // If getParent() returns null, we are initializing ViewGroup parent = (ViewGroup)getParent(); if (mIsFixedTitleBar == isFixed && parent != null) return; @@ -142,6 +146,7 @@ public class TitleBar extends RelativeLayout { public void setUseQuickControls(boolean use) { mUseQuickControls = use; + setFixedTitleBar(); if (use) { this.setVisibility(View.GONE); } else { |