getActivity().runOnUiThread(new Runnable(){
public void run() {//No.1
ShowDataScreen();
getActivity().runOnUiThread(new Runnable(){
public void run() {//No.2
Toast.makeText(getActivity(), "This is error way",Toast.LENGTH_SHORT).show();
}});// end of No.2 UI new thread
}});// end of No.1 UI new thread
我的解决方案重新安排如下:
getActivity().runOnUiThread(new Runnable(){
public void run() {//No.1
ShowDataScreen();
}});// end of No.1 UI new thread
getActivity().runOnUiThread(new Runnable(){
public void run() {//No.2
Toast.makeText(getActivity(), "This is correct way",Toast.LENGTH_SHORT).show();
}});// end of No.2 UI new thread