Here is my adapter
lv = (ListView)findViewById(R.id.vlist);
adapter = new TestAdapter(context, R.id.vlist, data); 
lv.setAdapter(adapter);
I popular data in an AsyncTask class. So where is the best place I should call:
adapter.notifyDataSetChanged();
I think I will pass adapter as a parameter into AsyncTask instance and call data changed in onPostExecute. Is it t开发者_如何转开发he best practice?
If you are only showing your list at the end call notifyDataSetChanged() in onPostExecute().
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论