Multicolumn ListView Android

后端 未结 3 1669
小鲜肉
小鲜肉 2021-01-03 15:46

i am creating a leaderboard, highscore list for my application. I want to display the data in 4 columns, Rank, Name, Creator, Score and populate them accordingly by a list o

3条回答
  •  情书的邮戳
    2021-01-03 16:23

    You can easily done it with defining Custom ListView.

    For defining custom listview, just define a custom row layout file with 4 textview in horizontal manner. Now inflating this layout file inside the custom adapter of listview, for that you need to override getView() method and inflate that row layout file.

    Update: Just check this tutorial to define custom listview, but make sure you use this tutorial by defining a custom row layout file with 4 horizontal textview.

    Here is the row_layout.xml file:

    
    
        
        
    
        
        
    
        
        
    
        
        
    
    

提交回复
热议问题