android: improve Settings UI and run mpd on boot
add 2 preferences to: - enable Wakelock when MPD is running (prevent suspend) - run MPD on boot and display MPD logs
This commit is contained in:

committed by
Max Kellermann

parent
ef38dbe5bf
commit
f37ab5482b
5
android/res/layout/log_item.xml
Normal file
5
android/res/layout/log_item.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:typeface="monospace" />
|
37
android/res/layout/settings.xml
Normal file
37
android/res/layout/settings.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?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="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/run"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textOn="@string/toggle_button_run_on"
|
||||
android:textOff="@string/toggle_button_run_off" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/run_on_boot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/checkbox_run_on_boot" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/wakelock"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/checkbox_wakelock" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/log_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dip" />
|
||||
|
||||
</LinearLayout>
|
@@ -4,4 +4,8 @@
|
||||
<string name="app_name">MPD</string>
|
||||
<string name="notification_title_mpd_running">Music Player Daemon is running</string>
|
||||
<string name="notification_text_mpd_running">Touch for MPD options.</string>
|
||||
<string name="toggle_button_run_on">MPD is running</string>
|
||||
<string name="toggle_button_run_off">MPD is not running</string>
|
||||
<string name="checkbox_run_on_boot">Run MPD automatically on boot</string>
|
||||
<string name="checkbox_wakelock">Prevent suspend when MPD is running (Wakelock)</string>
|
||||
</resources>
|
||||
|
Reference in New Issue
Block a user