[转]在其他线程中显示Toast

来源:互联网 发布:ubuntu torch lua 编辑:程序博客网 时间:2024/05/29 12:57
Handler handler = new Handler(Looper.getMainLooper());  handler.post(new Runnable(){public void run(){       Toast toast = Toast.makeText(getApplicationContext(),"另一个线程中显示...",Toast.LENGTH_SHORT);         //toast.setGravity(Gravity.TOP,0, 220);  //设置toast的位置       toast.show();  }                });


转自:http://blog.csdn.net/zfzf294990051/article/details/7440701

原创粉丝点击