页面显示bug修复

This commit is contained in:
2024-07-10 17:24:36 +08:00
parent 06cc3ba9db
commit c1355629eb
3 changed files with 27 additions and 2 deletions
@@ -29,6 +29,24 @@ public class ToastUtils {
}
}
public static void showLongToast(Context mContext, String message) {
if (!TextUtils.isEmpty(message)) {
// if ( mToast != null) {
// mToast.cancel();
// }
// mToast = Toast.makeText(mContext, message, Toast.LENGTH_SHORT);
// mToast.show();
if (mToast == null) {
mToast = Toast.makeText(mContext, message, Toast.LENGTH_LONG);
} else {
mToast.setText(message);
}
mToast.show();
}
}
public static void cancelToast(){
if (mToast!=null)
mToast.cancel();