Removed the placeholder png for the album and made the gradient in the various placeholders softer

This commit is contained in:
antonio 2023-03-14 11:23:35 +01:00
parent 47be372399
commit 74ff105eee
4 changed files with 4 additions and 9 deletions

View file

@ -12,7 +12,6 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.signature.ObjectKey; import com.bumptech.glide.signature.ObjectKey;
import com.cappielloantonio.play.App; import com.cappielloantonio.play.App;
import com.cappielloantonio.play.R;
import com.cappielloantonio.play.util.Preferences; import com.cappielloantonio.play.util.Preferences;
import com.google.android.material.elevation.SurfaceColors; import com.google.android.material.elevation.SurfaceColors;
@ -67,17 +66,13 @@ public class CustomGlideRequest {
public static class Builder { public static class Builder {
private final RequestManager requestManager; private final RequestManager requestManager;
private final Object item; private Object item;
private Builder(Context context, String item) { private Builder(Context context, String item) {
this.requestManager = Glide.with(context); this.requestManager = Glide.with(context);
if (Preferences.isDataSavingMode()) { if (item != null && !Preferences.isDataSavingMode()) {
this.item = R.drawable.default_album_art;
} else if (item != null) {
this.item = createUrl(item, Preferences.getImageSize()); this.item = createUrl(item, Preferences.getImageSize());
} else {
this.item = R.drawable.default_album_art;
} }
requestManager.applyDefaultRequestOptions(createRequestOptions(context, item)); requestManager.applyDefaultRequestOptions(createRequestOptions(context, item));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View file

@ -3,6 +3,6 @@
<gradient <gradient
android:angle="270" android:angle="270"
android:dither="true" android:dither="true"
android:endColor="#FF121212" android:endColor="#80000000"
android:startColor="#00000000" /> android:startColor="#00000000" />
</shape> </shape>

View file

@ -3,6 +3,6 @@
<gradient <gradient
android:angle="180" android:angle="180"
android:dither="true" android:dither="true"
android:endColor="#FF000000" android:endColor="#80000000"
android:startColor="#00000000" /> android:startColor="#00000000" />
</shape> </shape>