Styling an Indexer section

Has anyone found a way to style the widget that appears when using SectionIndexer? Style changes, such as a change in text color or background color.

+3
source share
2 answers

Found the answer here

You need to create a theme and apply it to the action.

+3
source

I found the answer here:

https://gist.github.com/DHuckaby/d6b1d9c8e7f9d70c39de

public class CustomListView extends ListView {

    public CustomListView(Context context, AttributeSet attrs) {
        super(new ContextThemeWrapper(context, R.style.CustomListView), attrs);
    }
}

styles.xml

<resources>
    <style name="CustomListView" parent="@style/GlobalTheme">
        <item name="android:textColorPrimary">?android:textColorPrimaryInverse</item>
    </style>
</resources>
+1
source

All Articles