How to change text color of simple list item

后端 未结 12 2128
清酒与你
清酒与你 2020-11-27 04:12

I have an ListActivity and i am displaying one list with:

setListAdapter(new ArrayAdapter(getApplicationContext(),
                android.R.la         


        
12条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-27 04:43

    If you want to keep all the style but change few details, you can use the default style defined on the Android and change what you want

    
    

    Then set the adapter using:

    setListAdapter(new ArrayAdapter(getApplicationContext(),
                R.layout.list_item_custom, mStringList));
    

    Source: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/res/res/layout/simple_list_item_activated_1.xml

提交回复
热议问题