bug:the content of the adapter have changed but ListView do not receive a notification.
This address: Http://blog.csdn.net/caroline_wendy
error log:
Java.lang.IllegalStateException:The content of the adapter have changed but ListView do not receive a notification. Make sure the content of your adapter are not modified from a background thread, but only from the UI thread. Make sure your adapter calls notifydatasetchanged () while its content changes. [In the ListView (2131494123, Class Me.chunyu.ChunyuDoctor.Widget.RefreshableListView) with Adapter (class Android.widget.HeaderViewListAdapter)] at Android.widget.ListView.layoutChildren (listview.java:1566) at Android.wi Dget. Abslistview.ontouchmodechanged (abslistview.java:3580) at Android.view.ViewTreeObserver.dispatchOnTouchModeChanged (viewtreeobserver.java:879) at Android.view.ViewRootImpl.ensureTouchModeLocally (viewrootimpl.java:3543) at android.view.viewrootimpl.access$400 (viewrootimpl.java:111) at Android.view.viewrootimpl$viewroothandler.handlemessage (ViewRootImpl.java:3274) at Android Oid.os.Handler.dispatchMessage (handler.java:102) at Android.os.Looper.loop(looper.java:135) at Android.app.ActivityThread.main (activitythread.java:5505) at Java.lang.reflect.Method.invoke ( Native Method) at Java.lang.reflect.Method.invoke (method.java:372) at Com.android.internal.os.zygoteinit$methodand Argscaller.run (zygoteinit.java:948) at Com.android.internal.os.ZygoteInit.main (zygoteinit.java:743)
Solution:Replacement: refreshablelistfragment-remotedatalist2fragmentinclude:doclistbyexpertiseactivity, Addregdochomeactivity, familydocmsglistactivity,thankdoctoractivity, Addreglistactivity, familydochomeactivity, FragmentWraperActivity2;
Location:when the refresh bar is stopped, the data for the ListView is updated to synchronize.
@Override public void onscrollstatechanged (Abslistview abslistview, int i) { mscrollstatus = i; if (Mscrollstatus = = AbsListView.OnScrollListener.SCROLL_STATE_IDLE) { getlistview (). Setonscrolllistener ( Getdefaultscrolllistener ()); Mhandler.post (New Runnable () { @Override public void Run () { Refreshlistview (Mloadingmore, (list<? >) data.getdata ()); } );} }
can be.
Android-bug:the content of the adapter have changed but ListView do not receive a notification.