Exception dispatching input event
<p>I am trying to do list view. My app is working in first tme opening but after backs to main menu it is not working again and giving the error on emulator "unfortunately app is stopped".</p>

<p>Here is my main.</p>

<pre><code>    public class ListMyJob extends Activity {
ItemListBaseAdapter adapter;                 //////after answers ı added.
public void onBackPressed() {                //////after answers ı added.
                                             //////after answers ı added.
  adapter.notifyDataSetChanged();            //////after answers ı added.

}                                            //////after answers ı added.


ArrayList&lt;ItemDetails&gt; jobs = new ArrayList&lt;ItemDetails&gt;();{   /////////////some list data /////////////////////}

@Override
public void onCreate(Bundle savedInstanceState) {


    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);


    ArrayList&lt;ItemDetails&gt; image_details = jobs;




    final ListView lv1 = (ListView) findViewById(R.id.listV_main);
    lv1.setAdapter(new ItemListBaseAdapter(this, image_details));
    lv1.setOnItemClickListener(new OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView&lt;?&gt; a, View v, int position, long id) { 
            Object o = lv1.getItemAtPosition(position);
            ItemDetails obj_itemDetails = (ItemDetails)o;
            Toast.makeText(ListMyJob.this, "You have chosen : " + " " + obj_itemDetails.getName(), Toast.LENGTH_LONG).show();
            Intent intObj = new Intent(ListMyJob.this,ListMyExercises.class);  /////modified

            intObj.putExtra("description",obj_itemDetails.getItemDescription());
            intObj.putExtra("name",obj_itemDetails.getName());
            intObj.putExtra("imagenumber",obj_itemDetails.getImageNumber());
            intObj.putExtra("videonumber", obj_itemDetails.getVideoNumber());



            ItemDetailsWrapper wrapper = new ItemDetailsWrapper(obj_itemDetails.getChild());
            intObj.putExtra("exerciselist", wrapper); // i.putExtra("obj", new ItemDetailsWrapper(list));

            startActivity(intObj);

        }  
    });
}
</code></pre>

<p>}</p>

<p>I am getting these errors on the logcat.</p>

<pre><code>        04-24 09:31:44.596: E/InputEventReceiver(2170): Exception dispatching input event.
        04-24 09:31:44.596: E/MessageQueue-JNI(2170): Exception in MessageQueue callback: handleReceiveCallback
        04-24 09:31:44.676: E/MessageQueue-JNI(2170): java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. [in ListView(2131099660, class android.widget.ListView) with Adapter(class com.jsupport.HealthyMe.ItemListBaseAdapter)]
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.widget.ListView.layoutChildren(ListView.java:1544)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.widget.AbsListView.onTouchEvent(AbsListView.java:3403)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.View.dispatchTouchEvent(View.java:7246)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2168)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1903)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2174)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2174)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2174)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2174)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1953)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1405)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.app.Activity.dispatchTouchEvent(Activity.java:2410)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1901)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.View.dispatchPointerEvent(View.java:7426)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3220)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3165)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4292)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4271)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4363)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:179)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.os.MessageQueue.nativePollOnce(Native Method)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.os.MessageQueue.next(MessageQueue.java:125)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.os.Looper.loop(Looper.java:124)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at android.app.ActivityThread.main(ActivityThread.java:5041)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at java.lang.reflect.Method.invokeNative(Native Method)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at java.lang.reflect.Method.invoke(Method.java:511)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
        04-24 09:31:44.676: E/MessageQueue-JNI(2170):   at dalvik.system.NativeStart.main(Native Method)
        04-24 09:31:44.676: D/AndroidRuntime(2170): Shutting down VM
        04-24 09:31:44.676: W/dalvikvm(2170): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
        04-24 09:31:44.716: E/AndroidRuntime(2170): FATAL EXCEPTION: main
        04-24 09:31:44.716: E/AndroidRuntime(2170): java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. [in ListView(2131099660, class android.widget.ListView) with Adapter(class com.jsupport.HealthyMe.ItemListBaseAdapter)]
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.widget.ListView.layoutChildren(ListView.java:1544)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.widget.AbsListView.onTouchEvent(AbsListView.java:3403)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.View.dispatchTouchEvent(View.java:7246)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2168)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1903)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2174)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2174)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2174)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2174)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1953)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1405)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.app.Activity.dispatchTouchEvent(Activity.java:2410)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1901)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.View.dispatchPointerEvent(View.java:7426)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3220)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3165)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4292)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4271)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4363)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:179)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.os.MessageQueue.nativePollOnce(Native Method)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.os.MessageQueue.next(MessageQueue.java:125)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.os.Looper.loop(Looper.java:124)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at android.app.ActivityThread.main(ActivityThread.java:5041)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at java.lang.reflect.Method.invokeNative(Native Method)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at java.lang.reflect.Method.invoke(Method.java:511)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
        04-24 09:31:44.716: E/AndroidRuntime(2170):     at dalvik.system.NativeStart.main(Native Method)
        04-24 09:36:44.811: I/Process(2170): Sending signal. PID: 2170 SIG: 9
</code></pre>
