public class Util {
private static Toast toast;
public static void showToast(Context context,
String content) {
if (toast == null) {
toast = Toast.makeText(context,
content,
Toast.LENGTH_SHORT);
} else {
toast.setText(content);
}
toast.show();
}
}
避免Toast多次弹出
最新推荐文章于 2021-09-15 11:05:23 发布