public final class UIToast {private static Context context = GoldApp.goldAPP.getApplicationContext();public static void showToastLong(String msg) {showToast(context, msg, Toast.LENGTH_LONG);}public static void showToastShort(String msg) {showToast(context, msg, Toast.LENGTH_SHORT);}public static void showToastShort(int strRes) {showToast(context, context.getString(strRes), Toast.LENGTH_SHORT);}public static void showToastLong(int strRes) {showToast(context, context.getString(strRes), Toast.LENGTH_LONG);}public static void showToast(Context context, String msg, int duration) {Toast.makeText(context, msg, duration).show();}}


   

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. Android(安卓)Studio创建项目Error:Serve
  2. android中的主题(theme)的定义
  3. Android 常用代码整理:Android 常用弹窗整
  4. Android 的source (需安装 git repo)
  5. Android如何把SearchManager和User Dicti
  6. Android StatusBar相关设置
  7. android应用程序最小化的处理方法
  8. Service简析
  9. linux/android thread test
  10. Android(安卓)广播机制