Added night mode default drwable
|
@ -16,8 +16,10 @@ package code.name.monkey.retromusic.glide;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
import com.bumptech.glide.BitmapRequestBuilder;
|
import com.bumptech.glide.BitmapRequestBuilder;
|
||||||
import com.bumptech.glide.DrawableRequestBuilder;
|
import com.bumptech.glide.DrawableRequestBuilder;
|
||||||
|
@ -29,6 +31,8 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||||
import com.bumptech.glide.load.resource.drawable.GlideDrawable;
|
import com.bumptech.glide.load.resource.drawable.GlideDrawable;
|
||||||
import com.bumptech.glide.request.target.Target;
|
import com.bumptech.glide.request.target.Target;
|
||||||
|
|
||||||
|
import code.name.monkey.appthemehelper.ThemeStore;
|
||||||
|
import code.name.monkey.appthemehelper.util.TintHelper;
|
||||||
import code.name.monkey.retromusic.App;
|
import code.name.monkey.retromusic.App;
|
||||||
import code.name.monkey.retromusic.R;
|
import code.name.monkey.retromusic.R;
|
||||||
import code.name.monkey.retromusic.glide.artistimage.ArtistImage;
|
import code.name.monkey.retromusic.glide.artistimage.ArtistImage;
|
||||||
|
@ -65,15 +69,16 @@ public class ArtistGlideRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Builder {
|
public static class Builder {
|
||||||
|
|
||||||
final Artist artist;
|
final Artist artist;
|
||||||
final RequestManager requestManager;
|
final RequestManager requestManager;
|
||||||
|
private Drawable error;
|
||||||
private boolean forceDownload;
|
private boolean forceDownload;
|
||||||
private boolean noCustomImage;
|
private boolean noCustomImage;
|
||||||
|
|
||||||
private Builder(@NonNull RequestManager requestManager, Artist artist) {
|
private Builder(@NonNull RequestManager requestManager, Artist artist) {
|
||||||
this.requestManager = requestManager;
|
this.requestManager = requestManager;
|
||||||
this.artist = artist;
|
this.artist = artist;
|
||||||
|
error = TintHelper.createTintedDrawable(ContextCompat.getDrawable(App.Companion.getContext(), R.drawable.default_artist_art), ThemeStore.Companion.accentColor(App.Companion.getContext()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Builder from(@NonNull RequestManager requestManager, Artist artist) {
|
public static Builder from(@NonNull RequestManager requestManager, Artist artist) {
|
||||||
|
@ -89,6 +94,7 @@ public class ArtistGlideRequest {
|
||||||
return createBaseRequest(requestManager, artist, noCustomImage, forceDownload)
|
return createBaseRequest(requestManager, artist, noCustomImage, forceDownload)
|
||||||
.diskCacheStrategy(DEFAULT_DISK_CACHE_STRATEGY)
|
.diskCacheStrategy(DEFAULT_DISK_CACHE_STRATEGY)
|
||||||
.animate(DEFAULT_ANIMATION)
|
.animate(DEFAULT_ANIMATION)
|
||||||
|
.error(DEFAULT_ERROR_IMAGE)
|
||||||
.priority(Priority.LOW)
|
.priority(Priority.LOW)
|
||||||
.override(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL)
|
.override(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL)
|
||||||
.dontTransform()
|
.dontTransform()
|
||||||
|
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 932 B After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/drawable-night-hdpi/default_album_art.webp
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
app/src/main/res/drawable-night-hdpi/default_artist_art.webp
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
app/src/main/res/drawable-night-hdpi/default_audio_art.webp
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable-night-mdpi/default_album_art.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/drawable-night-mdpi/default_artist_art.webp
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/drawable-night-mdpi/default_audio_art.webp
Normal file
After Width: | Height: | Size: 932 B |
BIN
app/src/main/res/drawable-night-xhdpi/default_album_art.webp
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
app/src/main/res/drawable-night-xhdpi/default_artist_art.webp
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
app/src/main/res/drawable-night-xhdpi/default_audio_art.webp
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/drawable-night-xxhdpi/default_album_art.webp
Normal file
After Width: | Height: | Size: 8.8 KiB |
BIN
app/src/main/res/drawable-night-xxhdpi/default_artist_art.webp
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
app/src/main/res/drawable-night-xxhdpi/default_audio_art.webp
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
app/src/main/res/drawable-night-xxxhdpi/default_album_art.webp
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable-night-xxxhdpi/default_artist_art.webp
Normal file
After Width: | Height: | Size: 7.9 KiB |
BIN
app/src/main/res/drawable-night-xxxhdpi/default_audio_art.webp
Normal file
After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 8 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 10 KiB |