I think you want to show the file names from this directory so that you can try the following:
File dir = new File(dirPath);
File[] filelist = dir.listFiles();
String[] theNamesOfFiles = new String[filelist.length];
for (int i = 0; i < theNamesOfFiles.length; i++) {
theNamesOfFiles[i] = filelist[i].getName();
}
Adapter for use with list:
new ArrayAdapter<String>(this, android.R.layout.simple_list_item, theNamesOfFiles);
For something more complex than displaying file names, you must implement a custom adapter.
source
share