开发者

Styling the sectionIndexer

开发者 https://www.devze.com 2023-02-16 17:38 出处:网络
Has anyone found a way to style the widget that appears when SectionIndexer is used? Styling changes such as changing开发者_开发百科 the text color or the background color.Found the answer here

Has anyone found a way to style the widget that appears when SectionIndexer is used? Styling changes such as changing开发者_开发百科 the text color or the background color.


Found the answer here

You have to create a theme and apply it to an activity


i've found an 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>
0

精彩评论

暂无评论...
验证码 换一张
取 消