diff options
author | Michael Kolb <kolby@google.com> | 2011-04-07 16:40:34 -0700 |
---|---|---|
committer | Michael Kolb <kolby@google.com> | 2011-04-07 17:11:58 -0700 |
commit | 7c6cbc2c917bd8c1dacaf44585fbaeb7f722e16a (patch) | |
tree | dc53e31a7799fd293a283e74ea8eaa1592f2d46b /src/com/android/browser/TitleBarBase.java | |
parent | 6fa84baa33181c46098f9a493e78cd9d9a353542 (diff) | |
download | packages_apps_Browser-7c6cbc2c917bd8c1dacaf44585fbaeb7f722e16a.zip packages_apps_Browser-7c6cbc2c917bd8c1dacaf44585fbaeb7f722e16a.tar.gz packages_apps_Browser-7c6cbc2c917bd8c1dacaf44585fbaeb7f722e16a.tar.bz2 |
DO NOT MERGE fix focus bug
Bug: 4262017
adjust layout parameters to avoid scrolling while
typing
Change-Id: I54c21f8097a1fe43083902f72c35e43aa66166c9
Diffstat (limited to 'src/com/android/browser/TitleBarBase.java')
-rw-r--r-- | src/com/android/browser/TitleBarBase.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/browser/TitleBarBase.java b/src/com/android/browser/TitleBarBase.java index 46136db..601d35f 100644 --- a/src/com/android/browser/TitleBarBase.java +++ b/src/com/android/browser/TitleBarBase.java @@ -96,8 +96,12 @@ public class TitleBarBase extends LinearLayout implements UrlInputListener { void setTitleGravity(int gravity) { int newTop = 0; + int newLeft = 0; + View parent = (View) getParent(); + if (parent != null) { + newLeft = parent.getScrollX(); + } if (gravity != Gravity.NO_GRAVITY) { - View parent = (View) getParent(); if (parent != null) { if (gravity == Gravity.TOP) { newTop = parent.getScrollY(); @@ -108,6 +112,7 @@ public class TitleBarBase extends LinearLayout implements UrlInputListener { } AbsoluteLayout.LayoutParams lp = (AbsoluteLayout.LayoutParams) getLayoutParams(); if (lp != null) { + lp.x = newLeft; lp.y = newTop; setLayoutParams(lp); } |