ListFragment does not accept my layout

前端 未结 10 1390
情歌与酒
情歌与酒 2020-12-01 02:09

According to this link: ListFragment android developers

I want to set my custom layout for list, but it makes exceptions.

Here is the code:

p         


        
10条回答
  •  囚心锁ツ
    2020-12-01 03:07

    Another solution that worked for me as well is just to put this line

    
    

    instead of your list view.

    You are able to build your own content on top of it or surround it with some other views. For example, here is how my layout looks like:

    
    
    
    
        
    
        
    
    
    
    
    
        
    
    
    

提交回复
热议问题