diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-08-18 17:43:23 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-08-18 17:43:23 -0700 |
commit | 7f8f9f1d3bf05935d0af50982e2af187188fb57e (patch) | |
tree | 8fdae9af240611cb5e9cf2605c01d704e11c784c /app/src/main | |
parent | 1f9374f7fac51d13e87929c3f87705840be8c237 (diff) | |
download | dsub-7f8f9f1d3bf05935d0af50982e2af187188fb57e.tar.gz dsub-7f8f9f1d3bf05935d0af50982e2af187188fb57e.tar.bz2 dsub-7f8f9f1d3bf05935d0af50982e2af187188fb57e.zip |
Update target version to 22, update notification for white theme
Diffstat (limited to 'app/src/main')
28 files changed, 101 insertions, 35 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1f3a52fc..e352df0a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -31,7 +31,7 @@ <uses-feature android:name="android.hardware.microphone" android:required="false" /> <uses-feature android:name="android.hardware.wifi" android:required="false" /> - <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19"/> + <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22"/> <supports-screens android:anyDensity="true" android:xlargeScreens="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true"/> diff --git a/app/src/main/java/github/daneren2005/dsub/util/Notifications.java b/app/src/main/java/github/daneren2005/dsub/util/Notifications.java index bc87624f..ac812a53 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Notifications.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Notifications.java @@ -148,10 +148,10 @@ public final class Notifications { boolean persistent = Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_PERSISTENT_NOTIFICATION, false); if(persistent) { if(expanded) { - rv.setImageViewResource(R.id.control_pause, playing ? R.drawable.media_pause_dark : R.drawable.media_start_dark); + rv.setImageViewResource(R.id.control_pause, playing ? R.drawable.notification_pause : R.drawable.notification_start); } else { - rv.setImageViewResource(R.id.control_previous, playing ? R.drawable.media_pause_dark : R.drawable.media_start_dark); - rv.setImageViewResource(R.id.control_pause, R.drawable.media_forward_dark); + rv.setImageViewResource(R.id.control_previous, playing ? R.drawable.notification_pause : R.drawable.notification_start); + rv.setImageViewResource(R.id.control_pause, R.drawable.notification_forward); rv.setImageViewResource(R.id.control_next, R.drawable.notification_close); } } diff --git a/app/src/main/res/drawable-hdpi/notification_close_dark.png b/app/src/main/res/drawable-hdpi/notification_close_dark.png Binary files differnew file mode 100644 index 00000000..5f9f2c5a --- /dev/null +++ b/app/src/main/res/drawable-hdpi/notification_close_dark.png diff --git a/app/src/main/res/drawable-hdpi/notification_close_light.png b/app/src/main/res/drawable-hdpi/notification_close_light.png Binary files differnew file mode 100644 index 00000000..11621f1f --- /dev/null +++ b/app/src/main/res/drawable-hdpi/notification_close_light.png diff --git a/app/src/main/res/drawable-mdpi/notification_close_dark.png b/app/src/main/res/drawable-mdpi/notification_close_dark.png Binary files differnew file mode 100644 index 00000000..51a02d23 --- /dev/null +++ b/app/src/main/res/drawable-mdpi/notification_close_dark.png diff --git a/app/src/main/res/drawable-mdpi/notification_close_light.png b/app/src/main/res/drawable-mdpi/notification_close_light.png Binary files differnew file mode 100644 index 00000000..75bf1407 --- /dev/null +++ b/app/src/main/res/drawable-mdpi/notification_close_light.png diff --git a/app/src/main/res/drawable-v22/notification_backward.xml b/app/src/main/res/drawable-v22/notification_backward.xml new file mode 100644 index 00000000..ffebb00c --- /dev/null +++ b/app/src/main/res/drawable-v22/notification_backward.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<bitmap + xmlns:android="http://schemas.android.com/apk/res/android" + android:src="@drawable/media_backward_light"/>
\ No newline at end of file diff --git a/app/src/main/res/drawable-v22/notification_close.xml b/app/src/main/res/drawable-v22/notification_close.xml new file mode 100644 index 00000000..4a934278 --- /dev/null +++ b/app/src/main/res/drawable-v22/notification_close.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<bitmap + xmlns:android="http://schemas.android.com/apk/res/android" + android:src="@drawable/notification_close_light"/>
\ No newline at end of file diff --git a/app/src/main/res/drawable-v22/notification_forward.xml b/app/src/main/res/drawable-v22/notification_forward.xml new file mode 100644 index 00000000..0d3c93d5 --- /dev/null +++ b/app/src/main/res/drawable-v22/notification_forward.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<bitmap + xmlns:android="http://schemas.android.com/apk/res/android" + android:src="@drawable/media_forward_light"/>
\ No newline at end of file diff --git a/app/src/main/res/drawable-v22/notification_pause.xml b/app/src/main/res/drawable-v22/notification_pause.xml new file mode 100644 index 00000000..330260ff --- /dev/null +++ b/app/src/main/res/drawable-v22/notification_pause.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<bitmap + xmlns:android="http://schemas.android.com/apk/res/android" + android:src="@drawable/media_pause_light"/>
\ No newline at end of file diff --git a/app/src/main/res/drawable-v22/notification_start.xml b/app/src/main/res/drawable-v22/notification_start.xml new file mode 100644 index 00000000..75e23c08 --- /dev/null +++ b/app/src/main/res/drawable-v22/notification_start.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<bitmap + xmlns:android="http://schemas.android.com/apk/res/android" + android:src="@drawable/media_start_light"/>
\ No newline at end of file diff --git a/app/src/main/res/drawable-xhdpi/notification_close_dark.png b/app/src/main/res/drawable-xhdpi/notification_close_dark.png Binary files differnew file mode 100644 index 00000000..8a445bc5 --- /dev/null +++ b/app/src/main/res/drawable-xhdpi/notification_close_dark.png diff --git a/app/src/main/res/drawable-xhdpi/notification_close_light.png b/app/src/main/res/drawable-xhdpi/notification_close_light.png Binary files differnew file mode 100644 index 00000000..223e0680 --- /dev/null +++ b/app/src/main/res/drawable-xhdpi/notification_close_light.png diff --git a/app/src/main/res/drawable-xxhdpi/notification_close_dark.png b/app/src/main/res/drawable-xxhdpi/notification_close_dark.png Binary files differnew file mode 100644 index 00000000..c9a0393f --- /dev/null +++ b/app/src/main/res/drawable-xxhdpi/notification_close_dark.png diff --git a/app/src/main/res/drawable-xxhdpi/notification_close_light.png b/app/src/main/res/drawable-xxhdpi/notification_close_light.png Binary files differnew file mode 100644 index 00000000..10102a30 --- /dev/null +++ b/app/src/main/res/drawable-xxhdpi/notification_close_light.png diff --git a/app/src/main/res/drawable-xxxhdpi/notification_close_dark.png b/app/src/main/res/drawable-xxxhdpi/notification_close_dark.png Binary files differnew file mode 100644 index 00000000..08b0792e --- /dev/null +++ b/app/src/main/res/drawable-xxxhdpi/notification_close_dark.png diff --git a/app/src/main/res/drawable-xxxhdpi/notification_close_light.png b/app/src/main/res/drawable-xxxhdpi/notification_close_light.png Binary files differnew file mode 100644 index 00000000..ef0d48f0 --- /dev/null +++ b/app/src/main/res/drawable-xxxhdpi/notification_close_light.png diff --git a/app/src/main/res/drawable/notification_backward.xml b/app/src/main/res/drawable/notification_backward.xml new file mode 100644 index 00000000..f5fd965b --- /dev/null +++ b/app/src/main/res/drawable/notification_backward.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<bitmap + xmlns:android="http://schemas.android.com/apk/res/android" + android:src="@drawable/media_backward_dark"/>
\ No newline at end of file diff --git a/app/src/main/res/drawable/notification_close.xml b/app/src/main/res/drawable/notification_close.xml new file mode 100644 index 00000000..67a5696f --- /dev/null +++ b/app/src/main/res/drawable/notification_close.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<bitmap + xmlns:android="http://schemas.android.com/apk/res/android" + android:src="@drawable/notification_close_dark"/>
\ No newline at end of file diff --git a/app/src/main/res/drawable/notification_divider.xml b/app/src/main/res/drawable/notification_divider.xml new file mode 100644 index 00000000..95d50aa7 --- /dev/null +++ b/app/src/main/res/drawable/notification_divider.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <size android:width="1dip" /> + <solid android:color="@android:color/darker_gray" /> +</shape>
\ No newline at end of file diff --git a/app/src/main/res/drawable/notification_forward.xml b/app/src/main/res/drawable/notification_forward.xml new file mode 100644 index 00000000..5dd10008 --- /dev/null +++ b/app/src/main/res/drawable/notification_forward.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<bitmap + xmlns:android="http://schemas.android.com/apk/res/android" + android:src="@drawable/media_forward_dark"/>
\ No newline at end of file diff --git a/app/src/main/res/drawable/notification_pause.xml b/app/src/main/res/drawable/notification_pause.xml new file mode 100644 index 00000000..c71a997c --- /dev/null +++ b/app/src/main/res/drawable/notification_pause.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<bitmap + xmlns:android="http://schemas.android.com/apk/res/android" + android:src="@drawable/media_pause_dark"/>
\ No newline at end of file diff --git a/app/src/main/res/drawable/notification_start.xml b/app/src/main/res/drawable/notification_start.xml new file mode 100644 index 00000000..b31b4f86 --- /dev/null +++ b/app/src/main/res/drawable/notification_start.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<bitmap + xmlns:android="http://schemas.android.com/apk/res/android" + android:src="@drawable/media_start_dark"/>
\ No newline at end of file diff --git a/app/src/main/res/layout/notification.xml b/app/src/main/res/layout/notification.xml index 7e1c98bf..4a89db49 100644 --- a/app/src/main/res/layout/notification.xml +++ b/app/src/main/res/layout/notification.xml @@ -23,7 +23,7 @@ <TextView android:id="@+id/notification_title" - style="@android:style/TextAppearance.StatusBar.EventContent.Title" + style="@style/NotificationText.Title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left" @@ -33,7 +33,7 @@ <TextView android:id="@+id/notification_artist" - style="@android:style/TextAppearance.StatusBar.EventContent" + style="@style/NotificationText.Content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left" @@ -50,18 +50,18 @@ <ImageButton android:id="@+id/control_previous" - android:src="@drawable/media_backward_dark" + android:src="@drawable/notification_backward" style="@style/NotificationButton"/> <ImageButton android:id="@+id/control_pause" - android:src="@drawable/media_pause_dark" + android:src="@drawable/notification_pause" style="@style/NotificationButton" android:layout_width="54dip" android:padding="0dip"/> <ImageButton android:id="@+id/control_next" - android:src="@drawable/media_forward_dark" + android:src="@drawable/notification_forward" style="@style/NotificationButton"/> </LinearLayout> diff --git a/app/src/main/res/layout/notification_expanded.xml b/app/src/main/res/layout/notification_expanded.xml index bfd3c757..7b378e12 100644 --- a/app/src/main/res/layout/notification_expanded.xml +++ b/app/src/main/res/layout/notification_expanded.xml @@ -2,7 +2,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/statusbar" android:layout_width="fill_parent" - android:layout_height="fill_parent" + android:layout_height="128dp" android:orientation="horizontal" > <ImageView @@ -14,7 +14,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" - android:layout_height="wrap_content" + android:layout_height="fill_parent" android:layout_weight="0.0" android:orientation="vertical" android:paddingLeft="11.0dip" > @@ -26,11 +26,11 @@ <TextView android:id="@+id/notification_title" - style="@android:style/TextAppearance.StatusBar.EventContent.Title" + style="@style/NotificationText.Title" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - android:layout_gravity="left" + android:layout_gravity="left|center_vertical" android:ellipsize="marquee" android:focusable="true" android:singleLine="true" /> @@ -41,14 +41,13 @@ android:layout_height="wrap_content" android:src="@drawable/notification_close" style="@style/NotificationButton" - android:padding="10dip" android:layout_gravity="right" - android:visibility="gone"/> + android:visibility="invisible"/> </LinearLayout> <TextView android:id="@+id/notification_artist" - style="@android:style/TextAppearance.StatusBar.EventContent" + style="@style/NotificationText.Content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left" @@ -58,48 +57,43 @@ <TextView android:id="@+id/notification_album" - style="@android:style/TextAppearance.StatusBar.EventContent" + style="@style/NotificationText.Content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left" android:ellipsize="end" android:scrollHorizontally="true" - android:singleLine="true" /> - - <TextView - android:id="@+id/textView1" - android:layout_width="wrap_content" - android:layout_height="fill_parent" /> + android:singleLine="true" + android:paddingBottom="10dp"/> <ImageView - android:background="?android:dividerHorizontal" + style="@style/NotificationDivider" android:layout_width="fill_parent" - android:layout_height="1.0px"/> + android:layout_height="1dp"/> <LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" - android:layout_height="wrap_content" + android:layout_height="fill_parent" + android:layout_weight="1" android:orientation="horizontal" android:showDividers="middle" - android:divider="?android:listDivider"> + style="@style/NotificationLayoutDivider"> <ImageButton android:id="@+id/control_previous" style="@style/NotificationButton.Expanded" - android:src="@drawable/media_backward_dark" /> + android:src="@drawable/notification_backward" /> <ImageButton android:id="@+id/control_pause" style="@style/NotificationButton.Expanded" - android:src="@drawable/media_pause_dark" /> + android:src="@drawable/notification_pause" /> <ImageButton android:id="@+id/control_next" style="@style/NotificationButton.Expanded" - android:src="@drawable/media_forward_dark" /> + android:src="@drawable/notification_forward" /> </LinearLayout> - </LinearLayout> </LinearLayout> diff --git a/app/src/main/res/values-v22/styles.xml b/app/src/main/res/values-v22/styles.xml new file mode 100644 index 00000000..f85d2f23 --- /dev/null +++ b/app/src/main/res/values-v22/styles.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <style name="NotificationText.Title" parent="@android:style/TextAppearance.Material.Notification.Title"></style> + <style name="NotificationText.Content" parent="@android:style/TextAppearance.Material.Notification"></style> + + <style name="NotificationButton.Expanded" parent="@style/NotificationButton.ExpandedBase"> + <item name="android:padding">2dip</item> + </style> + + <style name="NotificationLayoutDivider"> + <item name="android:divider">@drawable/notification_divider</item> + </style> + <style name="NotificationDivider"> + <item name="android:background">@drawable/notification_divider</item> + </style> +</resources>
\ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 82763b48..772d0abf 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <color name="appwidget_text">#FFFFFF</color> - <color name="notificationArtist">#bababa</color> - <color name="notificationTitle">#dddddd</color> <color name="overlayColor">#80000000</color> <color name="holo_blue_light">#ff33b5e5</color> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index a2a2d208..94db6bca 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -12,16 +12,29 @@ <item name="android:padding">2dip</item> </style> - <style name="NotificationButton.Expanded"> + <style name="NotificationButton.ExpandedBase"> <item name="android:background">?android:selectableItemBackground</item> <item name="android:layout_width">0dp</item> <item name="android:layout_height">fill_parent</item> <item name="android:layout_weight">1</item> <item name="android:layout_gravity">center</item> <item name="android:scaleType">fitCenter</item> + </style> + + <style name="NotificationButton.Expanded" parent="@style/NotificationButton.ExpandedBase"> <item name="android:padding">10dip</item> </style> + <style name="NotificationText.Title" parent="@android:style/TextAppearance.StatusBar.EventContent.Title"></style> + <style name="NotificationText.Content" parent="@android:style/TextAppearance.StatusBar.EventContent"></style> + + <style name="NotificationLayoutDivider"> + <item name="android:divider">?android:listDivider</item> + </style> + <style name="NotificationDivider"> + <item name="android:background">?android:dividerHorizontal</item> + </style> + <style name="MoreButton" parent="BasicButton"> <item name="android:paddingRight">14dip</item> </style> |