From 2dfb1daf04995d591fbd62e4482aa523fb8a8da4 Mon Sep 17 00:00:00 2001 From: h4h13 Date: Sat, 22 Feb 2020 01:19:59 +0530 Subject: [PATCH] Code clean --- .../retromusic/activities/AlbumDetailsActivity.kt | 1 - .../retromusic/activities/ArtistDetailActivity.kt | 14 -------------- .../monkey/retromusic/util/RetroColorUtil.java | 4 ---- 3 files changed, 19 deletions(-) diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/AlbumDetailsActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/AlbumDetailsActivity.kt index 64262a28..16409717 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/AlbumDetailsActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/AlbumDetailsActivity.kt @@ -289,7 +289,6 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView, C MaterialUtil.setTint(button = playAction, color = buttonColor) val toolbarColor = ATHUtil.resolveColor(this, R.attr.colorSurface) - //status_bar.setBackgroundColor(toolbarColor) toolbar.setBackgroundColor(toolbarColor) setSupportActionBar(toolbar) supportActionBar?.title = null diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/ArtistDetailActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/ArtistDetailActivity.kt index a2e822fb..30a80ee0 100755 --- a/app/src/main/java/code/name/monkey/retromusic/activities/ArtistDetailActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/ArtistDetailActivity.kt @@ -57,7 +57,6 @@ import kotlinx.android.synthetic.main.activity_artist_details.artistTitle import kotlinx.android.synthetic.main.activity_artist_details.image import kotlinx.android.synthetic.main.activity_artist_details.text import kotlinx.android.synthetic.main.activity_artist_details.toolbar -import java.text.DecimalFormat import java.util.Locale import javax.inject.Inject @@ -281,24 +280,11 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView, MaterialUtil.setTint(button = playAction, color = buttonColor) val toolbarColor = ATHUtil.resolveColor(this, R.attr.colorSurface) - //status_bar.setBackgroundColor(toolbarColor) toolbar.setBackgroundColor(toolbarColor) setSupportActionBar(toolbar) supportActionBar?.title = null } - private fun numberFormat(count: Float): String { - val prefixes = arrayOf("", "K", "M", "B", "T", "P", "E") - var index = 0 - var finalCount = count - while (finalCount / 1000 >= 1) { - finalCount /= 1000 - index++ - } - val decimal = DecimalFormat("#.##") - return String.format("%s %s", decimal.format(finalCount), prefixes[index]) - } - override fun onOptionsItemSelected(item: MenuItem): Boolean { return handleSortOrderMenuItem(item) } diff --git a/app/src/main/java/code/name/monkey/retromusic/util/RetroColorUtil.java b/app/src/main/java/code/name/monkey/retromusic/util/RetroColorUtil.java index 0b278172..7e93bff2 100644 --- a/app/src/main/java/code/name/monkey/retromusic/util/RetroColorUtil.java +++ b/app/src/main/java/code/name/monkey/retromusic/util/RetroColorUtil.java @@ -43,10 +43,6 @@ public class RetroColorUtil { return Color.HSVToColor(hsv); } - public static int toolbarColor(@NonNull Context context) { - return ATHUtil.INSTANCE.resolveColor(context, R.attr.colorButtonNormal); - } - @Nullable public static Palette generatePalette(@Nullable Bitmap bitmap) { return bitmap == null ? null : Palette.from(bitmap).clearFilters().generate();