Reason:
After triggering the return button to jump to the main screen of the ListView, the data to reload, at this time to load the data, it will start the activity when the program automatically loaded, and handler inside the main thread is written, will be executed, so add later
/**
* Process message (main thread), update adapter, if processing in thread may error
* */
Handler = new Handler () {
@Override
public void Handlemessage (Message msg) {
Switch (msg.what) {
Case Util.download_start:
Progressdialog.show ();
Progressdialog.setmessage (Msg.getdata (). Get ("text")
. toString ());
Toast.maketext (Checkorderactivity.this, Util.currentmessage,
Toast.length_long). Show ();
Break
Case Util.download_end:
Progressdialog.dismiss ();
Break
Case UTIL.DOWNLOAD_OK:
threadcontinue=false;//End Thread
Toast.maketext (Checkorderactivity.this, Util.currentmessage,
Toast.length_long). Show ();
Setdatatoui ();
Progressdialog.dismiss ();
Break
Case UTIL.DOWNLOAD_ERROR:
Progressdialog.dismiss ();
Toast.maketext (Checkorderactivity.this, "No billing Information", Toast.length_long)
. Show ();
Break
Case Util.download_disconnect:
Progressdialog.dismiss ();
Alertdialog.builder builder = new Builder (checkorderactivity.this);
Builder.setmessage ("Not connected on network!");
Builder.settitle ("hint");
Builder.setpositivebutton ("Confirm",
New Dialoginterface.onclicklistener () {
@Override
public void OnClick (Dialoginterface dialog,
int which) {
Dialog.dismiss ();
}
});
Builder.create (). Show ();
Break
}
Super.handlemessage (msg);//method that executes the parent class
}
};
adapter = new Myadapterr (checkorderactivity.this, FieldList);
Search ();//Request data to service
}
can be successfully resolved.
This article is from the "New Start" blog, so be sure to keep this source http://10042542.blog.51cto.com/10032542/1686204
ListView after clicking on the item to go to the detailed page returns the ListView data does not display the problem