Added play and shuffle buttons
This commit is contained in:
parent
0f59221f4e
commit
02d9eb765d
22 changed files with 266 additions and 256 deletions
|
@ -10,7 +10,6 @@ import android.view.animation.AnimationUtils
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import androidx.core.app.ActivityCompat
|
import androidx.core.app.ActivityCompat
|
||||||
import androidx.core.util.Pair
|
import androidx.core.util.Pair
|
||||||
import androidx.core.widget.NestedScrollView
|
|
||||||
import androidx.recyclerview.widget.DefaultItemAnimator
|
import androidx.recyclerview.widget.DefaultItemAnimator
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
@ -20,6 +19,11 @@ import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
||||||
import code.name.monkey.appthemehelper.util.TintHelper
|
import code.name.monkey.appthemehelper.util.TintHelper
|
||||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
|
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
|
||||||
|
import code.name.monkey.retromusic.activities.tageditor.AbsTagEditorActivity
|
||||||
|
import code.name.monkey.retromusic.activities.tageditor.AlbumTagEditorActivity
|
||||||
|
import code.name.monkey.retromusic.adapter.album.HorizontalAlbumAdapter
|
||||||
|
import code.name.monkey.retromusic.adapter.song.SimpleSongAdapter
|
||||||
import code.name.monkey.retromusic.dialogs.AddToPlaylistDialog
|
import code.name.monkey.retromusic.dialogs.AddToPlaylistDialog
|
||||||
import code.name.monkey.retromusic.dialogs.DeleteSongsDialog
|
import code.name.monkey.retromusic.dialogs.DeleteSongsDialog
|
||||||
import code.name.monkey.retromusic.glide.GlideApp
|
import code.name.monkey.retromusic.glide.GlideApp
|
||||||
|
@ -32,11 +36,6 @@ import code.name.monkey.retromusic.misc.AppBarStateChangeListener
|
||||||
import code.name.monkey.retromusic.model.Album
|
import code.name.monkey.retromusic.model.Album
|
||||||
import code.name.monkey.retromusic.mvp.contract.AlbumDetailsContract
|
import code.name.monkey.retromusic.mvp.contract.AlbumDetailsContract
|
||||||
import code.name.monkey.retromusic.mvp.presenter.AlbumDetailsPresenter
|
import code.name.monkey.retromusic.mvp.presenter.AlbumDetailsPresenter
|
||||||
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
|
|
||||||
import code.name.monkey.retromusic.activities.tageditor.AbsTagEditorActivity
|
|
||||||
import code.name.monkey.retromusic.activities.tageditor.AlbumTagEditorActivity
|
|
||||||
import code.name.monkey.retromusic.adapter.album.HorizontalAlbumAdapter
|
|
||||||
import code.name.monkey.retromusic.adapter.song.SimpleSongAdapter
|
|
||||||
import code.name.monkey.retromusic.util.MusicUtil
|
import code.name.monkey.retromusic.util.MusicUtil
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil
|
import code.name.monkey.retromusic.util.NavigationUtil
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
|
@ -55,8 +54,7 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsContrac
|
||||||
private lateinit var simpleSongAdapter: SimpleSongAdapter
|
private lateinit var simpleSongAdapter: SimpleSongAdapter
|
||||||
private var disposable = CompositeDisposable()
|
private var disposable = CompositeDisposable()
|
||||||
|
|
||||||
var album: Album? = null
|
private lateinit var album: Album
|
||||||
private set
|
|
||||||
|
|
||||||
private val savedSortOrder: String
|
private val savedSortOrder: String
|
||||||
get() = PreferenceUtil.getInstance().albumDetailSongSortOrder
|
get() = PreferenceUtil.getInstance().albumDetailSongSortOrder
|
||||||
|
@ -80,7 +78,6 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsContrac
|
||||||
setLightNavigationBar(true)
|
setLightNavigationBar(true)
|
||||||
setNavigationbarColorAuto()
|
setNavigationbarColorAuto()
|
||||||
|
|
||||||
|
|
||||||
ActivityCompat.postponeEnterTransition(this)
|
ActivityCompat.postponeEnterTransition(this)
|
||||||
|
|
||||||
val albumId = intent.getIntExtra(EXTRA_ALBUM_ID, -1)
|
val albumId = intent.getIntExtra(EXTRA_ALBUM_ID, -1)
|
||||||
|
@ -90,23 +87,16 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsContrac
|
||||||
setupRecyclerView()
|
setupRecyclerView()
|
||||||
setupToolbarMarginHeight()
|
setupToolbarMarginHeight()
|
||||||
|
|
||||||
contentContainer.setOnScrollChangeListener { _: NestedScrollView?, _: Int, scrollY: Int, _: Int, oldScrollY: Int ->
|
|
||||||
run {
|
|
||||||
if (scrollY > oldScrollY) {
|
|
||||||
actionShuffleAll.shrink(true)
|
|
||||||
}
|
|
||||||
if (scrollY < oldScrollY) {
|
|
||||||
actionShuffleAll.extend(true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
actionShuffleAll.setOnClickListener { MusicPlayerRemote.openAndShuffleQueue(album!!.songs!!, true) }
|
|
||||||
|
|
||||||
artistImage = findViewById(R.id.artistImage)
|
artistImage = findViewById(R.id.artistImage)
|
||||||
artistImage.setOnClickListener {
|
artistImage.setOnClickListener {
|
||||||
val artistPairs = arrayOf<Pair<*, *>>(Pair.create(image, resources.getString(R.string.transition_artist_image)))
|
val artistPairs = arrayOf<Pair<*, *>>(Pair.create(image, resources.getString(R.string.transition_artist_image)))
|
||||||
NavigationUtil.goToArtist(this, album!!.artistId, *artistPairs)
|
NavigationUtil.goToArtist(this, album.artistId, *artistPairs)
|
||||||
|
}
|
||||||
|
playAction.apply {
|
||||||
|
setOnClickListener { MusicPlayerRemote.openQueue(album.songs!!, 0, true) }
|
||||||
|
}
|
||||||
|
shuffleAction.apply {
|
||||||
|
setOnClickListener { MusicPlayerRemote.openAndShuffleQueue(album.songs!!, true) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,13 +134,13 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsContrac
|
||||||
|
|
||||||
appBarLayout?.apply {
|
appBarLayout?.apply {
|
||||||
addOnOffsetChangedListener(object : AppBarStateChangeListener() {
|
addOnOffsetChangedListener(object : AppBarStateChangeListener() {
|
||||||
override fun onStateChanged(appBarLayout: AppBarLayout, state: AppBarStateChangeListener.State) {
|
override fun onStateChanged(appBarLayout: AppBarLayout, state: State) {
|
||||||
val color: Int = when (state) {
|
val color: Int = when (state) {
|
||||||
AppBarStateChangeListener.State.COLLAPSED -> {
|
State.COLLAPSED -> {
|
||||||
setLightStatusbar(ColorUtil.isColorLight(ThemeStore.primaryColor(this@AlbumDetailsActivity)))
|
setLightStatusbar(ColorUtil.isColorLight(ThemeStore.primaryColor(this@AlbumDetailsActivity)))
|
||||||
ThemeStore.primaryColor(this@AlbumDetailsActivity)
|
ThemeStore.primaryColor(this@AlbumDetailsActivity)
|
||||||
}
|
}
|
||||||
AppBarStateChangeListener.State.EXPANDED, AppBarStateChangeListener.State.IDLE -> {
|
State.EXPANDED, State.IDLE -> {
|
||||||
setLightStatusbar(false)
|
setLightStatusbar(false)
|
||||||
Color.TRANSPARENT
|
Color.TRANSPARENT
|
||||||
}
|
}
|
||||||
|
@ -242,9 +232,9 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsContrac
|
||||||
private fun loadAlbumCover() {
|
private fun loadAlbumCover() {
|
||||||
GlideApp.with(this)
|
GlideApp.with(this)
|
||||||
.asBitmapPalette()
|
.asBitmapPalette()
|
||||||
.load(RetroGlideExtension.getSongModel(album!!.safeGetFirstSong()))
|
.load(RetroGlideExtension.getSongModel(album.safeGetFirstSong()))
|
||||||
.transition(RetroGlideExtension.getDefaultTransition())
|
.transition(RetroGlideExtension.getDefaultTransition())
|
||||||
.songOptions(album!!.safeGetFirstSong())
|
.songOptions(album.safeGetFirstSong())
|
||||||
.dontAnimate()
|
.dontAnimate()
|
||||||
.into(object : RetroMusicColoredTarget(image as ImageView) {
|
.into(object : RetroMusicColoredTarget(image as ImageView) {
|
||||||
override fun onColorReady(color: Int) {
|
override fun onColorReady(color: Int) {
|
||||||
|
@ -259,10 +249,14 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsContrac
|
||||||
songTitle.setTextColor(themeColor)
|
songTitle.setTextColor(themeColor)
|
||||||
moreTitle.setTextColor(themeColor)
|
moreTitle.setTextColor(themeColor)
|
||||||
|
|
||||||
actionShuffleAll.backgroundTintList = ColorStateList.valueOf(themeColor)
|
playAction.backgroundTintList = ColorStateList.valueOf(themeColor)
|
||||||
|
shuffleAction.backgroundTintList = ColorStateList.valueOf(themeColor)
|
||||||
ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(themeColor))).apply {
|
ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(themeColor))).apply {
|
||||||
actionShuffleAll.setTextColor(this)
|
playAction.setTextColor(this)
|
||||||
actionShuffleAll.iconTint = this
|
playAction.iconTint = this
|
||||||
|
|
||||||
|
shuffleAction.setTextColor(this)
|
||||||
|
shuffleAction.iconTint = this
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,12 +298,12 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsContrac
|
||||||
}
|
}
|
||||||
R.id.action_tag_editor -> {
|
R.id.action_tag_editor -> {
|
||||||
val intent = Intent(this, AlbumTagEditorActivity::class.java)
|
val intent = Intent(this, AlbumTagEditorActivity::class.java)
|
||||||
intent.putExtra(AbsTagEditorActivity.EXTRA_ID, album!!.id)
|
intent.putExtra(AbsTagEditorActivity.EXTRA_ID, album.id)
|
||||||
startActivityForResult(intent, TAG_EDITOR_REQUEST)
|
startActivityForResult(intent, TAG_EDITOR_REQUEST)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
R.id.action_go_to_artist -> {
|
R.id.action_go_to_artist -> {
|
||||||
NavigationUtil.goToArtist(this, album!!.artistId)
|
NavigationUtil.goToArtist(this, album.artistId)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
/*Sort*/
|
/*Sort*/
|
||||||
|
|
|
@ -4,6 +4,7 @@ import android.app.Activity
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.res.ColorStateList
|
import android.content.res.ColorStateList
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
|
import android.graphics.drawable.Drawable
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.text.Html
|
import android.text.Html
|
||||||
|
@ -13,7 +14,6 @@ import android.view.*
|
||||||
import android.view.animation.AnimationUtils
|
import android.view.animation.AnimationUtils
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.core.app.ActivityCompat
|
import androidx.core.app.ActivityCompat
|
||||||
import androidx.core.widget.NestedScrollView
|
|
||||||
import androidx.recyclerview.widget.DefaultItemAnimator
|
import androidx.recyclerview.widget.DefaultItemAnimator
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
@ -23,6 +23,10 @@ import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
||||||
import code.name.monkey.appthemehelper.util.TintHelper
|
import code.name.monkey.appthemehelper.util.TintHelper
|
||||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
|
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
|
||||||
|
import code.name.monkey.retromusic.adapter.album.AlbumAdapter
|
||||||
|
import code.name.monkey.retromusic.adapter.album.HorizontalAlbumAdapter
|
||||||
|
import code.name.monkey.retromusic.adapter.song.SimpleSongAdapter
|
||||||
import code.name.monkey.retromusic.dialogs.AddToPlaylistDialog
|
import code.name.monkey.retromusic.dialogs.AddToPlaylistDialog
|
||||||
import code.name.monkey.retromusic.glide.GlideApp
|
import code.name.monkey.retromusic.glide.GlideApp
|
||||||
import code.name.monkey.retromusic.glide.RetroGlideExtension
|
import code.name.monkey.retromusic.glide.RetroGlideExtension
|
||||||
|
@ -34,10 +38,6 @@ import code.name.monkey.retromusic.mvp.contract.ArtistDetailContract
|
||||||
import code.name.monkey.retromusic.mvp.presenter.ArtistDetailsPresenter
|
import code.name.monkey.retromusic.mvp.presenter.ArtistDetailsPresenter
|
||||||
import code.name.monkey.retromusic.rest.LastFMRestClient
|
import code.name.monkey.retromusic.rest.LastFMRestClient
|
||||||
import code.name.monkey.retromusic.rest.model.LastFmArtist
|
import code.name.monkey.retromusic.rest.model.LastFmArtist
|
||||||
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
|
|
||||||
import code.name.monkey.retromusic.adapter.album.AlbumAdapter
|
|
||||||
import code.name.monkey.retromusic.adapter.album.HorizontalAlbumAdapter
|
|
||||||
import code.name.monkey.retromusic.adapter.song.SimpleSongAdapter
|
|
||||||
import code.name.monkey.retromusic.util.*
|
import code.name.monkey.retromusic.util.*
|
||||||
import com.google.android.material.appbar.AppBarLayout
|
import com.google.android.material.appbar.AppBarLayout
|
||||||
import kotlinx.android.synthetic.main.activity_artist_content.*
|
import kotlinx.android.synthetic.main.activity_artist_content.*
|
||||||
|
@ -53,7 +53,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
|
||||||
private var biography: Spanned? = null
|
private var biography: Spanned? = null
|
||||||
private lateinit var artist: Artist
|
private lateinit var artist: Artist
|
||||||
private var lastFMRestClient: LastFMRestClient? = null
|
private var lastFMRestClient: LastFMRestClient? = null
|
||||||
private var artistDetailsPresenter: ArtistDetailsPresenter? = null
|
private lateinit var artistDetailsPresenter: ArtistDetailsPresenter
|
||||||
private lateinit var songAdapter: SimpleSongAdapter
|
private lateinit var songAdapter: SimpleSongAdapter
|
||||||
private lateinit var albumAdapter: AlbumAdapter
|
private lateinit var albumAdapter: AlbumAdapter
|
||||||
private var forceDownload: Boolean = false
|
private var forceDownload: Boolean = false
|
||||||
|
@ -64,7 +64,6 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
|
||||||
window.enterTransition = slide
|
window.enterTransition = slide
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun createContentView(): View {
|
override fun createContentView(): View {
|
||||||
return wrapSlidingMusicPanel(R.layout.activity_artist_details)
|
return wrapSlidingMusicPanel(R.layout.activity_artist_details)
|
||||||
}
|
}
|
||||||
|
@ -85,17 +84,13 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
|
||||||
setUpViews()
|
setUpViews()
|
||||||
|
|
||||||
artistDetailsPresenter = ArtistDetailsPresenter(this, intent.extras!!)
|
artistDetailsPresenter = ArtistDetailsPresenter(this, intent.extras!!)
|
||||||
artistDetailsPresenter!!.subscribe()
|
artistDetailsPresenter.subscribe()
|
||||||
|
|
||||||
contentContainer.setOnScrollChangeListener { _: NestedScrollView?, _: Int, scrollY: Int, _: Int, oldScrollY: Int ->
|
playAction.apply {
|
||||||
run {
|
setOnClickListener { MusicPlayerRemote.openQueue(artist.songs, 0, true) }
|
||||||
if (scrollY > oldScrollY) {
|
|
||||||
actionShuffleAll.shrink(true)
|
|
||||||
}
|
|
||||||
if (scrollY < oldScrollY) {
|
|
||||||
actionShuffleAll.extend(true)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
shuffleAction.apply {
|
||||||
|
setOnClickListener { MusicPlayerRemote.openAndShuffleQueue(artist.songs, true) }
|
||||||
}
|
}
|
||||||
|
|
||||||
biographyText.setOnClickListener {
|
biographyText.setOnClickListener {
|
||||||
|
@ -105,7 +100,6 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
|
||||||
biographyText.maxLines = 4
|
biographyText.maxLines = 4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
actionShuffleAll.setOnClickListener { MusicPlayerRemote.openAndShuffleQueue(getArtist().songs, true) }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setUpViews() {
|
private fun setUpViews() {
|
||||||
|
@ -125,17 +119,16 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
|
||||||
private fun setupToolbarMarginHeight() {
|
private fun setupToolbarMarginHeight() {
|
||||||
val primaryColor = ThemeStore.primaryColor(this)
|
val primaryColor = ThemeStore.primaryColor(this)
|
||||||
TintHelper.setTintAuto(contentContainer!!, primaryColor, true)
|
TintHelper.setTintAuto(contentContainer!!, primaryColor, true)
|
||||||
if (collapsingToolbarLayout != null) {
|
collapsingToolbarLayout?.let {
|
||||||
collapsingToolbarLayout!!.setContentScrimColor(primaryColor)
|
it.setContentScrimColor(primaryColor)
|
||||||
collapsingToolbarLayout!!.setStatusBarScrimColor(ColorUtil.darkenColor(primaryColor))
|
it.setStatusBarScrimColor(ColorUtil.darkenColor(primaryColor))
|
||||||
}
|
}
|
||||||
|
|
||||||
toolbar!!.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp)
|
toolbar?.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp)
|
||||||
setSupportActionBar(toolbar)
|
setSupportActionBar(toolbar)
|
||||||
|
|
||||||
supportActionBar!!.title = null
|
supportActionBar!!.title = null
|
||||||
|
|
||||||
|
|
||||||
if (toolbar != null && !PreferenceUtil.getInstance().fullScreenMode) {
|
if (toolbar != null && !PreferenceUtil.getInstance().fullScreenMode) {
|
||||||
val params = toolbar!!.layoutParams as ViewGroup.MarginLayoutParams
|
val params = toolbar!!.layoutParams as ViewGroup.MarginLayoutParams
|
||||||
params.topMargin = RetroUtil.getStatusBarHeight()
|
params.topMargin = RetroUtil.getStatusBarHeight()
|
||||||
|
@ -158,6 +151,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
|
||||||
ToolbarContentTintHelper.setToolbarContentColorBasedOnToolbarColor(appBarLayout.context, toolbar, color)
|
ToolbarContentTintHelper.setToolbarContentColorBasedOnToolbarColor(appBarLayout.context, toolbar, color)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
setColors(ThemeStore.accentColor(this))
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupRecyclerView() {
|
private fun setupRecyclerView() {
|
||||||
|
@ -190,7 +184,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
super.onPause()
|
super.onPause()
|
||||||
artistDetailsPresenter!!.unsubscribe()
|
artistDetailsPresenter.unsubscribe()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun loading() {}
|
override fun loading() {}
|
||||||
|
@ -208,10 +202,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getArtist(): Artist {
|
private fun getArtist(): Artist {
|
||||||
if (artist == null) {
|
return this.artist;
|
||||||
artist = Artist()
|
|
||||||
}
|
|
||||||
return this.artist!!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setArtist(artist: Artist) {
|
private fun setArtist(artist: Artist) {
|
||||||
|
@ -283,6 +274,11 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
|
||||||
override fun onColorReady(color: Int) {
|
override fun onColorReady(color: Int) {
|
||||||
setColors(color)
|
setColors(color)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onLoadFailed(errorDrawable: Drawable?) {
|
||||||
|
super.onLoadFailed(errorDrawable)
|
||||||
|
setColors(defaultFooterColor)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
forceDownload = false;
|
forceDownload = false;
|
||||||
}
|
}
|
||||||
|
@ -295,10 +291,14 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
|
||||||
songTitle.setTextColor(textColor)
|
songTitle.setTextColor(textColor)
|
||||||
biographyTitle.setTextColor(textColor)
|
biographyTitle.setTextColor(textColor)
|
||||||
|
|
||||||
actionShuffleAll.backgroundTintList = ColorStateList.valueOf(textColor)
|
playAction.backgroundTintList = ColorStateList.valueOf(textColor)
|
||||||
|
shuffleAction.backgroundTintList = ColorStateList.valueOf(textColor)
|
||||||
ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(textColor))).apply {
|
ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(textColor))).apply {
|
||||||
actionShuffleAll.setTextColor(this)
|
playAction.setTextColor(this)
|
||||||
actionShuffleAll.iconTint = this
|
playAction.iconTint = this
|
||||||
|
|
||||||
|
shuffleAction.setTextColor(this)
|
||||||
|
shuffleAction.iconTint = this
|
||||||
}
|
}
|
||||||
|
|
||||||
findViewById<View>(R.id.root).setBackgroundColor(ThemeStore.primaryColor(this))
|
findViewById<View>(R.id.root).setBackgroundColor(ThemeStore.primaryColor(this))
|
||||||
|
@ -356,8 +356,8 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun reload() {
|
private fun reload() {
|
||||||
artistDetailsPresenter!!.unsubscribe()
|
artistDetailsPresenter.unsubscribe()
|
||||||
artistDetailsPresenter!!.subscribe()
|
artistDetailsPresenter.subscribe()
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package code.name.monkey.retromusic.activities
|
package code.name.monkey.retromusic.activities
|
||||||
|
|
||||||
import android.content.res.ColorStateList
|
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
|
@ -11,13 +10,10 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||||
import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
|
||||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
|
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
|
||||||
import code.name.monkey.retromusic.adapter.song.SongAdapter
|
import code.name.monkey.retromusic.adapter.song.SongAdapter
|
||||||
import code.name.monkey.retromusic.extensions.applyToolbar
|
import code.name.monkey.retromusic.extensions.applyToolbar
|
||||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
|
||||||
import code.name.monkey.retromusic.helper.menu.GenreMenuHelper
|
import code.name.monkey.retromusic.helper.menu.GenreMenuHelper
|
||||||
import code.name.monkey.retromusic.interfaces.CabHolder
|
import code.name.monkey.retromusic.interfaces.CabHolder
|
||||||
import code.name.monkey.retromusic.model.Genre
|
import code.name.monkey.retromusic.model.Genre
|
||||||
|
@ -27,12 +23,7 @@ import code.name.monkey.retromusic.mvp.presenter.GenreDetailsPresenter
|
||||||
import code.name.monkey.retromusic.util.RetroColorUtil
|
import code.name.monkey.retromusic.util.RetroColorUtil
|
||||||
import code.name.monkey.retromusic.util.ViewUtil
|
import code.name.monkey.retromusic.util.ViewUtil
|
||||||
import com.afollestad.materialcab.MaterialCab
|
import com.afollestad.materialcab.MaterialCab
|
||||||
import kotlinx.android.synthetic.main.activity_playing_queue.*
|
|
||||||
import kotlinx.android.synthetic.main.activity_playlist_detail.*
|
import kotlinx.android.synthetic.main.activity_playlist_detail.*
|
||||||
import kotlinx.android.synthetic.main.activity_playlist_detail.appBarLayout
|
|
||||||
import kotlinx.android.synthetic.main.activity_playlist_detail.empty
|
|
||||||
import kotlinx.android.synthetic.main.activity_playlist_detail.recyclerView
|
|
||||||
import kotlinx.android.synthetic.main.activity_playlist_detail.toolbar
|
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -67,18 +58,14 @@ class GenreDetailsActivity : AbsSlidingMusicPanelActivity(), GenreDetailsContrac
|
||||||
|
|
||||||
setUpToolBar()
|
setUpToolBar()
|
||||||
setupRecyclerView()
|
setupRecyclerView()
|
||||||
actionShuffleAll.setOnClickListener { MusicPlayerRemote.openAndShuffleQueue(songAdapter!!.dataSet, true) }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setUpToolBar() {
|
private fun setUpToolBar() {
|
||||||
val primaryColor = ThemeStore.primaryColor(this)
|
val primaryColor = ThemeStore.primaryColor(this)
|
||||||
appBarLayout.setBackgroundColor(primaryColor)
|
appBarLayout.setBackgroundColor(primaryColor)
|
||||||
applyToolbar(toolbar)
|
applyToolbar(toolbar)
|
||||||
actionShuffleAll.backgroundTintList = ColorStateList.valueOf(ThemeStore.accentColor(this))
|
|
||||||
ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(ThemeStore.accentColor(this)))).apply {
|
|
||||||
actionShuffleAll.setTextColor(this)
|
|
||||||
actionShuffleAll.iconTint = this
|
|
||||||
}
|
|
||||||
title = genre!!.name
|
title = genre!!.name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,16 +115,7 @@ class GenreDetailsActivity : AbsSlidingMusicPanelActivity(), GenreDetailsContrac
|
||||||
itemAnimator = DefaultItemAnimator()
|
itemAnimator = DefaultItemAnimator()
|
||||||
layoutManager = LinearLayoutManager(this@GenreDetailsActivity)
|
layoutManager = LinearLayoutManager(this@GenreDetailsActivity)
|
||||||
adapter = songAdapter
|
adapter = songAdapter
|
||||||
}.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
|
||||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
|
||||||
super.onScrolled(recyclerView, dx, dy)
|
|
||||||
if (dy > 0) {
|
|
||||||
actionShuffleAll.shrink(true)
|
|
||||||
} else if (dy < 0) {
|
|
||||||
actionShuffleAll.extend(true)
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
})
|
|
||||||
songAdapter!!.registerAdapterDataObserver(object : RecyclerView.AdapterDataObserver() {
|
songAdapter!!.registerAdapterDataObserver(object : RecyclerView.AdapterDataObserver() {
|
||||||
override fun onChanged() {
|
override fun onChanged() {
|
||||||
super.onChanged()
|
super.onChanged()
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package code.name.monkey.retromusic.activities
|
package code.name.monkey.retromusic.activities
|
||||||
|
|
||||||
import android.content.res.ColorStateList
|
|
||||||
import android.graphics.Color
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
|
@ -9,15 +7,12 @@ import android.view.View
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
|
||||||
import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
|
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
|
||||||
import code.name.monkey.retromusic.adapter.song.OrderablePlaylistSongAdapter
|
import code.name.monkey.retromusic.adapter.song.OrderablePlaylistSongAdapter
|
||||||
import code.name.monkey.retromusic.adapter.song.PlaylistSongAdapter
|
import code.name.monkey.retromusic.adapter.song.PlaylistSongAdapter
|
||||||
import code.name.monkey.retromusic.adapter.song.SongAdapter
|
import code.name.monkey.retromusic.adapter.song.SongAdapter
|
||||||
import code.name.monkey.retromusic.extensions.applyToolbar
|
import code.name.monkey.retromusic.extensions.applyToolbar
|
||||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
|
||||||
import code.name.monkey.retromusic.helper.menu.PlaylistMenuHelper
|
import code.name.monkey.retromusic.helper.menu.PlaylistMenuHelper
|
||||||
import code.name.monkey.retromusic.interfaces.CabHolder
|
import code.name.monkey.retromusic.interfaces.CabHolder
|
||||||
import code.name.monkey.retromusic.loaders.PlaylistLoader
|
import code.name.monkey.retromusic.loaders.PlaylistLoader
|
||||||
|
@ -54,7 +49,6 @@ class PlaylistDetailActivity : AbsSlidingMusicPanelActivity(), CabHolder, Playli
|
||||||
setTaskDescriptionColorAuto()
|
setTaskDescriptionColorAuto()
|
||||||
setLightNavigationBar(true)
|
setLightNavigationBar(true)
|
||||||
|
|
||||||
|
|
||||||
toggleBottomNavigationView(true)
|
toggleBottomNavigationView(true)
|
||||||
|
|
||||||
playlist = intent.extras!!.getParcelable(EXTRA_PLAYLIST)
|
playlist = intent.extras!!.getParcelable(EXTRA_PLAYLIST)
|
||||||
|
@ -100,22 +94,6 @@ class PlaylistDetailActivity : AbsSlidingMusicPanelActivity(), CabHolder, Playli
|
||||||
checkIsEmpty()
|
checkIsEmpty()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
recyclerView!!.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
|
||||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
|
||||||
super.onScrolled(recyclerView, dx, dy)
|
|
||||||
if (dy > 0) {
|
|
||||||
actionShuffleAll.shrink(true)
|
|
||||||
} else if (dy < 0) {
|
|
||||||
actionShuffleAll.extend(true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
actionShuffleAll.setOnClickListener {
|
|
||||||
if (adapter.dataSet.isEmpty()) {
|
|
||||||
return@setOnClickListener
|
|
||||||
}
|
|
||||||
MusicPlayerRemote.openAndShuffleQueue(adapter.dataSet, true)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
|
@ -124,13 +102,6 @@ class PlaylistDetailActivity : AbsSlidingMusicPanelActivity(), CabHolder, Playli
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setUpToolBar() {
|
private fun setUpToolBar() {
|
||||||
|
|
||||||
actionShuffleAll.backgroundTintList = ColorStateList.valueOf(ThemeStore.accentColor(this))
|
|
||||||
ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(ThemeStore.accentColor(this)))).apply {
|
|
||||||
actionShuffleAll.setTextColor(this)
|
|
||||||
actionShuffleAll.iconTint = this
|
|
||||||
}
|
|
||||||
|
|
||||||
applyToolbar(toolbar)
|
applyToolbar(toolbar)
|
||||||
title = playlist!!.name
|
title = playlist!!.name
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,8 @@ import code.name.monkey.appthemehelper.ThemeStore
|
||||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||||
import code.name.monkey.appthemehelper.util.TintHelper
|
import code.name.monkey.appthemehelper.util.TintHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
|
import code.name.monkey.retromusic.adapter.base.AbsMultiSelectAdapter
|
||||||
|
import code.name.monkey.retromusic.adapter.base.MediaEntryViewHolder
|
||||||
import code.name.monkey.retromusic.dialogs.ClearSmartPlaylistDialog
|
import code.name.monkey.retromusic.dialogs.ClearSmartPlaylistDialog
|
||||||
import code.name.monkey.retromusic.dialogs.DeletePlaylistDialog
|
import code.name.monkey.retromusic.dialogs.DeletePlaylistDialog
|
||||||
import code.name.monkey.retromusic.helper.menu.PlaylistMenuHelper
|
import code.name.monkey.retromusic.helper.menu.PlaylistMenuHelper
|
||||||
|
@ -23,8 +25,6 @@ import code.name.monkey.retromusic.model.Playlist
|
||||||
import code.name.monkey.retromusic.model.Song
|
import code.name.monkey.retromusic.model.Song
|
||||||
import code.name.monkey.retromusic.model.smartplaylist.AbsSmartPlaylist
|
import code.name.monkey.retromusic.model.smartplaylist.AbsSmartPlaylist
|
||||||
import code.name.monkey.retromusic.model.smartplaylist.LastAddedPlaylist
|
import code.name.monkey.retromusic.model.smartplaylist.LastAddedPlaylist
|
||||||
import code.name.monkey.retromusic.adapter.base.AbsMultiSelectAdapter
|
|
||||||
import code.name.monkey.retromusic.adapter.base.MediaEntryViewHolder
|
|
||||||
import code.name.monkey.retromusic.util.MusicUtil
|
import code.name.monkey.retromusic.util.MusicUtil
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil
|
import code.name.monkey.retromusic.util.NavigationUtil
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
|
@ -20,7 +20,7 @@ abstract class AbsOffsetSongAdapter : SongAdapter {
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SongAdapter.ViewHolder {
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SongAdapter.ViewHolder {
|
||||||
if (viewType == OFFSET_ITEM) {
|
if (viewType == OFFSET_ITEM) {
|
||||||
val view = LayoutInflater.from(activity).inflate(R.layout.item_list_single_row, parent, false)
|
val view = LayoutInflater.from(activity).inflate(R.layout.item_list_quick_actions, parent, false)
|
||||||
return createViewHolder(view)
|
return createViewHolder(view)
|
||||||
}
|
}
|
||||||
return super.onCreateViewHolder(parent, viewType)
|
return super.onCreateViewHolder(parent, viewType)
|
||||||
|
|
|
@ -1,20 +1,29 @@
|
||||||
package code.name.monkey.retromusic.adapter.song
|
package code.name.monkey.retromusic.adapter.song
|
||||||
|
|
||||||
|
import android.content.res.ColorStateList
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.annotation.LayoutRes
|
import androidx.annotation.LayoutRes
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.core.util.Pair
|
import androidx.core.util.Pair
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||||
|
import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
|
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||||
import code.name.monkey.retromusic.interfaces.CabHolder
|
import code.name.monkey.retromusic.interfaces.CabHolder
|
||||||
import code.name.monkey.retromusic.model.Song
|
import code.name.monkey.retromusic.model.Song
|
||||||
import code.name.monkey.retromusic.util.MusicUtil
|
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil
|
import code.name.monkey.retromusic.util.NavigationUtil
|
||||||
|
import code.name.monkey.retromusic.util.RetroUtil
|
||||||
|
import com.google.android.material.button.MaterialButton
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
|
|
||||||
open class PlaylistSongAdapter(activity: AppCompatActivity, dataSet: ArrayList<Song>, @LayoutRes itemLayoutRes: Int, usePalette: Boolean, cabHolder: CabHolder?) : AbsOffsetSongAdapter(activity, dataSet, itemLayoutRes, usePalette, cabHolder, false) {
|
open class PlaylistSongAdapter(activity: AppCompatActivity,
|
||||||
|
dataSet: ArrayList<Song>,
|
||||||
|
@LayoutRes itemLayoutRes: Int,
|
||||||
|
usePalette: Boolean,
|
||||||
|
cabHolder: CabHolder?) :
|
||||||
|
AbsOffsetSongAdapter(activity, dataSet, itemLayoutRes, usePalette, cabHolder, false) {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
this.setMultiSelectMenuRes(R.menu.menu_cannot_delete_single_songs_playlist_songs_selection)
|
this.setMultiSelectMenuRes(R.menu.menu_cannot_delete_single_songs_playlist_songs_selection)
|
||||||
|
@ -25,35 +34,30 @@ open class PlaylistSongAdapter(activity: AppCompatActivity, dataSet: ArrayList<S
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: SongAdapter.ViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: SongAdapter.ViewHolder, position: Int) {
|
||||||
if (holder.itemViewType == AbsOffsetSongAdapter.OFFSET_ITEM) {
|
|
||||||
val textColor = ThemeStore.textColorSecondary(activity)
|
if (holder.itemViewType == OFFSET_ITEM) {
|
||||||
if (holder.title != null) {
|
|
||||||
holder.title!!.text = MusicUtil.getPlaylistInfoString(activity, dataSet)
|
val buttonColor = RetroUtil.toolbarColor(activity)
|
||||||
holder.title!!.setTextColor(textColor)
|
val textColor = MaterialValueHelper.getPrimaryTextColor(activity, ColorUtil.isColorLight(buttonColor))
|
||||||
|
val viewHolder = holder as ViewHolder
|
||||||
|
|
||||||
|
viewHolder.playAction?.let {
|
||||||
|
it.backgroundTintList = ColorStateList.valueOf(buttonColor)
|
||||||
|
it.setTextColor(textColor)
|
||||||
|
it.iconTint = ColorStateList.valueOf(textColor)
|
||||||
|
it.setOnClickListener {
|
||||||
|
MusicPlayerRemote.openQueue(dataSet, 0, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
viewHolder.shuffleAction?.let {
|
||||||
|
it.backgroundTintList = ColorStateList.valueOf(buttonColor)
|
||||||
|
it.setTextColor(textColor)
|
||||||
|
it.iconTint = ColorStateList.valueOf(textColor)
|
||||||
|
it.setOnClickListener {
|
||||||
|
MusicPlayerRemote.openAndShuffleQueue(dataSet, true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (holder.text != null) {
|
|
||||||
holder.text!!.visibility = View.GONE
|
|
||||||
}
|
|
||||||
if (holder.menu != null) {
|
|
||||||
holder.menu!!.visibility = View.GONE
|
|
||||||
}
|
|
||||||
if (holder.image != null) {
|
|
||||||
val padding = activity.resources.getDimensionPixelSize(R.dimen.default_item_margin) / 2
|
|
||||||
holder.image!!.setPadding(padding, padding, padding, padding)
|
|
||||||
holder.image!!.setColorFilter(textColor)
|
|
||||||
holder.image!!.setImageResource(R.drawable.ic_timer_white_24dp)
|
|
||||||
}
|
|
||||||
if (holder.dragView != null) {
|
|
||||||
holder.dragView!!.visibility = View.GONE
|
|
||||||
}
|
|
||||||
if (holder.separator != null) {
|
|
||||||
holder.separator!!.visibility = View.GONE
|
|
||||||
}
|
|
||||||
if (holder.shortSeparator != null) {
|
|
||||||
holder.shortSeparator!!.visibility = View.GONE
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
super.onBindViewHolder(holder, position - 1)
|
super.onBindViewHolder(holder, position - 1)
|
||||||
}
|
}
|
||||||
|
@ -61,6 +65,9 @@ open class PlaylistSongAdapter(activity: AppCompatActivity, dataSet: ArrayList<S
|
||||||
|
|
||||||
open inner class ViewHolder(itemView: View) : AbsOffsetSongAdapter.ViewHolder(itemView) {
|
open inner class ViewHolder(itemView: View) : AbsOffsetSongAdapter.ViewHolder(itemView) {
|
||||||
|
|
||||||
|
val playAction: MaterialButton? = itemView.findViewById(R.id.playAction)
|
||||||
|
val shuffleAction: MaterialButton? = itemView.findViewById(R.id.shuffleAction)
|
||||||
|
|
||||||
override var songMenuRes: Int
|
override var songMenuRes: Int
|
||||||
get() = R.menu.menu_item_cannot_delete_single_songs_playlist_song
|
get() = R.menu.menu_item_cannot_delete_single_songs_playlist_song
|
||||||
set(value) {
|
set(value) {
|
||||||
|
@ -78,7 +85,6 @@ open class PlaylistSongAdapter(activity: AppCompatActivity, dataSet: ArrayList<S
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
val TAG: String = PlaylistSongAdapter::class.java.simpleName
|
||||||
val TAG = PlaylistSongAdapter::class.java.simpleName
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,13 +1,18 @@
|
||||||
package code.name.monkey.retromusic.adapter.song
|
package code.name.monkey.retromusic.adapter.song
|
||||||
|
|
||||||
|
import android.content.res.ColorStateList
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.annotation.LayoutRes
|
import androidx.annotation.LayoutRes
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
|
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||||
|
import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||||
import code.name.monkey.retromusic.interfaces.CabHolder
|
import code.name.monkey.retromusic.interfaces.CabHolder
|
||||||
import code.name.monkey.retromusic.model.Song
|
import code.name.monkey.retromusic.model.Song
|
||||||
|
import code.name.monkey.retromusic.util.RetroUtil
|
||||||
|
import com.google.android.material.button.MaterialButton
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,8 +27,30 @@ class ShuffleButtonSongAdapter(activity: AppCompatActivity,
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: SongAdapter.ViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: SongAdapter.ViewHolder, position: Int) {
|
||||||
if (holder.itemViewType == AbsOffsetSongAdapter.OFFSET_ITEM) {
|
if (holder.itemViewType == OFFSET_ITEM) {
|
||||||
val accentColor = ThemeStore.accentColor(activity.applicationContext)
|
val accentColor = ThemeStore.accentColor(activity.applicationContext)
|
||||||
|
val buttonColor = RetroUtil.toolbarColor(activity)
|
||||||
|
val textColor = MaterialValueHelper.getPrimaryTextColor(activity, ColorUtil.isColorLight(buttonColor))
|
||||||
|
val viewHolder = holder as ViewHolder
|
||||||
|
|
||||||
|
viewHolder.playAction?.let {
|
||||||
|
it.backgroundTintList = ColorStateList.valueOf(buttonColor)
|
||||||
|
it.setTextColor(textColor)
|
||||||
|
it.iconTint = ColorStateList.valueOf(textColor)
|
||||||
|
it.setOnClickListener {
|
||||||
|
MusicPlayerRemote.openQueue(dataSet, 0, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
viewHolder.shuffleAction?.let {
|
||||||
|
it.backgroundTintList = ColorStateList.valueOf(buttonColor)
|
||||||
|
it.setTextColor(textColor)
|
||||||
|
it.iconTint = ColorStateList.valueOf(textColor)
|
||||||
|
it.setOnClickListener {
|
||||||
|
MusicPlayerRemote.openAndShuffleQueue(dataSet, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (holder.title != null) {
|
if (holder.title != null) {
|
||||||
holder.title!!.text = activity.resources.getString(R.string.action_shuffle_all)
|
holder.title!!.text = activity.resources.getString(R.string.action_shuffle_all)
|
||||||
holder.title!!.setTextColor(accentColor)
|
holder.title!!.setTextColor(accentColor)
|
||||||
|
@ -52,9 +79,11 @@ class ShuffleButtonSongAdapter(activity: AppCompatActivity,
|
||||||
}
|
}
|
||||||
|
|
||||||
inner class ViewHolder(itemView: View) : AbsOffsetSongAdapter.ViewHolder(itemView) {
|
inner class ViewHolder(itemView: View) : AbsOffsetSongAdapter.ViewHolder(itemView) {
|
||||||
|
val playAction: MaterialButton? = itemView.findViewById(R.id.playAction)
|
||||||
|
val shuffleAction: MaterialButton? = itemView.findViewById(R.id.shuffleAction)
|
||||||
|
|
||||||
override fun onClick(v: View?) {
|
override fun onClick(v: View?) {
|
||||||
if (itemViewType == AbsOffsetSongAdapter.OFFSET_ITEM) {
|
if (itemViewType == OFFSET_ITEM) {
|
||||||
MusicPlayerRemote.openAndShuffleQueue(dataSet, true)
|
MusicPlayerRemote.openAndShuffleQueue(dataSet, true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="@dimen/icon_notification_dimen"
|
android:width="24dp"
|
||||||
android:height="@dimen/icon_notification_dimen"
|
android:height="24dp"
|
||||||
android:viewportWidth="24"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="24">
|
android:viewportHeight="24">
|
||||||
|
|
||||||
|
|
|
@ -96,16 +96,5 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
|
||||||
android:id="@+id/actionShuffleAll"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="bottom|end"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:text="@string/action_shuffle_all"
|
|
||||||
app:icon="@drawable/ic_clear_all_black_24dp" />
|
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/root"
|
android:id="@+id/root"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -97,12 +96,4 @@
|
||||||
android:layout_height="72dp"
|
android:layout_height="72dp"
|
||||||
android:background="@drawable/shadow_down_strong" />
|
android:background="@drawable/shadow_down_strong" />
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
|
||||||
android:id="@+id/actionShuffleAll"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="bottom|end"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:text="@string/action_shuffle_all"
|
|
||||||
app:icon="@drawable/ic_clear_all_black_24dp" />
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
|
@ -122,16 +122,6 @@
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
|
||||||
android:id="@+id/actionShuffleAll"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="bottom|end"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:text="@string/action_shuffle_all"
|
|
||||||
app:icon="@drawable/ic_clear_all_black_24dp" />
|
|
||||||
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="72dp"
|
android:layout_height="72dp"
|
||||||
|
|
|
@ -94,14 +94,4 @@
|
||||||
<include layout="@layout/activity_artist_content" />
|
<include layout="@layout/activity_artist_content" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
|
||||||
android:id="@+id/actionShuffleAll"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="bottom|end"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:text="@string/action_shuffle_all"
|
|
||||||
app:icon="@drawable/ic_clear_all_black_24dp" />
|
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
|
@ -129,13 +129,4 @@
|
||||||
android:layout_height="72dp"
|
android:layout_height="72dp"
|
||||||
android:background="@drawable/shadow_down_strong" />
|
android:background="@drawable/shadow_down_strong" />
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
|
||||||
android:id="@+id/actionShuffleAll"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="bottom|end"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:text="@string/action_shuffle_all"
|
|
||||||
app:icon="@drawable/ic_clear_all_black_24dp" />
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -1,10 +1,50 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="8dp"
|
||||||
|
android:paddingEnd="8dp">
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/playAction"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:text="@string/action_play"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:cornerRadius="6dp"
|
||||||
|
app:icon="@drawable/ic_play_arrow_white_24dp"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
tools:backgroundTint="@color/md_grey_900" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/shuffleAction"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:text="@string/shuffle"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:cornerRadius="6dp"
|
||||||
|
app:icon="@drawable/ic_shuffle_white_24dp"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
tools:backgroundTint="@color/md_grey_900" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||||
android:id="@+id/biographyTitle"
|
android:id="@+id/biographyTitle"
|
||||||
style="@style/TextAppearance.MaterialComponents.Subtitle2"
|
style="@style/TextAppearance.MaterialComponents.Subtitle2"
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
android:background="@android:color/transparent">
|
android:background="@android:color/transparent">
|
||||||
|
|
||||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:id="@+id/collapsingToolbarLayout"
|
android:id="@+id/collapsingToolbarLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||||
|
@ -97,13 +97,4 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
|
||||||
android:id="@+id/actionShuffleAll"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="bottom|end"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:text="@string/action_shuffle_all"
|
|
||||||
app:icon="@drawable/ic_clear_all_black_24dp" />
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
|
@ -109,16 +109,6 @@
|
||||||
|
|
||||||
<include layout="@layout/activity_album_content" />
|
<include layout="@layout/activity_album_content" />
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
|
||||||
android:id="@+id/actionShuffleAll"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="bottom|end"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:text="@string/action_shuffle_all"
|
|
||||||
app:icon="@drawable/ic_shuffle_white_24dp" />
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -1,9 +1,50 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="8dp"
|
||||||
|
android:paddingEnd="8dp">
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/playAction"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:text="@string/action_play"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:cornerRadius="6dp"
|
||||||
|
app:icon="@drawable/ic_play_arrow_white_24dp"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
tools:backgroundTint="@color/md_grey_900" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/shuffleAction"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:text="@string/shuffle"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:cornerRadius="6dp"
|
||||||
|
app:icon="@drawable/ic_shuffle_white_24dp"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
tools:backgroundTint="@color/md_grey_900" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||||
android:id="@+id/songTitle"
|
android:id="@+id/songTitle"
|
||||||
style="@style/SubTitleTextAppearance"
|
style="@style/SubTitleTextAppearance"
|
||||||
|
|
|
@ -1,15 +1,49 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="8dp"
|
||||||
|
android:paddingEnd="8dp">
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/playAction"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:text="@string/action_play"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:cornerRadius="6dp"
|
||||||
|
app:icon="@drawable/ic_play_arrow_white_24dp"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
tools:backgroundTint="@color/md_grey_900" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/shuffleAction"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:text="@string/shuffle"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:cornerRadius="6dp"
|
||||||
|
app:icon="@drawable/ic_shuffle_white_24dp"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
tools:backgroundTint="@color/md_grey_900" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||||
android:id="@+id/biographyTitle"
|
android:id="@+id/biographyTitle"
|
||||||
|
@ -20,13 +54,13 @@
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||||
android:id="@+id/biographyText"
|
android:id="@+id/biographyText"
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Body1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="4"
|
|
||||||
android:lineSpacingExtra="5dp"
|
android:lineSpacingExtra="5dp"
|
||||||
|
android:maxLines="4"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
style="@style/TextAppearance.MaterialComponents.Body1"
|
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
|
|
@ -97,14 +97,4 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
|
||||||
android:id="@+id/actionShuffleAll"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="bottom|end"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:text="@string/action_shuffle_all"
|
|
||||||
app:icon="@drawable/ic_shuffle_white_24dp" />
|
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
|
@ -84,14 +84,5 @@
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
|
||||||
android:id="@+id/actionShuffleAll"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="bottom|end"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:text="@string/action_shuffle_all"
|
|
||||||
app:icon="@drawable/ic_shuffle_white_24dp" />
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -25,11 +25,13 @@
|
||||||
android:id="@+id/playAction"
|
android:id="@+id/playAction"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="4dp"
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
android:padding="10dp"
|
||||||
android:text="@string/action_play"
|
android:text="@string/action_play"
|
||||||
android:padding="12dp"
|
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
|
app:cornerRadius="6dp"
|
||||||
app:icon="@drawable/ic_play_arrow_white_24dp"
|
app:icon="@drawable/ic_play_arrow_white_24dp"
|
||||||
app:iconGravity="textStart"
|
app:iconGravity="textStart"
|
||||||
tools:backgroundTint="@color/md_grey_900" />
|
tools:backgroundTint="@color/md_grey_900" />
|
||||||
|
@ -38,11 +40,13 @@
|
||||||
android:id="@+id/shuffleAction"
|
android:id="@+id/shuffleAction"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="4dp"
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
android:padding="10dp"
|
||||||
android:text="@string/shuffle"
|
android:text="@string/shuffle"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:padding="12dp"
|
app:cornerRadius="6dp"
|
||||||
app:icon="@drawable/ic_shuffle_white_24dp"
|
app:icon="@drawable/ic_shuffle_white_24dp"
|
||||||
app:iconGravity="textStart"
|
app:iconGravity="textStart"
|
||||||
tools:backgroundTint="@color/md_grey_900" />
|
tools:backgroundTint="@color/md_grey_900" />
|
||||||
|
|
Loading…
Reference in a new issue