[Android] ListView tips

1. 为了避免出现异常:

  java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification.....

 更新数据之前getListView().setVisibility(View.GONE),然后mAllAdapter.notifyDataSetChanged(),更新之后getListView().setVisibility(View.GONE),可以避免

posted on 2012-04-02 14:10  leaving  阅读(188)  评论(0编辑  收藏  举报