public class ToastUtils {
private static Toast toast;
public static void showToast(String str,Context context)
{
if(toast == null)
{
toast = Toast.makeText(context,str,Toast.LENGTH_SHORT);
}
// Log.e("NullPointer",str);
toast.setText(str);
toast.show();
}
}
ToastUtils记录
最新推荐文章于 2021-12-26 14:31:09 发布