![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
工具类
strugglelin
这个作者很懒,什么都没留下…
展开
-
BaseApplicationt
Manifest配置文件:android:name=”.BaseApplicationt”public class BaseApplication extends Application { private static BaseApplication app; //全局变量 private String name; @Override ...原创 2018-04-21 23:25:12 · 134 阅读 · 0 评论 -
GsonUtil 工具类
GsonUtil谷歌Gson解析Json数据工具类public class GsonUtil { //使用Gson进行解析Bean public static <T> T getBean(String jsonString, Class<T> cls) { T t = null; try { ...原创 2018-04-23 11:35:59 · 839 阅读 · 0 评论 -
ToastUtil工具类
ToastUtil工具类public class ToastUtil { private static Toast toast = null; public static void showTextToast( String msg) { if (toast == null) { toast = Toast.makeText...原创 2018-04-13 20:38:53 · 167 阅读 · 0 评论 -
List 排序
1、List中对象实现Comparable接口 2、Collections.sort 重载方法来实现 注:实现和重载方法返回 1 升序、-1 倒序、0 顺序public class User implements Comparable<User>{ private String name; private Integer age; public Us...原创 2018-04-23 22:25:56 · 149 阅读 · 0 评论 -
SharedPreferencesUtil 工具类
SharedPreferencesUtil 工具类public class SharedPreferencesUtil { public final static String SETTING = "SETTING"; private static SharedPreferences sp; private static SharedPreferences.Edito...原创 2018-04-25 14:11:47 · 212 阅读 · 0 评论 -
Android 退出 App,ActivityCollector 工具类
ActivityCollector工具类public class ActivityCollector { public static List<Activity> activities = new ArrayList<>(); public static void addActivity(Activity activity) { ac...原创 2018-04-21 12:52:50 · 550 阅读 · 0 评论 -
LogUtil 工具类
LogUtil 工具类public final class LogUtil { //all、verbose、debug、info、warn、err Log print on-off private final static boolean all = true; private final static boolean i = true; private ...原创 2018-04-27 11:25:20 · 315 阅读 · 0 评论 -
Android 防止快速点击造成多次事件
1、ClickUtil 工具类public class ClickUtil { // 两次点击按钮之间的点击间隔不能少于1000 毫秒 private static final int MIN_CLICK_DELAY_TIME = 1000; private static long lastClickTime; // 返回 true 为点击,false 为快...原创 2018-06-22 09:35:08 · 621 阅读 · 1 评论