Android 实现Toast的快速切换刷新

private static Toast mToast = null;

public static void showToast(String msg) {

        if (mToast == null) {
            mToast = Toast.makeText(mApplication, msg, Toast.LENGTH_SHORT);
        } else {
            mToast.setText(msg);
            mToast.setDuration(Toast.LENGTH_SHORT);
        }

        mToast.show();

    }



推荐:http://blog.csdn.net/jdsjlzx/article/details/49717135

你可能感兴趣的:(Android)