Here using the Bmob save method to add data, and the location of the error log display is not in this Toast this line, but in an activity on the initialization of the layout of
The line of the setContentView method, which a great god knows the problem, the trouble to help, river's lake emergency!
Case R.i d.f aBu_anLiu:
On ThreadPools. GetInstance (FaBuActivity. This). The execute (new Runnable () {
@ Override
Public void the run () {
LeiRong=miaoShu. GetText (). The toString ();
PhoneNumber=number. GetText (). The toString ();
If (I==1) {
System. The out. Println (" 36 ");
//Toast. MakeText (FaBuActivity. This, "36", Toast. LENGTH_LONG), show ();
} else {
Informatica Informatica=new Informatica ();
Informatica. SetLeiBie (leiBie);
Informatica. SetXuanXiang (xuanXiang);
Informatica. SetLieRong (leiRong);
Informatica. SetPhoneNumber (phoneNumber);
Informatica. Save (new SaveListener
@ Override
Public void done (String s, BmobException e) {
If (e==null) {
Toast. MakeText (FaBuActivity. This "release" success, Toast. LENGTH_LONG), show ();
} else {
Toast. MakeText (FaBuActivity. This "release failure", Toast. LENGTH_LONG), show ();
}
}
});
}
}
});
break;
CodePudding user response:
Within the child thread using Toast the need to create a stars!
New Thread (new Runnable () {
@ Override
Public void the run () {
Looper.prepare();
Toast. MakeText (TwoActivity. This, "the child thread shows", Toast. LENGTH_SHORT), show ();
Looper.loop();
}
}).start();
CodePudding user response:
Add your toast in the middle tryLooper.prepare();
Toast. MakeText (FaBuActivity. This "release" success, Toast. LENGTH_LONG), show ();
Looper.loop();
Looper.prepare();
Toast. MakeText (FaBuActivity. This "release failure", Toast. LENGTH_LONG), show ();
Looper.loop();
CodePudding user response:
The