android:layout_width="wrap_content"android:layout_height="wrap_content"></RadioButton>
<RadioButton android:text="顺序播放" android:id="@+id/order_play"
android:layout_width="wrap_content" android:layout_height="wrap_content"></RadioButton>
<RadioButton android:text="随机播放" android:id="@+id/random_play"
android:checked="true" android:layout_width="wrap_content"
android:layout_height="wrap_content"></RadioButton>
</RadioGroup>
</LinearLayout>
<LinearLayout android:orientation="horizontal"
android:layout_width="wrap_content" android:gravity="center_vertical"
android:layout_height="wrap_content">
<TextView android:text="歌词显示" android:id="@+id/setting"
android:textSize="@dimen/text_size" android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ToggleButton android:text="" android:id="@+id/ly_lrc"
android:checked="false" android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<TextView android:layout_width="fill_parent"
android:layout_height="150px"></TextView>
4.4.2 播放器设置功能实现
播放器设置功能实现代码:
public class PlaySetting extends Activity {
OnTouchListener setting_bt_Listener = new OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
v.setBackgroundResource(R.drawable.share_pressed);
SharedPreferences sp = getSharedPreferences("SET_MSG",
MODE_WORLD_WRITEABLE);
SharedPreferences.Editor editor = sp.edit();
if (sigle_Play.isChecked()) {
editor.putString("sigle_Play", "is_Sigle");
editor.putString("order_Play", null);
editor.putString("random_Play", null);}
if (order_Play.isChecked()) {
editor.putString("sigle_Play", null); 基于Android手机平台音乐播放器开发设计(14):http://www.youerw.com/jisuanji/lunwen_1408.html