FastScrolling时如何自定义Alpha-Indexer

时间:2014-06-12 05:23:18

标签: android listview android-listview sectionindexer

我使用ListView进行AlphaIndexer SectionIndexer实施。我想知道如果有任何方式可以自定义快速滚动时显示的Aplha-Indexer框,即更改其颜色,背景,文本字体/颜色等。如:

enter image description here

被修改 或者,当此框与FastScroll Thumb. like:

相邻时

enter image description here

1 个答案:

答案 0 :(得分:4)

如果您在应用程序中使用Theme并参考res/val/style及其变体styles-v11styles-v14。那么您肯定可以实现自定义{{ 1}}。

将这些属性添加到您的父fastscroll indexer属性中的styles-v11styles-v14

Theme

此处正在使用<style name="Theme.Zname" parent="@style/Theme.Sherlock.Light"> <item name="android:fastScrollPreviewBackgroundLeft">@drawable/_ics_fastscroll_label_left</item> <item name="android:fastScrollPreviewBackgroundRight">@drawable/_ics_fastscroll_label_right</item> </style> ,因此附加的样式ActionBarSherlockfastScrollPreviewBackgroundLeftfastScrollPreviewBackgroundRight一起使用。

将这些放在API >11

_ics_fastscroll_label_left