From d1be1d80cc8ccb50ef0c27bc28069754342eab0d Mon Sep 17 00:00:00 2001 From: Christopher Eby Date: Sun, 21 Feb 2010 00:08:47 -0600 Subject: [PATCH] Add a mini-player This will open in response to clicks on the notification. It provides a quick way to change a song or pause music. (Mainly it just looks legit) --- AndroidManifest.xml | 8 +- res/layout/nowplaying.xml | 23 +-- res/layout/playback_buttons.xml | 25 +++ res/layout/remote_dialog.xml | 31 ++++ res/values/strings.xml | 7 +- res/values/theme.xml | 3 +- res/xml/preferences.xml | 6 + src/org/kreed/tumult/CoverView.java | 155 +++++++++++++------ src/org/kreed/tumult/MusicPlayer.java | 28 +++- src/org/kreed/tumult/NowPlayingActivity.java | 103 +++--------- src/org/kreed/tumult/RemoteActivity.java | 125 +++++++++++++++ src/org/kreed/tumult/RemoteLayout.java | 76 +++++++++ 12 files changed, 429 insertions(+), 161 deletions(-) create mode 100644 res/layout/playback_buttons.xml create mode 100644 res/layout/remote_dialog.xml create mode 100644 src/org/kreed/tumult/RemoteActivity.java create mode 100644 src/org/kreed/tumult/RemoteLayout.java diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 6644c9c5..24f3d984 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -8,12 +8,18 @@ android:name="Tumult"> + android:theme="@style/NoBackground" + android:launchMode="singleTop" > + diff --git a/res/layout/nowplaying.xml b/res/layout/nowplaying.xml index 5d0dbcc4..8d05bcb7 100644 --- a/res/layout/nowplaying.xml +++ b/res/layout/nowplaying.xml @@ -36,27 +36,6 @@ android:layout_gravity="bottom|center_horizontal" android:background="#a000" android:orientation="horizontal"> - - - + \ No newline at end of file diff --git a/res/layout/playback_buttons.xml b/res/layout/playback_buttons.xml new file mode 100644 index 00000000..f8887d01 --- /dev/null +++ b/res/layout/playback_buttons.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/res/layout/remote_dialog.xml b/res/layout/remote_dialog.xml new file mode 100644 index 00000000..49528798 --- /dev/null +++ b/res/layout/remote_dialog.xml @@ -0,0 +1,31 @@ + + + + + + + +