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.youkuaiyun.com/zfzf294990051/article/details/7440701