[8.0.0]
[fea] [音乐item -->变动]
This commit is contained in:
@@ -57,13 +57,27 @@ class MusicListItemAdapter(
|
||||
}
|
||||
holder.itemView.setOnClickListener {
|
||||
clickListener.clickItem(musicData)
|
||||
dataList.forEachIndexed { index, musicData4Loop ->
|
||||
if(musicData4Loop.select==true){
|
||||
musicData4Loop.select = false
|
||||
notifyItemChanged(index)
|
||||
return@forEachIndexed
|
||||
}
|
||||
}
|
||||
musicData.select = true
|
||||
notifyItemChanged(position)
|
||||
}
|
||||
|
||||
if(musicData.select==true){
|
||||
holder.itemView.background = gradientDrawable
|
||||
}else{
|
||||
holder.itemView.background = null
|
||||
}
|
||||
|
||||
if (musicData.state==PlayState.Playing||musicData.state==PlayState.Pause) {
|
||||
holder.musicPlayState.visibility = View.VISIBLE
|
||||
holder.itemView.background = gradientDrawable
|
||||
}else{
|
||||
holder.itemView.background = null
|
||||
|
||||
holder.musicPlayState.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user