1

Is it possible to change textColor in ListView without defining custom adapter for it? As in TextView we can apply style = "@style/mystyle" in which we can define textcolor.

    <ListView
    android:id="@+id/listview" 
    style="@style/WhiteText"
    />

In values, the style is defined as:

    <resources>
    <style name= "WhiteText">
    <item name ="android:textColor">#FFFFFF </item>
    <item name="android:background">#000000 </item>
    </resources>

I tried it but it's not giving me desired output. So I want to ask, is it a valid way or not?

Stern Bravo
  • 25
  • 1
  • 4

1 Answers1

0

might be possible with to define the style for the ListView and set the Text color for that.

See below SO Answer:

First

Second

Hope it will help you. If any query then let me know.

Community
  • 1
  • 1
Shreyash Mahajan
  • 23,386
  • 35
  • 116
  • 188