am 7c6cbc2c: DO NOT MERGE fix focus bug
* commit '7c6cbc2c917bd8c1dacaf44585fbaeb7f722e16a':
DO NOT MERGE fix focus bug
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 @@
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 @@
}
AbsoluteLayout.LayoutParams lp = (AbsoluteLayout.LayoutParams) getLayoutParams();
if (lp != null) {
+ lp.x = newLeft;
lp.y = newTop;
setLayoutParams(lp);
}