diff options
author | Thomas Guillem <thomas@gllm.fr> | 2014-10-18 19:02:23 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-08-20 00:07:18 +0200 |
commit | f37ab5482b187d1f18427239ad055da4e751bcb4 (patch) | |
tree | d52e23f5f5084bc0924bc880bddcae0545a96573 /android/res | |
parent | ef38dbe5bfe2dd4bca4a392dc4322a2d5855c2c6 (diff) |
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
Diffstat (limited to 'android/res')
-rw-r--r-- | android/res/layout/log_item.xml | 5 | ||||
-rw-r--r-- | android/res/layout/settings.xml | 37 | ||||
-rw-r--r-- | android/res/values/strings.xml | 4 |
3 files changed, 46 insertions, 0 deletions
diff --git a/android/res/layout/log_item.xml b/android/res/layout/log_item.xml new file mode 100644 index 000000000..e6e74c913 --- /dev/null +++ b/android/res/layout/log_item.xml @@ -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" /> diff --git a/android/res/layout/settings.xml b/android/res/layout/settings.xml new file mode 100644 index 000000000..46e471b05 --- /dev/null +++ b/android/res/layout/settings.xml @@ -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> diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml index bcc1ae0c5..fc5a15bda 100644 --- a/android/res/values/strings.xml +++ b/android/res/values/strings.xml @@ -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> |