Handle ACTION_DRAG_LOCATION due to a bug https://stackoverflow.com/a/19460338

This commit is contained in:
darthpaul
2021-09-21 14:14:07 +01:00
parent e01531ac62
commit f342f41fbe

View File

@@ -903,9 +903,14 @@ class WeekFragment : Fragment(), WeeklyCalendar {
return when (dragEvent.action) { return when (dragEvent.action) {
DragEvent.ACTION_DRAG_STARTED -> currentlyDraggedView == view DragEvent.ACTION_DRAG_STARTED -> currentlyDraggedView == view
DragEvent.ACTION_DRAG_ENTERED -> { DragEvent.ACTION_DRAG_ENTERED -> {
view.beGone() view.beInvisible()
false false
} }
// handle ACTION_DRAG_LOCATION due to https://stackoverflow.com/a/19460338
DragEvent.ACTION_DRAG_LOCATION -> {
return true
}
DragEvent.ACTION_DRAG_ENDED -> { DragEvent.ACTION_DRAG_ENDED -> {
currentlyDraggedView = null currentlyDraggedView = null
view.beVisible() view.beVisible()