Fix issues in Autohide TitleBar
- Fixes issue when longpress of TitleBar
shows copy/paste menu on top of titleBar.
- Fixes issue in landscape mode where the
setTranslationY value is reused from portrait
mode.
Change-Id: I521b4dd7a5385c621c941487f77894a3dcef42d3
diff --git a/src/com/android/browser/TitleBar.java b/src/com/android/browser/TitleBar.java
index 9963bc4..78f2d0e 100644
--- a/src/com/android/browser/TitleBar.java
+++ b/src/com/android/browser/TitleBar.java
@@ -102,9 +102,7 @@
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
- boolean hide_title_on_scroll =
- getContext().getResources().getBoolean(R.bool.hide_title_on_scroll);
- if (mIsFixedTitleBar && !hide_title_on_scroll) {
+ if (mIsFixedTitleBar) {
int margin = getMeasuredHeight() - calculateEmbeddedHeight();
if (!isEditingUrl())
mBaseUi.setContentViewMarginTop(-margin);