Fix bug #15115542 Ripple effect is crashing Settings with java.lang.NullPointerException

- for having the tint attribute to be populated you need to have the Theme passed.
This is why Fragment.getActivity().getDrawable(...) should be used instead of
Fragment.getResources().getDrawable(...)

Change-Id: I945eca98e1d73fda3b290a6ababfd1fb41118d8f
This commit is contained in:
Fabrice Di Meglio
2014-05-21 13:58:46 -07:00
parent a5e1d3037f
commit 676751ebbd

View File

@@ -144,7 +144,7 @@ public class SettingsPreferenceFragment extends PreferenceFragment implements Di
} }
private Drawable getHighlightDrawable() { private Drawable getHighlightDrawable() {
return getResources().getDrawable(R.drawable.preference_highlight); return getActivity().getDrawable(R.drawable.preference_highlight);
} }
/** /**