make drag selection at recyclerview disabled by default
This commit is contained in:
parent
54c56c559e
commit
aed1d64e43
|
@ -239,6 +239,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
directories_refresh_layout.layoutParams = FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||
}
|
||||
|
||||
directories_grid.isDragSelectionEnabled = true
|
||||
directories_grid.isZoomingEnabled = true
|
||||
layoutManager.spanCount = config.dirColumnCnt
|
||||
MyScalableRecyclerView.mListener = object : MyScalableRecyclerView.MyScalableRecyclerViewListener {
|
||||
|
|
|
@ -315,6 +315,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
media_refresh_layout.layoutParams = FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||
}
|
||||
|
||||
media_grid.isDragSelectionEnabled = true
|
||||
media_grid.isZoomingEnabled = true
|
||||
layoutManager.spanCount = config.mediaColumnCnt
|
||||
MyScalableRecyclerView.mListener = object : MyScalableRecyclerView.MyScalableRecyclerViewListener {
|
||||
|
|
|
@ -12,6 +12,7 @@ import com.simplemobiletools.gallery.R
|
|||
class MyScalableRecyclerView : RecyclerView {
|
||||
private val AUTO_SCROLL_DELAY = 25L
|
||||
var isZoomingEnabled = false
|
||||
var isDragSelectionEnabled = false
|
||||
|
||||
private var mScaleDetector: ScaleGestureDetector
|
||||
|
||||
|
@ -157,7 +158,7 @@ class MyScalableRecyclerView : RecyclerView {
|
|||
}
|
||||
|
||||
fun setDragSelectActive(initialSelection: Int) {
|
||||
if (dragSelectActive)
|
||||
if (dragSelectActive || !isDragSelectionEnabled)
|
||||
return
|
||||
|
||||
lastDraggedIndex = -1
|
||||
|
|
Loading…
Reference in New Issue