layoutDependsOn
open fun layoutDependsOn(@NonNull parent: @NonNull CoordinatorLayout, @NonNull child: @NonNull V, @NonNull dependency: @NonNull View): Boolean(source)
Determine whether the supplied child view has another specific sibling view as a layout dependency.
This method will be called at least once in response to a layout request. If it returns true for a given child and dependency view pair, the parent CoordinatorLayout will:
- Always lay out this child after the dependent child is laid out, regardless of child order.
- Call onDependentViewChanged when the dependency view's layout or position changes.
Return
true if child's layout depends on the proposed dependency's layout, false otherwise
Parameters
parent
the parent view of the given child
child
the child view to test
dependency
the proposed dependency of child