diff options
author | Michael Kolb <kolby@google.com> | 2011-09-23 16:01:32 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-09-23 16:01:32 -0700 |
commit | ce16fbf9f9e7afdc02f696fbdccc4f54bf09a8da (patch) | |
tree | d8f703b9b10f64df9bb78da4f327abdfa16491cc | |
parent | 5bd9f4c2d4749b4b2c867440666e66b73d704319 (diff) | |
parent | 7a321d68bab6653752bb7a9dece7945eb6294140 (diff) | |
download | packages_apps_Browser-ce16fbf9f9e7afdc02f696fbdccc4f54bf09a8da.zip packages_apps_Browser-ce16fbf9f9e7afdc02f696fbdccc4f54bf09a8da.tar.gz packages_apps_Browser-ce16fbf9f9e7afdc02f696fbdccc4f54bf09a8da.tar.bz2 |
Merge "Fix tab switcher in animation"
-rw-r--r-- | res/layout/nav_tab_view.xml | 2 | ||||
-rw-r--r-- | res/values/dimensions.xml | 1 | ||||
-rw-r--r-- | src/com/android/browser/PhoneUi.java | 3 |
3 files changed, 4 insertions, 2 deletions
diff --git a/res/layout/nav_tab_view.xml b/res/layout/nav_tab_view.xml index 82541a4..d1205f0 100644 --- a/res/layout/nav_tab_view.xml +++ b/res/layout/nav_tab_view.xml @@ -26,7 +26,7 @@ android:id="@+id/titlebar" android:orientation="horizontal" android:layout_width="match_parent" - android:layout_height="32dip" + android:layout_height="@dimen/nav_tab_titleheight" android:layout_gravity="center_horizontal" android:paddingLeft="8dip" > <TextView diff --git a/res/values/dimensions.xml b/res/values/dimensions.xml index 5652451..8844f6b 100644 --- a/res/values/dimensions.xml +++ b/res/values/dimensions.xml @@ -69,6 +69,7 @@ <dimen name="tab_thumbnail_height">160dip</dimen> <dimen name="nav_tab_width">240dip</dimen> <dimen name="nav_tab_height">160dip</dimen> + <dimen name="nav_tab_titleheight">32dip</dimen> <dimen name="nav_tab_text_normal">18sp</dimen> <dimen name="nav_tab_text_small">14sp</dimen> <dimen name="suggest_item_padding">8dp</dimen> diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java index 4772ff1..25a7d4a 100644 --- a/src/com/android/browser/PhoneUi.java +++ b/src/com/android/browser/PhoneUi.java @@ -297,8 +297,9 @@ public class PhoneUi extends BaseUi { int fromBottom = mContentView.getHeight(); int width = mActivity.getResources().getDimensionPixelSize(R.dimen.nav_tab_width); int height = mActivity.getResources().getDimensionPixelSize(R.dimen.nav_tab_height); + int ntth = mActivity.getResources().getDimensionPixelSize(R.dimen.nav_tab_titleheight); int toLeft = (mContentView.getWidth() - width) / 2; - int toTop = ((fromBottom - (fromTop + height)) / 2 + fromTop); + int toTop = ((fromBottom - (ntth + height)) / 2 + ntth); int toRight = toLeft + width; int toBottom = toTop + height; float scaleFactor = width / (float) mContentView.getWidth(); |