package com.example.day13_player;
import java.io.File;}
====================================================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">day13-player</string>
<string name="action_settings">Settings</string>
<string name="hello_world">Hello world!</string>
<string name="btn_tvplay">播放</string>
<string name="btn_pausetv">暂停</string>
<string name="btn_replay">继续播放</string>
<string name="btn_stoptv">停止</string>
<string name="fileName">suyan.mp3</string>
</resources>
==========================================================================================
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".PlayerActivity" >
<EditText
android:id="@+id/et_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:ems="10"
android:text="@string/fileName" >
<requestFocus />
</EditText>
<Button
android:id="@+id/btn_play"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/et_address"
android:text="@string/btn_tvplay"
android:onClick="mediaPlay"/>
<Button
android:id="@+id/btn_replay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/et_address"
android:layout_toRightOf="@+id/btn_pause"
android:text="@string/btn_replay"
android:onClick="mediaResumePlay"/>
<Button
android:id="@+id/btn_pause"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/btn_play"
android:layout_alignBottom="@+id/btn_play"
android:layout_toRightOf="@+id/btn_play"
android:onClick="mediaPause"
android:text="@string/btn_pausetv" />
<Button
android:id="@+id/btn_stop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/btn_replay"
android:layout_alignBottom="@+id/btn_replay"
android:layout_alignParentRight="true"
android:onClick="mediaStop"
android:text="@string/btn_stoptv" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/btn_play"
android:layout_alignParentBottom="true"
android:layout_alignRight="@+id/btn_stop"
android:layout_below="@+id/btn_play"
android:layout_marginTop="19dp"
android:text="TextView" />
</RelativeLayout>