Open DanStout opened 7 years ago
Add this method in class to disable view draggability. Then u can disable, throw by for loop every view in list
public void disableViewDraggable(View child, View dragHandle){
if (null == child || null == dragHandle) {
throw new IllegalArgumentException(
"Draggable children and their drag handles must not be null.");
}
if (this == child.getParent()) {
dragHandle.setOnTouchListener(null); //set null
draggableChildren.delete(indexOfChild(child));
} else {
Log.e(LOG_TAG, child + " is not a child, cannot make draggable.");
}
}
It would be nice to be able to make views which are currently draggable non-draggable. Maybe like this:
Current:
public void setViewDraggable(View child, View dragHandle)
Possibe:public void setViewDraggable(View child, View dragHandle, boolean isDraggable)