summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-05-23 14:50:56 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-05-23 14:50:56 -0700
commitc90effdedc1c38eabc2c731d5a55c17f881862b1 (patch)
tree1016fffab58febbbc46b4016641d59e554ec91df /src
parente7699eaafc4d70af2ad55c6badffd090712019a2 (diff)
parent0f9aaebdf2b1fbf230cf497598c684d7cff66653 (diff)
downloadpackages_apps_Browser-c90effdedc1c38eabc2c731d5a55c17f881862b1.zip
packages_apps_Browser-c90effdedc1c38eabc2c731d5a55c17f881862b1.tar.gz
packages_apps_Browser-c90effdedc1c38eabc2c731d5a55c17f881862b1.tar.bz2
Merge "Disable fixed title bar in quick controls" into jb-dev
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/TitleBar.java11
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 {