checklistview icon indicating copy to clipboard operation
checklistview copied to clipboard

Allow NestedScrollView

Open jfreax opened this issue 8 years ago • 1 comments

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

jfreax avatar Sep 08 '16 11:09 jfreax

I have similar issue, what I do is putting another scroll view inside nestedscrollview to solve this isssue

cwfei avatar Sep 25 '16 07:09 cwfei