summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2011-04-07 17:23:06 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-04-07 17:23:06 -0700
commit50d84e11c0be0c40e411eeba1d2d52b9b13fa0fa (patch)
treedc53e31a7799fd293a283e74ea8eaa1592f2d46b
parent5c708046f9bb743a5ef54650616ee2f9d11450fd (diff)
parent7c6cbc2c917bd8c1dacaf44585fbaeb7f722e16a (diff)
downloadpackages_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.java7
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);
}