From 2d623297a64ddfc8082b7b21db7cb2a19dd95f0e Mon Sep 17 00:00:00 2001 From: niushuai233 Date: Fri, 21 Oct 2022 16:29:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9Etoast=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cc/niushuai/project/devcontrol/base/util/ToastUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/base/util/ToastUtil.java b/app/src/main/java/cc/niushuai/project/devcontrol/base/util/ToastUtil.java index b0847e2..b28bc82 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/base/util/ToastUtil.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/base/util/ToastUtil.java @@ -6,6 +6,8 @@ import android.widget.Toast; public class ToastUtil { public static void show(Activity activity, String msg) { - Toast.makeText(activity, msg, Toast.LENGTH_SHORT).show(); + Toast toast = Toast.makeText(activity, msg, Toast.LENGTH_SHORT); + toast.setText(msg); + toast.show(); } }