Android set listItem background colour from String Array

后端 未结 3 1141
故里飘歌
故里飘歌 2021-01-24 05:37

Does anyone know how to programatically set the background of a list item from a String Array? I have two string arrays one is the title for the text view and the other contain

3条回答
  •  悲&欢浪女
    2021-01-24 06:12

    You can use a custom array adapter. Extend ArrayAdapter and override getView to return a textview with background color according to the parameter position.

提交回复
热议问题