Changed artist and album details page a bit
This commit is contained in:
parent
8351c3e0fd
commit
bd05de53d8
18 changed files with 35 additions and 67 deletions
|
@ -7,11 +7,8 @@ import androidx.annotation.MenuRes
|
|||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.extensions.surfaceColor
|
||||
import code.name.monkey.retromusic.interfaces.ICabCallback
|
||||
import code.name.monkey.retromusic.interfaces.ICabHolder
|
||||
import code.name.monkey.retromusic.util.ColorAnimUtil
|
||||
import code.name.monkey.retromusic.util.RetroColorUtil
|
||||
import com.afollestad.materialcab.attached.AttachedCab
|
||||
import com.afollestad.materialcab.attached.destroy
|
||||
import com.afollestad.materialcab.attached.isActive
|
||||
|
@ -24,7 +21,6 @@ abstract class AbsMultiSelectAdapter<V : RecyclerView.ViewHolder?, I>(
|
|||
private val checked: MutableList<I>
|
||||
private var menuRes: Int
|
||||
override fun onCabCreated(cab: AttachedCab, menu: Menu): Boolean {
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
@ -470,10 +470,10 @@ class AlbumDetailsFragment : AbsMainActivityFragment(R.layout.fragment_album_det
|
|||
it.destroy()
|
||||
}
|
||||
}
|
||||
cab = createCab(R.id.cab_stub) {
|
||||
cab = createCab(R.id.toolbar_container) {
|
||||
menu(menuRes)
|
||||
closeDrawable(R.drawable.ic_close)
|
||||
backgroundColor(literal = RetroColorUtil.shiftBackgroundColorForLightText(surfaceColor()))
|
||||
backgroundColor(literal = RetroColorUtil.shiftBackgroundColor(surfaceColor()))
|
||||
slideDown()
|
||||
onCreate { cab, menu -> callback.onCabCreated(cab, menu) }
|
||||
onSelection {
|
||||
|
|
|
@ -346,10 +346,10 @@ class AlbumsFragment : AbsRecyclerViewCustomGridSizeFragment<AlbumAdapter, GridL
|
|||
it.destroy()
|
||||
}
|
||||
}
|
||||
cab = createCab(R.id.cab_stub) {
|
||||
cab = createCab(R.id.toolbar_container) {
|
||||
menu(menuRes)
|
||||
closeDrawable(R.drawable.ic_close)
|
||||
backgroundColor(literal = RetroColorUtil.shiftBackgroundColorForLightText(surfaceColor()))
|
||||
backgroundColor(literal = RetroColorUtil.shiftBackgroundColor(surfaceColor()))
|
||||
slideDown()
|
||||
onCreate { cab, menu -> callback.onCabCreated(cab, menu) }
|
||||
onSelection {
|
||||
|
|
|
@ -326,10 +326,10 @@ abstract class AbsArtistDetailsFragment : AbsMainActivityFragment(R.layout.fragm
|
|||
it.destroy()
|
||||
}
|
||||
}
|
||||
cab = createCab(R.id.cab_stub) {
|
||||
cab = createCab(R.id.toolbar_container) {
|
||||
menu(menuRes)
|
||||
closeDrawable(R.drawable.ic_close)
|
||||
backgroundColor(literal = RetroColorUtil.shiftBackgroundColorForLightText(surfaceColor()))
|
||||
backgroundColor(literal = RetroColorUtil.shiftBackgroundColor(surfaceColor()))
|
||||
slideDown()
|
||||
onCreate { cab, menu -> callback.onCabCreated(cab, menu) }
|
||||
onSelection {
|
||||
|
|
|
@ -344,10 +344,10 @@ class ArtistsFragment : AbsRecyclerViewCustomGridSizeFragment<ArtistAdapter, Gri
|
|||
it.destroy()
|
||||
}
|
||||
}
|
||||
cab = createCab(R.id.cab_stub) {
|
||||
cab = createCab(R.id.toolbar_container) {
|
||||
menu(menuRes)
|
||||
closeDrawable(R.drawable.ic_close)
|
||||
backgroundColor(literal = RetroColorUtil.shiftBackgroundColorForLightText(surfaceColor()))
|
||||
backgroundColor(literal = RetroColorUtil.shiftBackgroundColor(surfaceColor()))
|
||||
slideDown()
|
||||
onCreate { cab, menu -> callback.onCabCreated(cab, menu) }
|
||||
onSelection {
|
||||
|
|
|
@ -58,7 +58,8 @@ abstract class AbsRecyclerViewFragment<A : RecyclerView.Adapter<*>, LM : Recycle
|
|||
initAdapter()
|
||||
setUpRecyclerView()
|
||||
setupToolbar()
|
||||
binding.appBarLayout.statusBarForeground = MaterialShapeDrawable.createWithElevationOverlay(requireContext());
|
||||
binding.appBarLayout.statusBarForeground =
|
||||
MaterialShapeDrawable.createWithElevationOverlay(requireContext())
|
||||
}
|
||||
|
||||
fun toolbar(): Toolbar {
|
||||
|
|
|
@ -432,10 +432,10 @@ class FoldersFragment : AbsMainActivityFragment(R.layout.fragment_folder),
|
|||
if (cab != null && cab!!.isActive()) {
|
||||
cab?.destroy()
|
||||
}
|
||||
cab = createCab(R.id.cab_stub) {
|
||||
cab = createCab(R.id.toolbar_container) {
|
||||
menu(menuRes)
|
||||
closeDrawable(R.drawable.ic_close)
|
||||
backgroundColor(literal = RetroColorUtil.shiftBackgroundColorForLightText(surfaceColor()))
|
||||
backgroundColor(literal = RetroColorUtil.shiftBackgroundColor(surfaceColor()))
|
||||
slideDown()
|
||||
onCreate { cab, menu -> callback.onCabCreated(cab, menu) }
|
||||
onSelection {
|
||||
|
|
|
@ -179,10 +179,10 @@ class PlaylistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playli
|
|||
it.destroy()
|
||||
}
|
||||
}
|
||||
cab = createCab(R.id.cab_stub) {
|
||||
cab = createCab(R.id.toolbar_container) {
|
||||
menu(menuRes)
|
||||
closeDrawable(R.drawable.ic_close)
|
||||
backgroundColor(literal = RetroColorUtil.shiftBackgroundColorForLightText(surfaceColor()))
|
||||
backgroundColor(literal = RetroColorUtil.shiftBackgroundColor(surfaceColor()))
|
||||
slideDown()
|
||||
onCreate { cab, menu -> callback.onCabCreated(cab, menu) }
|
||||
onSelection {
|
||||
|
|
|
@ -371,10 +371,10 @@ class SongsFragment : AbsRecyclerViewCustomGridSizeFragment<SongAdapter, GridLay
|
|||
it.destroy()
|
||||
}
|
||||
}
|
||||
cab = createCab(R.id.cab_stub) {
|
||||
cab = createCab(R.id.toolbar_container) {
|
||||
menu(menuRes)
|
||||
closeDrawable(R.drawable.ic_close)
|
||||
backgroundColor(literal = RetroColorUtil.shiftBackgroundColorForLightText(surfaceColor()))
|
||||
backgroundColor(literal = RetroColorUtil.shiftBackgroundColor(surfaceColor()))
|
||||
slideDown()
|
||||
onCreate { cab, menu -> callback.onCabCreated(cab, menu) }
|
||||
onSelection {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue