diff options
author | Thomas Guillem <thomas@gllm.fr> | 2014-09-16 12:00:59 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-08-19 23:35:49 +0200 |
commit | 54a5491b86ce248fc56739aefe555d20e65d56a8 (patch) | |
tree | 045c834f2478300445d3bfcacb2811a53f55d193 /android/res | |
parent | aff070bcbb771a5096f02b60c84aacfde601e043 (diff) |
android: Main is now a service
- add Settings: Activity to start / stop MPD Service (Main).
- Main is a service that run in foreground with a notification. See
Service.startForeground documentation for more details.
- Main.Client is used to control the service: start or stop it and also receive
callbacks when service encounters an error, is killed, is started or is
stopped.
- Main.start to start the service without any fallback.
Diffstat (limited to 'android/res')
-rw-r--r-- | android/res/layout/custom_notification_gb.xml | 22 | ||||
-rw-r--r-- | android/res/values/strings.xml | 2 |
2 files changed, 24 insertions, 0 deletions
diff --git a/android/res/layout/custom_notification_gb.xml b/android/res/layout/custom_notification_gb.xml new file mode 100644 index 000000000..92a6036e2 --- /dev/null +++ b/android/res/layout/custom_notification_gb.xml @@ -0,0 +1,22 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/layout" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:padding="10dp" > + <ImageView android:id="@+id/image" + android:layout_width="wrap_content" + android:layout_height="fill_parent" + android:layout_alignParentLeft="true" + android:layout_marginRight="10dp" /> + <TextView android:id="@+id/title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toRightOf="@id/image" + style="Custom Notification Title" /> + <TextView android:id="@+id/text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toRightOf="@id/image" + android:layout_below="@id/title" + style="Custom Notification Text" /> +</RelativeLayout> diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml index 416c8de9f..bcc1ae0c5 100644 --- a/android/res/values/strings.xml +++ b/android/res/values/strings.xml @@ -2,4 +2,6 @@ <resources> <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> </resources> |