mirror of
https://github.com/niushuai233/DevControl.git
synced 2024-10-27 22:43:20 +08:00
feat: 新增toast工具类
This commit is contained in:
parent
1c8968e140
commit
2d623297a6
@ -6,6 +6,8 @@ import android.widget.Toast;
|
|||||||
public class ToastUtil {
|
public class ToastUtil {
|
||||||
|
|
||||||
public static void show(Activity activity, String msg) {
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user