开发者

OnFinishInflate inside ListActivity

开发者 https://www.devze.com 2022-12-15 22:02 出处:网络
I have a main class filled with a cursor adapter: public class MainMenu extends ListActivity{ ... private void updateData(){

I have a main class filled with a cursor adapter:

public class MainMenu extends ListActivity{ 
... 
private void updateData(){ 
... 
SimpleAdapter notes = new SimpleAdapter(this, array, R.layout.row_task, from, to); setListAdapter(not开发者_开发知识库es); 
} 
}

I need to know when this list has finnished to inflate it, so I've discovered this methods:

ListView.onFinishInflate()...

But I have no idea how to override it inside my code.

Any idea?


You'll need your own View that will extend ListView. And than you can override whatever you want. Note: Method is not specific to the ListView it's inherited from View. But since you'll need functionality of the ListView you'll need to extend ListView.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号