【发布时间】:2012-06-30 16:21:04
【问题描述】:
我需要在 ListView 中做文件列表。文件夹中的文件(.txt 文件)。 我该怎么做?
【问题讨论】:
我需要在 ListView 中做文件列表。文件夹中的文件(.txt 文件)。 我该怎么做?
【问题讨论】:
看到这个link
使用
File mfile=new File("/sdcard");
File[] list=mfile.listFiles();
并使用
循环过滤if(name.endsWith(".txt")) { }
How to list all files and folders locating on sd card
How do I count the number of files with a specific extension on Android?
【讨论】: