Android中Toast重复显示问题解决

private Toast toast = null;

	private void showTextToast(String msg)
	{
		if(toast == null)
		{
			toast = Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT);
		}
		else
		{
			toast.setText(msg);
		}
		toast.show();
	}


你可能感兴趣的:(android)