android using setlistadapter() without extending listactivity

前端 未结 1 1531
一生所求
一生所求 2020-12-21 08:00

lots of searching and reading has not provided the answer to this problem. my activity does not extend ListActivity so this line throws an error. setListAdapter(fileList);

相关标签:
1条回答
  • 2020-12-21 08:53

    Obtain the reference of your ListView using findViewById(int). Then call the method ListView.setAdapter(ListAdapter) on that reference with your adapter as the parameter.

    0 讨论(0)
提交回复
热议问题