summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-05-23 14:55:28 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-05-23 14:55:28 -0700
commit0409ff5ea04e0bfe556cde5ff0c46e4786509616 (patch)
treeac243332b9ce77c3f7516f59d8ec92ac5b2bd316 /src
parent7e7fefa95c8be07fe2bd295f44ceb2156748970c (diff)
parentc90effdedc1c38eabc2c731d5a55c17f881862b1 (diff)
downloadpackages_apps_Browser-0409ff5ea04e0bfe556cde5ff0c46e4786509616.zip
packages_apps_Browser-0409ff5ea04e0bfe556cde5ff0c46e4786509616.tar.gz
packages_apps_Browser-0409ff5ea04e0bfe556cde5ff0c46e4786509616.tar.bz2
am c90effde: Merge "Disable fixed title bar in quick controls" into jb-dev
* commit 'c90effdedc1c38eabc2c731d5a55c17f881862b1': Disable fixed title bar in quick controls
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 {