1.先看activity_main.xml文件: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android1="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="f…
初学Rxjava,目前只能遍历加载指定目录下的所有文件夹中的照片,文件夹中如果还嵌套有文件夹目前还没找到实现方法. 先看mvp目录结构: 很抱歉,没有model. 接下来是view层的接口代码和presenter层的接口代码 public interface IImgsView { void onImgsLoadCompleted(ArrayList<String> imgs); } public interface IImgsPresenter { void getImages(File[]…
一:setDestinationInExternalPublicDir(“Trinea”, “MeiLiShuo.apk”);表示设置下载地址为sd卡的Trinea文件夹,文件名为MeiLiShuo.apk.设置下载路径接口为setDestinationUri,setDestinationInExternalFilesDir,setDestinationToSystemCache.其中setDestinationToSystemCache仅限系统app使用. 二:DownloadManager下…
转载请注明出处:http://blog.csdn.net/l1028386804/article/details/47375595 眼下,市场上非常多Android手机软件都具有清理SD卡缓存的功能,比方360.金山等等.那么这些软件是怎样实现清理sd卡缓存数据功能的呢?以下,我就给大家演示下.这些功能是怎样实现的吧. 一.原理 首先我们还是讲一下这个功能实现的原理吧. 将Android手机中经常使用的一些应用缓存文件夹.全部放在一个数据库表中.将这个表中的文件夹查询出来放在一个List集合中,…
dir:/storage/emulated/0 也就是 sdcard目录 ====== android 获取sd卡根目录 public String getSDPath(){        File sdDir = null;        boolean sdCardExist = Environment.getExternalStorageState()          .equals(android.os.Environment.MEDIA_MOUNTED);//判断sd卡是否存在   …
Windows mobile 下读取手机SIM卡信息 c#改善 Windows mobile 下读取手机SIM卡信息…
首先搭建activity_main.xml布局 搭建ListView中显示的布局 创建适配器 将File数据和UI适配 MainActivity中将ListView设置适配器,并设置监听 //获取SD卡根目录,必须获取权限,权限在AndroidManifest.xml/Permissions中添加 1.首先搭建activity_main.xml布局 文件目录置顶,给一个不同的颜色 <LinearLayout xmlns:android="http://schemas.android.com…
1. activity_main.xml文件 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android1="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fil…
版权声明:本文为HaiyuKing原创文章,转载请注明出处! 前言 封装了获取SD卡根目录路径.以及对文件读写.获取文件名等相关操作. 因为需要用到android.permission.READ_EXTERNAL_STORAGE权限,所以依赖<Android6.0运行时权限(基于RxPermission开源库)>. 效果图 代码分析 较常用的应该是获取SD卡根目录路径.获取文件名.创建目录操作. 使用步骤 一.项目组织结构图 注意事项: 1.  导入类文件后需要change包名以及重新impo…
在Android的应用开发中经常要用到与SD卡有关的调试,本文就是介绍关于在Android模拟器中SD卡的使用 一.      准备工作 在介绍之前首先做好准备工作,即配好android的应用开发环境 l  JDK 1.6+ l  Android SDK 1.6 (这个版本无关紧要,后面在升级) l  Android SDK Setup l  Eclipse IDE for Java Developers 详细配置方法请参考:http://blog.sina.com.cn/s/blog_4de0…