From 005d8ee6e8b932e080666aa239bfcf86b328f30b Mon Sep 17 00:00:00 2001 From: h4h13 Date: Thu, 1 Aug 2019 19:48:31 +0530 Subject: [PATCH] Improved color performance --- app/src/main/assets/index.html | 6 ------ .../monkey/retromusic/glide/RetroMusicColoredTarget.kt | 9 ++------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/app/src/main/assets/index.html b/app/src/main/assets/index.html index 1bea4ec6..e683c4c6 100644 --- a/app/src/main/assets/index.html +++ b/app/src/main/assets/index.html @@ -31,8 +31,6 @@

VinylMusicPlayer by Adrien Poupa

RxJava by RxJava authors

Material Dialogs and Cab by Aidan Michael Follestad

-

Calligraphy by RxJava authors

-

Android-Snowfall by JetRadar

Android Sliding Up Panelby The Umano Team

AOSP Support Librariesby AOSP contributors

Glide by Sam Judd

@@ -40,16 +38,12 @@

Material Contextual Action Bar by Aidan Michael Follestad

OkHttp by Square team

CircleImageView by Henning Dodenhof

-

Transitions Everywhere by Henning Dodenhof

MaterialProgressBar by Zhang Hai

Android In-App Billing v3 Library by Henning Dodenhof

Advanced RecyclerView by Haruki Hasegawa

Android-ObservableScrollView by Soichiro Kashima

-

BottomNavigationViewEx by Ittianyu

-

Swipe-Button by EBANX Team

Font used(CIRCULAR STD BOOK FONT) by NIELSON CAETANO

Icons by Austin Andrews

-

Croller by Harjot Oberai

Material Design City Wallpaper

diff --git a/app/src/main/java/code/name/monkey/retromusic/glide/RetroMusicColoredTarget.kt b/app/src/main/java/code/name/monkey/retromusic/glide/RetroMusicColoredTarget.kt index 3cc57790..ec49787f 100644 --- a/app/src/main/java/code/name/monkey/retromusic/glide/RetroMusicColoredTarget.kt +++ b/app/src/main/java/code/name/monkey/retromusic/glide/RetroMusicColoredTarget.kt @@ -16,7 +16,6 @@ package code.name.monkey.retromusic.glide import android.graphics.drawable.Drawable import android.widget.ImageView -import androidx.palette.graphics.Palette import code.name.monkey.appthemehelper.util.ATHUtil import code.name.monkey.retromusic.R import code.name.monkey.retromusic.glide.palette.BitmapPaletteTarget @@ -44,16 +43,12 @@ abstract class RetroMusicColoredTarget(view: ImageView) : BitmapPaletteTarget(vi glideAnimation: Transition?) { super.onResourceReady(resource, glideAnimation) - val defaultColor = defaultFooterColor - val primaryColor = getColor(resource.palette, defaultColor) - val dominantColor = getDominantColor(resource.bitmap, defaultColor) - onColorReady(if (PreferenceUtil.getInstance().isDominantColor) - dominantColor + getDominantColor(resource.bitmap, defaultColor) else - primaryColor) + getColor(resource.palette, defaultColor)) } abstract fun onColorReady(color: Int)