toast 防止一直不停弹出,累积显示


private Toast mToast = null;

public void showTextToast(String msg) {
if (mToast == null) {
mToast = Toast.makeText(mContext, msg, Toast.LENGTH_SHORT);
} else {
mToast.setText(msg);
}
mToast.show();
}

posted on 2016-05-30 19:38  小小鸟儿!  阅读(1031)  评论(0编辑  收藏  举报