diff options
author | Vivek Sekhar <vsekhar@codeaurora.org> | 2014-07-14 12:32:05 -0700 |
---|---|---|
committer | Vivek Sekhar <vsekhar@codeaurora.org> | 2014-07-30 12:17:20 -0700 |
commit | 8ee3abb117407cce038ab20a2d1b0b39e50c29c0 (patch) | |
tree | e2c54a747bfc7a47c27d1d1690e7aec9b069e6a7 /src/com/android/browser/TitleBar.java | |
parent | 4dfc9854e67028c2b5e110279decd61fc823ab84 (diff) | |
download | android_packages_apps_Gello-8ee3abb117407cce038ab20a2d1b0b39e50c29c0.tar.gz android_packages_apps_Gello-8ee3abb117407cce038ab20a2d1b0b39e50c29c0.tar.bz2 android_packages_apps_Gello-8ee3abb117407cce038ab20a2d1b0b39e50c29c0.zip |
Auto hide URL bar.
- Implement URLbar hide on onOffsetsForFullscreenChanged
notiication from the engine.
-Reverted
"Fix for disappearing title bar caused by copy/paste control"
Change-Id: I19860bd9356b2dc392539aa1e16819545e32de6d"
Change-Id: Ie8547e9a7ca7dfc892a94c5632a7fddddef58cc3
Diffstat (limited to 'src/com/android/browser/TitleBar.java')
-rw-r--r-- | src/com/android/browser/TitleBar.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/browser/TitleBar.java b/src/com/android/browser/TitleBar.java index 7438d26b..9963bc4d 100644 --- a/src/com/android/browser/TitleBar.java +++ b/src/com/android/browser/TitleBar.java @@ -102,7 +102,9 @@ public class TitleBar extends RelativeLayout { @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); - if (mIsFixedTitleBar) { + boolean hide_title_on_scroll = + getContext().getResources().getBoolean(R.bool.hide_title_on_scroll); + if (mIsFixedTitleBar && !hide_title_on_scroll) { int margin = getMeasuredHeight() - calculateEmbeddedHeight(); if (!isEditingUrl()) mBaseUi.setContentViewMarginTop(-margin); @@ -114,6 +116,8 @@ public class TitleBar extends RelativeLayout { private void setFixedTitleBar() { boolean isFixed = !mUseQuickControls && !getContext().getResources().getBoolean(R.bool.hide_title); + boolean hide_title_on_scroll = + getContext().getResources().getBoolean(R.bool.hide_title_on_scroll); isFixed |= mAccessibilityManager.isEnabled(); // If getParent() returns null, we are initializing ViewGroup parent = (ViewGroup)getParent(); @@ -125,7 +129,7 @@ public class TitleBar extends RelativeLayout { if (parent != null) { parent.removeView(this); } - if (mIsFixedTitleBar) { + if (mIsFixedTitleBar && !hide_title_on_scroll) { mBaseUi.addFixedTitleBar(this); } else { mContentView.addView(this, makeLayoutParams()); |