开发者

how to list the audio files in a Listview in android

开发者 https://www.devze.com 2022-12-19 00:18 出处:网络
开发者_如何学运维I am new to this android application development. I have a audio files in a particular directory. I want to list the those audio files in a listView.

开发者_如何学运维I am new to this android application development.

I have a audio files in a particular directory. I want to list the those audio files in a listView.

please tell me how to do this activity.


  1. Create a File object representing your directory on the SDcard and call appropriate File#list() variant to get list of all the files in that directory. You will get names of the files in a String[].

  2. Create an Adapter class and pass this String array to it. Make a ListView and back it up by this custom Adapter.You can refer examples in API demos or this tutorial for the same

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号