Use getDimensionPixelSize for reading divider height
am: 301061d
* commit '301061d5655864f03f9bab0a28f7c3f2e28a0a04':
Use getDimensionPixelSize for reading divider height
diff --git a/v14/preference/src/android/support/v14/preference/PreferenceFragment.java b/v14/preference/src/android/support/v14/preference/PreferenceFragment.java
index d52fa19..52552a6 100644
--- a/v14/preference/src/android/support/v14/preference/PreferenceFragment.java
+++ b/v14/preference/src/android/support/v14/preference/PreferenceFragment.java
@@ -251,8 +251,8 @@
mLayoutResId = a.getResourceId(R.styleable.PreferenceFragment_android_layout, mLayoutResId);
final Drawable divider = a.getDrawable(R.styleable.PreferenceFragment_android_divider);
- final int dividerHeight = a.getInt(R.styleable.PreferenceFragment_android_dividerHeight,
- -1);
+ final int dividerHeight = a.getDimensionPixelSize(
+ R.styleable.PreferenceFragment_android_dividerHeight, -1);
a.recycle();
diff --git a/v7/preference/src/android/support/v7/preference/PreferenceFragmentCompat.java b/v7/preference/src/android/support/v7/preference/PreferenceFragmentCompat.java
index 8fa150f..549d9be 100644
--- a/v7/preference/src/android/support/v7/preference/PreferenceFragmentCompat.java
+++ b/v7/preference/src/android/support/v7/preference/PreferenceFragmentCompat.java
@@ -242,7 +242,7 @@
final Drawable divider = a.getDrawable(
R.styleable.PreferenceFragmentCompat_android_divider);
- final int dividerHeight = a.getInt(
+ final int dividerHeight = a.getDimensionPixelSize(
R.styleable.PreferenceFragmentCompat_android_dividerHeight, -1);
a.recycle();