How to clean listitem data in ListActivity when using extends BroadcastReceiver
Anyway to clean listitem data inside ListActivity and then show data using  setListAdapter(adapter) ? The problem is it continuously appends listitem data inside ListActivity and show many listitem data. I used android.widget.SimpleAdapter for adapter. I want to clean data and then show data.
class Receiver extends BroadcastReceiver {   
        public void onReceive(Context c, Intent intent){
             adapter.notifyDataSetChanged()开发者_如何学Go;
              ........
            }   
            setListAdapter(adapter);  
        }   
    }   
you should use
adapter.notifyDataSetChanged();
http://developer.android.com/reference/android/widget/BaseAdapter.html#notifyDataSetChanged()
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论