Added retro icon, fix color, drive mode
This commit is contained in:
parent
03fa8399dd
commit
5754141b0e
25 changed files with 615 additions and 54 deletions
|
@ -22,6 +22,7 @@ import com.h6ah4i.android.widget.advrecyclerview.swipeable.action.SwipeResultAct
|
|||
import com.h6ah4i.android.widget.advrecyclerview.swipeable.action.SwipeResultActionDefault
|
||||
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.ArrayList
|
||||
|
||||
class PlayingQueueAdapter(
|
||||
|
@ -31,7 +32,8 @@ class PlayingQueueAdapter(
|
|||
itemLayoutRes: Int
|
||||
) : SongAdapter(
|
||||
activity, dataSet, itemLayoutRes, null
|
||||
), DraggableItemAdapter<PlayingQueueAdapter.ViewHolder>, SwipeableItemAdapter<PlayingQueueAdapter.ViewHolder> {
|
||||
), DraggableItemAdapter<PlayingQueueAdapter.ViewHolder>, SwipeableItemAdapter<PlayingQueueAdapter.ViewHolder>,
|
||||
PopupTextProvider {
|
||||
|
||||
private var color = -1
|
||||
private var songToRemove: Song? = null
|
||||
|
@ -100,6 +102,10 @@ class PlayingQueueAdapter(
|
|||
holder.menu?.alpha = alpha
|
||||
}
|
||||
|
||||
override fun getPopupText(position: Int): String {
|
||||
return MusicUtil.getSectionName(dataSet[position].title)
|
||||
}
|
||||
|
||||
override fun onCheckCanStartDrag(holder: ViewHolder, position: Int, x: Int, y: Int): Boolean {
|
||||
return ViewUtil.hitTest(holder.imageText!!, x, y) || ViewUtil.hitTest(holder.dragView!!, x, y)
|
||||
}
|
||||
|
|
|
@ -144,7 +144,7 @@ open class SongAdapter(
|
|||
return ""
|
||||
}
|
||||
}
|
||||
println("File name -> $sectionName")
|
||||
|
||||
return MusicUtil.getSectionName(sectionName)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue