android change listview font and color

后端 未结 5 1699
轮回少年
轮回少年 2020-12-07 02:40

I\'ve found loads of different ways of accomplishing this but I\'m not sure what\'s the best for my scenario.

This is my Java code for the listview:

         


        
5条回答
  •  长情又很酷
    2020-12-07 03:35

    Simply, instead of using the inbuild xml file in the SKD

    `ArrayAdapter ad=new ArrayAdapter(GuestActivity.this,android.R.layout.simple_list_item_1,list);`
    

    Make your own xml layout file like this-

    ``
    

    and use that in the adapter.

    Sample Image:

    Formatted List Item

提交回复
热议问题