Tuesday, 15 September 2015

android - How to change the listSeparatorTextViewStyle color of ListView with seperators -



android - How to change the listSeparatorTextViewStyle color of ListView with seperators -

i have list view seperators, header using xml:

<textview xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/list_header_title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingtop="2dip" android:paddingbottom="2dip" android:paddingleft="5dip" android:textsize="20sp" style="?android:attr/listseparatortextviewstyle" />

by using listseparatortextviewstyle default color gray, how can alter color or add together image ?

you'll need create own style.

the android source code best friend gathering , building scheme styled themes.

follow path source code you've downloaded via android sdk manager

platforms/android-19/data/res/values

you'll find within styles.xml:

for dark theme:

<style name="widget.holo.textview.listseparator" parent="widget.textview.listseparator"> <item name="android:background">@android:drawable/list_section_divider_holo_dark</item> <item name="android:textallcaps">true</item> </style>

for lite theme

<style name="widget.holo.light.textview.listseparator" parent="widget.textview.listseparator"> <item name="android:background">@android:drawable/list_section_divider_holo_light</item> <item name="android:textallcaps">true</item> </style>

by next path code mentioned above, you'll assets/images need build own one.

android listview

No comments:

Post a Comment