onMeasureChild

open fun onMeasureChild(@NonNull parent: @NonNull CoordinatorLayout, @NonNull child: @NonNull V, parentWidthMeasureSpec: Int, widthUsed: Int, parentHeightMeasureSpec: Int, heightUsed: Int): Boolean(source)

Called when the parent CoordinatorLayout is about to measure the given child view.

This method can be used to perform custom or modified measurement of a child view in place of the default child measurement behavior. The Behavior's implementation can delegate to the standard CoordinatorLayout measurement behavior by calling parent.onMeasureChild.

Return

true if the Behavior measured the child view, false if the CoordinatorLayout should perform its default measurement

Parameters

parent

the parent CoordinatorLayout

child

the child to measure

parentWidthMeasureSpec

the width requirements for this view

widthUsed

extra space that has been used up by the parent horizontally (possibly by other children of the parent)

parentHeightMeasureSpec

the height requirements for this view

heightUsed

extra space that has been used up by the parent vertically (possibly by other children of the parent)