summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-04-17 10:00:00 -0700
committerYorke Lee <yorkelee@google.com>2014-04-17 10:01:00 -0700
commit55783c0e91f12de9cd30af335abd80e477280fce (patch)
tree7acfb42b52bd27d721294b824456dcb0de48ba66
parenteea6a884c719f4926ed7e2f4d47ce7d18df81b48 (diff)
Correctly resolve textSize attribute in ViewPagerTabs
Change-Id: I46c40d14f39c1d87992a0e624f14a3c8c6255ebb
-rw-r--r--src/com/android/dialer/list/ViewPagerTabs.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/dialer/list/ViewPagerTabs.java b/src/com/android/dialer/list/ViewPagerTabs.java
index 030ddcb53..af6bdfe65 100644
--- a/src/com/android/dialer/list/ViewPagerTabs.java
+++ b/src/com/android/dialer/list/ViewPagerTabs.java
@@ -40,9 +40,10 @@ public class ViewPagerTabs extends HorizontalScrollView implements ViewPager.OnP
private static final int TAB_SIDE_PADDING_IN_DPS = 10;
+ // TODO: This should use <declare-styleable> in the future
private static final int[] ATTRS = new int[] {
- android.R.attr.textStyle,
android.R.attr.textSize,
+ android.R.attr.textStyle,
android.R.attr.textColor,
android.R.attr.textAllCaps
};
@@ -94,8 +95,8 @@ public class ViewPagerTabs extends HorizontalScrollView implements ViewPager.OnP
mSidePadding = (int) (getResources().getDisplayMetrics().density * TAB_SIDE_PADDING_IN_DPS);
final TypedArray a = context.obtainStyledAttributes(attrs, ATTRS);
- mTextStyle = a.getInt(0, 0);
- mTextSize = a.getDimensionPixelSize(1, 0);
+ mTextSize = a.getDimensionPixelSize(0, 0);
+ mTextStyle = a.getInt(1, 0);
mTextColor = a.getColorStateList(2);
mTextAllCaps = a.getBoolean(3, false);