How to list files from a local folder onto a ListView

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

How to list files from a local folder onto a ListView

Postby hebbalhrk » Wed Jun 18, 2008 1:13 pm

Hi,

I am a new bee to android, please let me know how to filter particular files from a local folder and display the files using a list view.

For example, i want to list all the .mp3 files in folder c:/songs and display it as a list

Thanks
in advance..
hebbalhrk
Developer
Developer
 
Posts: 37
Joined: Wed Jun 18, 2008 10:35 am

Top

Postby clumsy » Wed Jun 18, 2008 9:13 pm

Hi,

try
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. File[] files = new File("/").listFiles();
Parsed in 0.031 seconds, using GeSHi 1.0.8.4

There is a howto from plusminus:
http://www.anddev.org/building_an_andro ... _-t67.html

Also this should help:
http://linuxdevices.com/articles/AT6247038002.html

Greetings,
clumsy
clumsy
Freshman
Freshman
 
Posts: 3
Joined: Sun Jun 15, 2008 9:28 pm

Postby hebbalhrk » Tue Jun 24, 2008 11:54 am

Thanks for the help
this lists the directory structure.
Can u help me how to filter particular files and display them in a list
I need to filter all the mp3 files in a folder and display them as a list.
hebbalhrk
Developer
Developer
 
Posts: 37
Joined: Wed Jun 18, 2008 10:35 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests