|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
新建个项目修改AndroidManifest.xml,在manifest标签下添加- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
复制代码
修改activity_main.xml- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
- <Button
- android:id="@+id/play"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="play"/>
- <Button
- android:id="@+id/pause"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="pause"/>
- <Button
- android:id="@+id/stop"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="stop"/>
- </LinearLayout>
复制代码
修改mainactivity.java复制代码
因为模拟器里没有mp3文件所以点击按钮也没用 |
|