摘要: 首先添加相关的权限: 然后我们可以通过ConnectivityManager connectivityManager=(ConnectivityManager) getApplication().getSystemService(Context.CONNECTIVITY_SERVICE);来获取当前... 阅读全文
posted @ 2015-12-09 17:18 如梦真心 阅读(518) 评论(0) 推荐(0) 编辑
摘要: //通用的手机流量计算方法private String byteToMB(long size){ long kb = 1024; long mb = kb*1024; long gb = mb*1024; if (size >= gb){ ... 阅读全文
posted @ 2015-12-09 16:36 如梦真心 阅读(1044) 评论(0) 推荐(0) 编辑
摘要: 首先介绍一下SwipeRefreshLayout ,由于下拉刷新使用的人比较多,于是谷歌自己就做了一个下拉刷新的控件.android.support.v4.widget.SwipeRefreshLayout具体是使用方法://XML //Activity... 阅读全文
posted @ 2015-12-09 16:32 如梦真心 阅读(347) 评论(0) 推荐(0) 编辑