Added room for now playing queue
This commit is contained in:
parent
6cdaf27eda
commit
2da9d1c5b7
14 changed files with 211 additions and 25 deletions
|
@ -16,11 +16,10 @@ import code.name.monkey.retromusic.model.Song
|
|||
import code.name.monkey.retromusic.util.NavigationUtil
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import com.bumptech.glide.Glide
|
||||
import java.util.*
|
||||
|
||||
class AlbumCoverPagerAdapter(
|
||||
fragmentManager: FragmentManager,
|
||||
private val dataSet: ArrayList<Song>
|
||||
private val dataSet: List<Song>
|
||||
) : CustomFragmentStatePagerAdapter(fragmentManager) {
|
||||
|
||||
private var currentColorReceiver: AlbumCoverFragment.ColorReceiver? = null
|
||||
|
@ -95,7 +94,8 @@ class AlbumCoverPagerAdapter(
|
|||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
val finalLayout = when {
|
||||
PreferenceUtil.getInstance(requireContext()).carouselEffect() -> R.layout.fragment_album_carousel_cover
|
||||
PreferenceUtil.getInstance(requireContext())
|
||||
.carouselEffect() -> R.layout.fragment_album_carousel_cover
|
||||
else -> layout
|
||||
}
|
||||
val view = inflater.inflate(finalLayout, container, false)
|
||||
|
|
|
@ -23,11 +23,10 @@ import com.h6ah4i.android.widget.advrecyclerview.swipeable.action.SwipeResultAct
|
|||
import com.h6ah4i.android.widget.advrecyclerview.swipeable.action.SwipeResultActionRemoveItem
|
||||
import com.h6ah4i.android.widget.advrecyclerview.swipeable.annotation.SwipeableItemResults
|
||||
import me.zhanghai.android.fastscroll.PopupTextProvider
|
||||
import java.util.*
|
||||
|
||||
class PlayingQueueAdapter(
|
||||
activity: AppCompatActivity,
|
||||
dataSet: ArrayList<Song>,
|
||||
dataSet: MutableList<Song>,
|
||||
private var current: Int,
|
||||
itemLayoutRes: Int
|
||||
) : SongAdapter(
|
||||
|
@ -82,8 +81,8 @@ class PlayingQueueAdapter(
|
|||
// We don't want to load it in this adapter
|
||||
}
|
||||
|
||||
fun swapDataSet(dataSet: ArrayList<Song>, position: Int) {
|
||||
this.dataSet = dataSet
|
||||
fun swapDataSet(dataSet: List<Song>, position: Int) {
|
||||
this.dataSet = dataSet.toMutableList()
|
||||
current = position
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue