![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
各种小方法
剑飞
mememememememda
展开
-
安装新版本应用
private void installApp() { File appFile = new File(FILE_NAME); if(!appFile.exists()) { return; } // 跳转到新版本应用安装页面 Intent intent = new Intent(Intent.ACTION_VIEW); intent转载 2017-03-17 16:26:55 · 157 阅读 · 0 评论 -
获取分辨率
public static String getResolution() { WindowManager windowManager = (WindowManager) BaseApplication.getApplication().getSystemService(Context.WINDOW_SERVICE); Display display = windowManager.转载 2017-03-17 16:31:12 · 396 阅读 · 0 评论 -
验证是否符合手机号格式
public static boolean isMobileNO(String mobileNums) { /** 移动:134、135、136、137、138、139、150、151、157(TD)、158、159、187、188* 联通:130、131、132、152、155、156、185、186 电信:133、153、180、189、(1349卫通)* 总结起来就是第一位必原创 2017-03-17 16:33:13 · 633 阅读 · 0 评论 -
判断网络连接是否已开 true 已打开 false 未打开
public static boolean isConn(Context context) { boolean bisConnFlag = false; ConnectivityManager conManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);原创 2017-03-17 16:02:54 · 996 阅读 · 0 评论 -
判断存储卡是否可用
private static boolean isEnvironment() { if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { return true; } else { return false; }}转载 2017-03-17 16:40:09 · 373 阅读 · 0 评论 -
adapter调用notifyDataSetChanged无效解决了但不知道对不对也不知道原理
最近使用adpter。notifyDataSetChanged的时候发现不管用了,也上网查了,很多网站都说的原因:1、数据源没有更新,调用notifyDataSetChanged无效。2、数据源更新了,但是它指向新的引用,调用notifyDataSetChanged无效。3、数据源更新了,但是adpter没有收到消息通知,无法动态更新列表。我看了我的log日志里面的确有数据我也不知原创 2017-08-04 16:12:38 · 419 阅读 · 0 评论