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-03-29 18:10:31 发布