首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

列出sdcard里全部.mp3文件,并且可以点击播放

2012-09-23 
列出sdcard里所有.mp3文件,并且可以点击播放push songs into sdcard(before you push,you make sure your

列出sdcard里所有.mp3文件,并且可以点击播放

push songs into sdcard(before you push,you make sure your avd is running,else the operation of push will not work):

adb push f:\music\1.mp3 /sdcard

Step 2: Layout UI desigen:

create two .xml files we called song_item.xml and songlist.xml the code are:

song_item.xml:

<?xml version="1.0" encoding="utf-8"?>
<TextView android:id="@+id/text1" xmlns:android="http://schemas.android.com/apk/res/android"
??? android:layout_width="wrap_content"
??? android:layout_height="wrap_content"/>

songlist.xml:


<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
??????? android:orientation="vertical"
??????? android:layout_width="fill_parent"

now u can enjoy? the music.lol~

if u wanna the source code please leave your email address, i will send u!

热点排行