0

In Android 5 (Lollipop) the colorPrimaryDark is used for the overscroll color in listviews. Now I want to change it everywhere. I found a way to set for a single ListView, but the PreferenceFragment has no external layout for editing. How can I set the overscroll color for every ListView in my whole app?

mars3142
  • 2,501
  • 4
  • 28
  • 58

1 Answers1

0

for your preference fragment, get a reference to the listview in your onCreateView(...) and call setOverscrollFooter and setOverscrollHeader

    final ListView lv = (ListView) v.findViewById(android.R.id.list);
    lv.setOverscrollFooter(someDrawable);
    lv.setOverscrollHeader(someDrawable);

As for everywhere else, and the new colorPrimaryDark to your application styles.

petey
  • 16,914
  • 6
  • 65
  • 97