0
for(int i = 0; i < files.length; i++)
{
    File file = files[i];
    path.add(file.getPath());
    if(file.isDirectory())
        item.add(file.getName() + R.drawable.folder); /* it doesn't work, because it shows numbers instead of folder icon */
    else
        item.add(file.getName());
}

It doesn't work; it shows numbers instead of the folder icon.

Ry-
  • 218,210
  • 55
  • 464
  • 476
androprog
  • 3
  • 1

1 Answers1

0

There several Android tutorials on make file mangers and lists: Android Programming: Where To Start For Creating A Simple File Browser?

That link - on StackOverFlow - has other links that good for what you are trying to work on. Also, you can use the source code from OpenIntents open source file manager:

OpenIntents: http://www.openintents.org/en/download

Source Code: http://code.google.com/p/openintents/downloads/detail?name=FileManager-source-1.0.0.zip&can=1&q=

To see what Open Intents File Manager looks like, you can check it out here: https://play.google.com/store/apps/details?id=org.openintents.filemanager

Let me know if this helps!

Community
  • 1
  • 1
Jared Burrows
  • 54,294
  • 25
  • 151
  • 185