android如何在子线程中弹出Toast

来源:互联网 发布:正大华日软件 编辑:程序博客网 时间:2024/05/18 02:59
new Thread(){@Overridepublic void run() {try {Looper.prepare();Toast.makeText(getApplicationContext(), "备份成功", 0).show();Looper.loop();} catch (Exception e) {Looper.prepare();Toast.makeText(getApplicationContext(), "备份失败", 0).show();Looper.loop();}  }}.start();

3 6
原创粉丝点击