Code clean

main
h4h13 2020-02-22 01:19:59 +05:30
parent bad40d4ccd
commit 2dfb1daf04
3 changed files with 0 additions and 19 deletions

View File

@ -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

View File

@ -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)
}

View File

@ -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();