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
The
ChecklistViewItemOnDragListener::onDrag[1] tries to find the nextScollViewancestor. In some cases it is necessary to use aNestedScrollViewinstead of a normalScrollView. But it is not possible to cast between the two classes. Therefor, it would be useful to explicit support the use ofNestedScrollView.One more thing:
The check in
ChecklistViewItemOnDragListener::getScrollableAncestor[2] is not quite correct. The for-loop will eventually encounter aFrameLayoutwhen there is noScrollView.FrameLayout.getClass().isAssignableFrom(ScrollView.class)is true, but you can not cast aFrameLayoutto aScrollView.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