1

I need do the file list in ListView. Files from the folder (.txt files). How can I do it?

0

1 Answer 1

1

see this link

use

File mfile=new File("/sdcard");
File[] list=mfile.listFiles();

and filter in loop using

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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.