checklistview
checklistview copied to clipboard
Allow NestedScrollView
The ChecklistViewItemOnDragListener::onDrag
[1] tries to find the next ScollView
ancestor. In some cases it is necessary to use a NestedScrollView
instead of a normal ScrollView
. But it is not possible to cast between the two classes. Therefor, it would be useful to explicit support the use of NestedScrollView
.
One more thing:
The check in ChecklistViewItemOnDragListener::getScrollableAncestor
[2] is not quite correct. The for-loop will eventually encounter a FrameLayout
when there is no ScrollView
. FrameLayout.getClass().isAssignableFrom(ScrollView.class)
is true, but you can not cast a FrameLayout
to a ScrollView
.
Maybe this is also the problem in issue #16.
[1] https://github.com/federicoiosue/checklistview/blob/develop/checklistview/src/main/java/it/feio/android/checklistview/dragging/ChecklistViewItemOnDragListener.java#L38 [2] https://github.com/federicoiosue/checklistview/blob/develop/checklistview/src/main/java/it/feio/android/checklistview/dragging/ChecklistViewItemOnDragListener.java#L180
I have similar issue, what I do is putting another scroll view inside nestedscrollview to solve this isssue