diff options
author | Michael Kolb <kolby@google.com> | 2011-04-07 17:23:06 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-04-07 17:23:06 -0700 |
commit | 50d84e11c0be0c40e411eeba1d2d52b9b13fa0fa (patch) | |
tree | dc53e31a7799fd293a283e74ea8eaa1592f2d46b | |
parent | 5c708046f9bb743a5ef54650616ee2f9d11450fd (diff) | |
parent | 7c6cbc2c917bd8c1dacaf44585fbaeb7f722e16a (diff) | |
download | packages_apps_Browser-50d84e11c0be0c40e411eeba1d2d52b9b13fa0fa.zip packages_apps_Browser-50d84e11c0be0c40e411eeba1d2d52b9b13fa0fa.tar.gz packages_apps_Browser-50d84e11c0be0c40e411eeba1d2d52b9b13fa0fa.tar.bz2 |
am 7c6cbc2c: DO NOT MERGE fix focus bug
* commit '7c6cbc2c917bd8c1dacaf44585fbaeb7f722e16a':
DO NOT MERGE fix focus bug
-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); } |