Your content must have a ListView whose id attribute is 'android.R.id.list'

后端 未结 7 1611
清歌不尽
清歌不尽 2020-11-22 04:07

I have created an xml file like this:




        
7条回答
  •  梦谈多话
    2020-11-22 04:39

    Rename the id of your ListView like this,

    
    

    Since you are using ListActivity your xml file must specify the keyword android while mentioning to a ID.

    If you need a custom ListView then instead of Extending a ListActivity, you have to simply extend an Activity and should have the same id without the keyword android.

提交回复
热议问题