public class Utils { private static Toast toast; public static void showtoast(Context context,String str){ if(toast==null){ toast=Toast.makeText(context,str,Toast.LENGTH_SHORT); }else{ toast.setText(str); } toast.show(); } }
Toast 工具
今天多一点积累,明天少一分烦恼