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

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

你可能感兴趣的:([转]在其他线程中显示Toast)