
http://android-er.blogspot.com/2010/01/android-file-explorer-with-jpgs-exif_08.html
计算要求的简单逻辑,
private voID getDir(String dirPath){myPath.setText("Location: " + dirPath);item = new ArrayList<String>();path = new ArrayList<String>();file f = new file(dirPath);file[] files = f.Listfiles();if(!dirPath.equals(root)){ item.add(root); path.add(root); item.add("../"); path.add(f.getParent());}for(int i=0; i < files.length; i++){ file file = files[i]; path.add(file.getPath()); if(file.isDirectory()) item.add(file.getname() + "/"); else item.add(file.getname());}ArrayAdapter<String> fileList = new ArrayAdapter<String>(this,R.layout.row,item);setlistadapter(fileList); } 总结 以上是内存溢出为你收集整理的android – 如何从模拟器的SD卡中获取所有图片并将其显示在listView中?全部内容,希望文章能够帮你解决android – 如何从模拟器的SD卡中获取所有图片并将其显示在listView中?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)