Android 实现Toast的快速切换刷新
2016-03-01 09:02
513 查看
private static Toast mToast = null;
public static void showToast(String msg) {
if (mToast == null) {
mToast = Toast.makeText(mApplication, msg, Toast.LENGTH_SHORT);
} else {
mToast.setText(msg);
mToast.setDuration(Toast.LENGTH_SHORT);
}
mToast.show();
}
推荐:http://blog.csdn.net/jdsjlzx/article/details/49717135
public static void showToast(String msg) {
if (mToast == null) {
mToast = Toast.makeText(mApplication, msg, Toast.LENGTH_SHORT);
} else {
mToast.setText(msg);
mToast.setDuration(Toast.LENGTH_SHORT);
}
mToast.show();
}
推荐:http://blog.csdn.net/jdsjlzx/article/details/49717135
相关文章推荐
- android适配
- Android系列---JSON数据解析
- Android ViewPager Fragment 选项卡切换
- FreeSwitch:二、用Android手机测试FreeSwitch服务器
- Android沉浸式状态栏的细节
- 广师Android群分享之Android动画
- 【Android】16.5 Android内置的系统服务
- 【Android】16.4 IntentService类
- 【Android】16.3 带Intent过滤器的Services
- 【Android】16.2 Started Services
- 【Android】16.1 Android Service基本概念
- 【Android】16.0 第16章 自定义服务和系统服务—本章示例主界面
- Android应用的调试
- 如何记忆Android模拟器中的快捷键
- 反编译Android应用
- Android中各种drawable的使用
- android 成长日记 8.Fragment学习之方法回调
- Android源码树中C代码的编译
- Android MVP模式的初识
- android studio 新建项目错误