summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-04-17 17:01:55 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-04-17 17:01:55 +0000
commitf653040adb93cafdd8f9cd4fdfa5f69ed0b1f77d (patch)
tree2a9a786b5a027ac9a58a34d219061ab6849add5d
parent6979f4ca1ec9d953581763d919bede2dc5a33346 (diff)
parent55783c0e91f12de9cd30af335abd80e477280fce (diff)
Merge "Correctly resolve textSize attribute in ViewPagerTabs"
-rw-r--r--src/com/android/dialer/list/ViewPagerTabs.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/dialer/list/ViewPagerTabs.java b/src/com/android/dialer/list/ViewPagerTabs.java
index 8019f7616..7e6c78061 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);
@@ -173,4 +174,4 @@ public class ViewPagerTabs extends HorizontalScrollView implements ViewPager.OnP
@Override
public void onPageScrollStateChanged(int state) {
}
-} \ No newline at end of file
+}