Skip to content

Allow NestedScrollView #17

Description

@jfreax

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions