上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: 需求: 持久化运行时异常的信息 1.CrashHandler.java 2.自定义的Application 中注册 3.adb shell cat /sdcard/Android/data/<package_name>/files/logs/crash_2016_04_20.log 阅读全文
posted @ 2016-04-20 23:09 MarcoReus 阅读(294) 评论(0) 推荐(0) 编辑
摘要: public class DeviceInfoUtil { private static WifiManager wifiManager = null; // wifi是否已连接 public static boolean isWifi(Context context) { wifiManager = (WifiManager) context.getS... 阅读全文
posted @ 2016-04-17 17:00 MarcoReus 阅读(691) 评论(0) 推荐(0) 编辑
摘要: public class RuntimeUtil { /** 通过查询su文件的方式判断手机是否root */ public static boolean hasRootedSilent() { return new File("/system/bin/su").exists() || new File("/system/xbin... 阅读全文
posted @ 2016-04-17 16:58 MarcoReus 阅读(773) 评论(0) 推荐(0) 编辑
摘要: 1. context.getExternalFilesDir() ==> /sdcard/Android/data/<package_name>/files/ 一般放一些长时间保存的数据,对应 设置->应用->应用详情->”清除数据“ 2. context.getExternalCacheDir() 阅读全文
posted @ 2016-04-12 21:38 MarcoReus 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 需求: listview显示的第一行永远为整行,不能为半行。 参考: android listview 每次滑动整行 1. 添加 listview 的 setOnScrollListener() 事件 2. @Override onScrollStateChanged() 方法 阅读全文
posted @ 2016-04-12 21:11 MarcoReus 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 参考: 1. 利用Java反射机制改变SharedPreferences存储路径 Singleton1900 2. Android快速开发系列 10个常用工具类 Hongyang 阅读全文
posted @ 2016-04-11 23:36 MarcoReus 阅读(4009) 评论(0) 推荐(0) 编辑
摘要: 场景: 在设置中切换中英文,然后跳转MainActivity....步骤:1.在MyApplication 中初始化语言 2.在 MainActivity 中 @Override onNewIntent()这个方法 , 如果不重写,当launch mode 为single task 时不会刷新 3. 阅读全文
posted @ 2016-04-09 11:16 MarcoReus 阅读(793) 评论(0) 推荐(0) 编辑
摘要: import java.sql.Date;import java.text.SimpleDateFormat; public class DateTimeUtil { public final class FormatType { public static final String FULL = 阅读全文
posted @ 2016-04-05 23:45 MarcoReus 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 转自 @author chenchuang import java.lang.reflect.InvocationTargetException;import java.lang.reflect.Method;import java.util.Collections;import java.util 阅读全文
posted @ 2016-04-03 21:21 MarcoReus 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 参考 Android 快速开发系列 打造万能的ListView GridView 适配器 Hongyang 阅读全文
posted @ 2016-01-07 00:23 MarcoReus 阅读(262) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 下一页