diff --git a/app/src/main/java/code/name/monkey/retromusic/glide/RetroGlideExtension.java b/app/src/main/java/code/name/monkey/retromusic/glide/RetroGlideExtension.java index ef4a333a..fd2e74c9 100644 --- a/app/src/main/java/code/name/monkey/retromusic/glide/RetroGlideExtension.java +++ b/app/src/main/java/code/name/monkey/retromusic/glide/RetroGlideExtension.java @@ -14,6 +14,8 @@ package code.name.monkey.retromusic.glide; +import androidx.annotation.NonNull; + import com.bumptech.glide.GenericTransitionOptions; import com.bumptech.glide.Priority; import com.bumptech.glide.RequestBuilder; @@ -26,7 +28,6 @@ import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.target.Target; import com.bumptech.glide.signature.MediaStoreSignature; -import androidx.annotation.NonNull; import code.name.monkey.retromusic.App; import code.name.monkey.retromusic.R; import code.name.monkey.retromusic.glide.artistimage.ArtistImage; @@ -44,13 +45,14 @@ public final class RetroGlideExtension { private RetroGlideExtension() { } + @NonNull @GlideType(BitmapPaletteWrapper.class) - public static void asBitmapPalette(RequestBuilder requestBuilder) { + public static void asBitmapPalette(@NonNull RequestBuilder requestBuilder) { } @NonNull @GlideOption - public static RequestOptions artistOptions(@NonNull RequestOptions requestOptions, Artist artist) { + public static RequestOptions artistOptions(@NonNull RequestOptions requestOptions, @NonNull Artist artist) { return requestOptions .diskCacheStrategy(DiskCacheStrategy.RESOURCE) .error(R.drawable.default_artist_art) @@ -62,7 +64,7 @@ public final class RetroGlideExtension { @GlideOption @NonNull - public static RequestOptions songOptions(@NonNull RequestOptions requestOptions, Song song) { + public static RequestOptions songOptions(@NonNull RequestOptions requestOptions, @NonNull Song song) { return requestOptions .diskCacheStrategy(DiskCacheStrategy.NONE) .error(R.drawable.default_album_art) diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/activities/ArtistDetailActivity.kt b/app/src/main/java/code/name/monkey/retromusic/ui/activities/ArtistDetailActivity.kt index 74260809..2939f143 100755 --- a/app/src/main/java/code/name/monkey/retromusic/ui/activities/ArtistDetailActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/ui/activities/ArtistDetailActivity.kt @@ -51,7 +51,7 @@ import kotlin.collections.ArrayList class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContract.ArtistsDetailsView { private var biography: Spanned? = null - private var artist: Artist? = null + private lateinit var artist: Artist private var lastFMRestClient: LastFMRestClient? = null private var artistDetailsPresenter: ArtistDetailsPresenter? = null private lateinit var songAdapter: SimpleSongAdapter diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/adapter/album/AlbumCoverPagerAdapter.kt b/app/src/main/java/code/name/monkey/retromusic/ui/adapter/album/AlbumCoverPagerAdapter.kt index 3051ebc7..f4d7b63a 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/adapter/album/AlbumCoverPagerAdapter.kt +++ b/app/src/main/java/code/name/monkey/retromusic/ui/adapter/album/AlbumCoverPagerAdapter.kt @@ -64,7 +64,7 @@ class AlbumCoverPagerAdapter(fm: FragmentManager, private val dataSet: ArrayList lateinit var albumCover: ImageView private var isColorReady: Boolean = false private var color: Int = 0 - private var song: Song? = null + private lateinit var song: Song private var colorReceiver: ColorReceiver? = null private var request: Int = 0 @@ -85,7 +85,7 @@ class AlbumCoverPagerAdapter(fm: FragmentManager, private val dataSet: ArrayList override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) if (arguments != null) { - song = arguments!!.getParcelable(SONG_ARG) + song = arguments!!.getParcelable(SONG_ARG)!! } } diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/fragments/settings/ThemeSettingsFragment.kt b/app/src/main/java/code/name/monkey/retromusic/ui/fragments/settings/ThemeSettingsFragment.kt index 11f50405..58cc287e 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/fragments/settings/ThemeSettingsFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/ui/fragments/settings/ThemeSettingsFragment.kt @@ -95,7 +95,11 @@ class ThemeSettingsFragment : AbsSettingsFragment() { title(code.name.monkey.retromusic.R.string.accent_color) positiveButton(R.string.set) colorChooser(colors = ACCENT_COLORS, allowCustomArgb = true, subColors = ACCENT_COLORS_SUB) { _, color -> - ThemeStore.editTheme(context).accentColor(color).commit() + var colorFinal = Color.BLACK; + if (!ColorUtil.isColorSaturated(color)) { + colorFinal = color; + } + ThemeStore.editTheme(context).accentColor(colorFinal).commit() if (VersionUtils.hasNougatMR()) DynamicShortcutManager(context).updateDynamicShortcuts() activity!!.recreate() diff --git a/app/src/main/res/layout/activity_user_info.xml b/app/src/main/res/layout/activity_user_info.xml index 4773c572..597f32d8 100644 --- a/app/src/main/res/layout/activity_user_info.xml +++ b/app/src/main/res/layout/activity_user_info.xml @@ -1,9 +1,9 @@ + android:textAppearance="@style/TextAppearance.AppCompat.Subhead" + tools:text="@string/song" />