summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/TabScrollView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/browser/TabScrollView.java')
-rw-r--r--src/com/android/browser/TabScrollView.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/browser/TabScrollView.java b/src/com/android/browser/TabScrollView.java
index d0648b7..f43d6d6 100644
--- a/src/com/android/browser/TabScrollView.java
+++ b/src/com/android/browser/TabScrollView.java
@@ -16,6 +16,8 @@
package com.android.browser;
+import com.android.browser.TabBar.TabView;
+
import android.animation.ObjectAnimator;
import android.content.Context;
import android.util.AttributeSet;
@@ -85,6 +87,16 @@ public class TabScrollView extends HorizontalScrollView {
ensureChildVisible(getSelectedTab());
}
+ // in case of a configuration change, adjust tab width
+ protected void updateLayout() {
+ final int count = mContentView.getChildCount();
+ for (int i = 0; i < count; i++) {
+ final TabView tv = (TabView) mContentView.getChildAt(i);
+ tv.updateLayoutParams();
+ }
+ ensureChildVisible(getSelectedTab());
+ }
+
void setSelectedTab(int position) {
View v = getSelectedTab();
if (v != null) {