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:
@@ -144,7 +144,7 @@ public class SettingsPreferenceFragment extends PreferenceFragment implements Di
|
||||
}
|
||||
|
||||
private Drawable getHighlightDrawable() {
|
||||
return getResources().getDrawable(R.drawable.preference_highlight);
|
||||
return getActivity().getDrawable(R.drawable.preference_highlight);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user