android change listview font and color

后端 未结 5 1677
轮回少年
轮回少年 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:22

    you need to create a custom adapter.

    check this answer

    and then have a custom xml too.

    
    
    
    
    

    then set the custom adapter to your listview.

    listAdapter = new CustomListAdapter(YourActivity.this , R.layout.custom_list , mList);
    mListView.setAdapter(listAdapter);
    

提交回复
热议问题