Skip to content

Commit 7ce3b67

Browse files
committed
Migrate to vector drawables
1 parent 2b26df3 commit 7ce3b67

File tree

594 files changed

+629
-261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

594 files changed

+629
-261
lines changed

app/build.gradle

+8-6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ android {
99
targetSdkVersion 26
1010
versionCode 202
1111
versionName '5.4.4'
12+
vectorDrawables.useSupportLibrary = true
1213
setProperty("archivesBaseName", "DSub $versionName")
1314
resConfigs "de", "es", "fr", "hu", "nl", "pt-rPT", "ru", "sv"
1415
}
@@ -65,10 +66,11 @@ dependencies {
6566
googleImplementation 'com.google.android.gms:play-services-cast:8.1.0'
6667
implementation 'com.sothree.slidinguppanel:library:3.0.0'
6768
implementation 'de.hdodenhof:circleimageview:1.2.1'
68-
implementation 'com.shehabic.droppy:Droppy:0.5.1@aar'
69-
implementation group: 'org.fourthline.cling', name: 'cling-core', version:'2.1.1'
70-
implementation group: 'org.fourthline.cling', name: 'cling-support', version:'2.1.1'
71-
implementation group: 'org.eclipse.jetty', name: 'jetty-server', version:'8.1.16.v20140903'
72-
implementation group: 'org.eclipse.jetty', name: 'jetty-servlet', version:'8.1.16.v20140903'
73-
implementation group: 'org.eclipse.jetty', name: 'jetty-client', version:'8.1.16.v20140903'
69+
implementation 'com.shehabic.droppy:Droppy:0.5.1@aar'
70+
implementation 'org.fourthline.cling:cling-core:2.1.1'
71+
implementation 'org.fourthline.cling:cling-support:2.1.1'
72+
implementation 'org.eclipse.jetty:jetty-server:8.1.16.v20140903'
73+
implementation 'org.eclipse.jetty:jetty-servlet:8.1.16.v20140903'
74+
implementation 'org.eclipse.jetty:jetty-client:8.1.16.v20140903'
75+
implementation 'com.android.support:support-vector-drawable:27.1.1'
7476
}

app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ private void populateTabs() {
651651
item.setChecked(true);
652652
}
653653
}
654-
drawerHeaderToggle.setImageResource(R.drawable.main_select_server_dark);
654+
drawerHeaderToggle.setImageResource(R.drawable.main_select_server);
655655

656656
showingTabs = true;
657657
}
@@ -667,7 +667,7 @@ private void populateServers() {
667667
}
668668
}
669669
drawerList.getMenu().setGroupCheckable(MENU_GROUP_SERVER, true, true);
670-
drawerHeaderToggle.setImageResource(R.drawable.main_select_tabs_dark);
670+
drawerHeaderToggle.setImageResource(R.drawable.main_select_tabs);
671671

672672
showingTabs = false;
673673
}

app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ protected void error(Throwable error) {
11111111
if(oldBookmark == null) {
11121112
int bookmark;
11131113
if(context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
1114-
bookmark = R.drawable.ic_menu_bookmark_dark;
1114+
bookmark = R.drawable.ic_menu_bookmark;
11151115
} else {
11161116
bookmark = DrawableTint.getDrawableRes(context, R.attr.bookmark);
11171117
}
@@ -1430,7 +1430,7 @@ public void onMetadataUpdate(Entry song, int fieldChange) {
14301430
rateBadButton.setImageDrawable(DrawableTint.getTintedDrawable(context, R.drawable.ic_action_rating_bad_selected));
14311431
} else {
14321432
if(context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
1433-
badRating = R.drawable.ic_action_rating_bad_dark;
1433+
badRating = R.drawable.ic_action_rating_bad;
14341434
} else {
14351435
badRating = DrawableTint.getDrawableRes(context, R.attr.rating_bad);
14361436
}
@@ -1441,7 +1441,7 @@ public void onMetadataUpdate(Entry song, int fieldChange) {
14411441
rateGoodButton.setImageDrawable(DrawableTint.getTintedDrawable(context, R.drawable.ic_action_rating_good_selected));
14421442
} else {
14431443
if(context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
1444-
goodRating = R.drawable.ic_action_rating_good_dark;
1444+
goodRating = R.drawable.ic_action_rating_good;
14451445
} else {
14461446
goodRating = DrawableTint.getDrawableRes(context, R.attr.rating_good);
14471447
}
@@ -1452,7 +1452,7 @@ public void onMetadataUpdate(Entry song, int fieldChange) {
14521452
bookmarkButton.setImageDrawable(DrawableTint.getTintedDrawable(context, R.drawable.ic_menu_bookmark_selected));
14531453
} else {
14541454
if(context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
1455-
bookmark = R.drawable.ic_menu_bookmark_dark;
1455+
bookmark = R.drawable.ic_menu_bookmark;
14561456
} else {
14571457
bookmark = DrawableTint.getDrawableRes(context, R.attr.bookmark);
14581458
}

app/src/main/java/github/daneren2005/dsub/provider/DSubWidgetProvider.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ private void performUpdate(Context context, DownloadService service, int[] appWi
212212

213213
// Set correct drawable for pause state
214214
if (playing) {
215-
views.setImageViewResource(R.id.control_play, R.drawable.media_pause_dark);
215+
views.setImageViewResource(R.id.control_play, R.drawable.widget_media_pause);
216216
} else {
217-
views.setImageViewResource(R.id.control_play, R.drawable.media_start_dark);
217+
views.setImageViewResource(R.id.control_play, R.drawable.widget_media_start);
218218
}
219219

220220
// Set the cover art

app/src/main/java/github/daneren2005/dsub/util/Notifications.java

+12-12
Original file line numberDiff line numberDiff line change
@@ -187,31 +187,31 @@ private static void setupViews(RemoteViews rv, Context context, MusicDirectory.E
187187
boolean persistent = Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_PERSISTENT_NOTIFICATION, false);
188188
if(persistent) {
189189
if(expanded) {
190-
rv.setImageViewResource(R.id.control_pause, playing ? R.drawable.notification_pause : R.drawable.notification_start);
190+
rv.setImageViewResource(R.id.control_pause, playing ? R.drawable.notification_media_pause : R.drawable.notification_media_start);
191191

192192
if(shouldFastForward) {
193-
rv.setImageViewResource(R.id.control_previous, R.drawable.notification_rewind);
194-
rv.setImageViewResource(R.id.control_next, R.drawable.notification_fastforward);
193+
rv.setImageViewResource(R.id.control_previous, R.drawable.notification_media_rewind);
194+
rv.setImageViewResource(R.id.control_next, R.drawable.notification_media_fastforward);
195195
} else {
196-
rv.setImageViewResource(R.id.control_previous, R.drawable.notification_backward);
197-
rv.setImageViewResource(R.id.control_next, R.drawable.notification_forward);
196+
rv.setImageViewResource(R.id.control_previous, R.drawable.notification_media_backward);
197+
rv.setImageViewResource(R.id.control_next, R.drawable.notification_media_forward);
198198
}
199199
} else {
200-
rv.setImageViewResource(R.id.control_previous, playing ? R.drawable.notification_pause : R.drawable.notification_start);
200+
rv.setImageViewResource(R.id.control_previous, playing ? R.drawable.notification_media_pause : R.drawable.notification_media_start);
201201
if(shouldFastForward) {
202-
rv.setImageViewResource(R.id.control_pause, R.drawable.notification_fastforward);
202+
rv.setImageViewResource(R.id.control_pause, R.drawable.notification_media_fastforward);
203203
} else {
204-
rv.setImageViewResource(R.id.control_pause, R.drawable.notification_forward);
204+
rv.setImageViewResource(R.id.control_pause, R.drawable.notification_media_forward);
205205
}
206206
rv.setImageViewResource(R.id.control_next, R.drawable.notification_close);
207207
}
208208
} else if(shouldFastForward) {
209-
rv.setImageViewResource(R.id.control_previous, R.drawable.notification_rewind);
210-
rv.setImageViewResource(R.id.control_next, R.drawable.notification_fastforward);
209+
rv.setImageViewResource(R.id.control_previous, R.drawable.notification_media_rewind);
210+
rv.setImageViewResource(R.id.control_next, R.drawable.notification_media_fastforward);
211211
} else {
212212
// Necessary for switching back since it appears to re-use the same layout
213-
rv.setImageViewResource(R.id.control_previous, R.drawable.notification_backward);
214-
rv.setImageViewResource(R.id.control_next, R.drawable.notification_forward);
213+
rv.setImageViewResource(R.id.control_previous, R.drawable.notification_media_backward);
214+
rv.setImageViewResource(R.id.control_next, R.drawable.notification_media_forward);
215215
}
216216

217217
// Create actions for media buttons

app/src/main/java/github/daneren2005/dsub/view/SongView.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,9 @@ protected void update() {
258258
moreButton.setImageResource(moreImage);
259259
this.moreImage = moreImage;
260260
}
261-
} else if(this.moreImage != R.drawable.download_none_light) {
261+
} else if(this.moreImage != R.drawable.download_none) {
262262
moreButton.setImageResource(DrawableTint.getDrawableRes(context, R.attr.download_none));
263-
this.moreImage = R.drawable.download_none_light;
263+
this.moreImage = R.drawable.download_none;
264264
}
265265

266266
if (downloadFile.isDownloading() && !downloadFile.isDownloadCancelled() && partialFileExists) {
Binary file not shown.
Binary file not shown.
-982 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
-992 Bytes
Binary file not shown.
-514 Bytes
Binary file not shown.
-595 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
-753 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-461 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-476 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-612 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-969 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-707 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-1009 Bytes
Binary file not shown.
Binary file not shown.
-590 Bytes
Binary file not shown.
-595 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-668 Bytes
Binary file not shown.
-694 Bytes
Binary file not shown.
-544 Bytes
Binary file not shown.
-546 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
-454 Bytes
Binary file not shown.
-517 Bytes
Binary file not shown.
Binary file not shown.
-819 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
-704 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
-673 Bytes
Binary file not shown.
-310 Bytes
Binary file not shown.
-333 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
-477 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-266 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-347 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-360 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-579 Bytes
Binary file not shown.
-664 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-447 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-316 Bytes
Binary file not shown.
-324 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-660 Bytes
Binary file not shown.
Binary file not shown.
-538 Bytes
Binary file not shown.
-586 Bytes
Binary file not shown.
-264 Bytes
Binary file not shown.
-266 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
-292 Bytes
Binary file not shown.
-328 Bytes
Binary file not shown.
Binary file not shown.
-623 Bytes
Binary file not shown.

app/src/main/res/drawable-v21/notification_backward.xml

-4
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<bitmap
3-
xmlns:android="http://schemas.android.com/apk/res/android"
4-
android:src="@drawable/notification_close_light"/>
1+
<vector android:height="24dp"
2+
android:viewportHeight="24.0" android:viewportWidth="24.0"
3+
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@color/lightElement" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
5+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android">
3+
<size android:width="1dip" />
4+
<solid android:color="@android:color/darker_gray" />
5+
</shape>

app/src/main/res/drawable-v21/notification_fastforward.xml

-4
This file was deleted.

app/src/main/res/drawable-v21/notification_forward.xml

-4
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:height="24dp"
2+
android:viewportHeight="24.0" android:viewportWidth="24.0"
3+
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@color/lightElement" android:pathData="M6,6h2v12L6,18zM9.5,12l8.5,6L18,6z"/>
5+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:height="24dp"
2+
android:viewportHeight="24.0" android:viewportWidth="24.0"
3+
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@color/lightElement" android:pathData="M4,18l8.5,-6L4,6v12zM13,6v12l8.5,-6L13,6z"/>
5+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:height="24dp"
2+
android:viewportHeight="24.0" android:viewportWidth="24.0"
3+
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@color/lightElement" android:pathData="M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z"/>
5+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:height="24dp"
2+
android:viewportHeight="24.0" android:viewportWidth="24.0"
3+
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@color/lightElement" android:pathData="M6,19h4L10,5L6,5v14zM14,5v14h4L18,5h-4z"/>
5+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:height="24dp"
2+
android:viewportHeight="24.0" android:viewportWidth="24.0"
3+
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@color/lightElement" android:pathData="M11,18L11,6l-8.5,6 8.5,6zM11.5,12l8.5,6L20,6l-8.5,6z"/>
5+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:height="24dp"
2+
android:viewportHeight="24.0" android:viewportWidth="24.0"
3+
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@color/lightElement" android:pathData="M8,5v14l11,-7z"/>
5+
</vector>

app/src/main/res/drawable-v21/notification_pause.xml

-4
This file was deleted.

app/src/main/res/drawable-v21/notification_rewind.xml

-4
This file was deleted.

app/src/main/res/drawable-v21/notification_start.xml

-4
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-575 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-575 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-952 Bytes
Binary file not shown.
-1022 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)