diff --git a/app/src/main/kotlin/com/simplemobiletools/musicplayer/adapters/BaseMusicAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/musicplayer/adapters/BaseMusicAdapter.kt index a95095fb..8d49626a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/musicplayer/adapters/BaseMusicAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/musicplayer/adapters/BaseMusicAdapter.kt @@ -33,6 +33,10 @@ abstract class BaseMusicAdapter( val placeholderBig by lazy { resources.getBiggerPlaceholder(textColor) } open val cornerRadius by lazy { resources.getDimension(com.simplemobiletools.commons.R.dimen.rounded_corner_radius_small).toInt() } + init { + setupDragListener(true) + } + override fun getItemCount() = items.size override fun getSelectableItemCount() = items.size diff --git a/app/src/main/kotlin/com/simplemobiletools/musicplayer/adapters/ExcludedFoldersAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/musicplayer/adapters/ExcludedFoldersAdapter.kt index bff68b6f..79274bb2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/musicplayer/adapters/ExcludedFoldersAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/musicplayer/adapters/ExcludedFoldersAdapter.kt @@ -24,6 +24,10 @@ class ExcludedFoldersAdapter( private val config = activity.config + init { + setupDragListener(true) + } + override fun getActionMenuId() = com.simplemobiletools.commons.R.menu.cab_remove_only override fun prepareActionMode(menu: Menu) {} diff --git a/app/src/main/kotlin/com/simplemobiletools/musicplayer/adapters/TracksAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/musicplayer/adapters/TracksAdapter.kt index 3a0615ce..40f80ed3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/musicplayer/adapters/TracksAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/musicplayer/adapters/TracksAdapter.kt @@ -42,8 +42,6 @@ class TracksAdapter( private var startReorderDragListener: StartReorderDragListener init { - setupDragListener(true) - touchHelper = ItemTouchHelper(ItemMoveCallback(this)) touchHelper!!.attachToRecyclerView(recyclerView)