setLayoutHeight

fun View.setLayoutHeight(layoutHeightPx: Int?)

Sets the ViewGroup.LayoutParams.height of the View inside a ViewGroup to the given layoutHeightPx. If layoutHeightPx is null, the layout height is set to 0.

Throws

when the view has a different type of layout as parent.


fun View.setLayoutHeight(layoutHeightPx: Float?)

Sets the ViewGroup.LayoutParams.height of the View inside a ViewGroup to the given layoutHeightPx. The fractional part, if any, is rounded down towards zero. If layoutHeightPx is null, the layout height is set to 0.

Throws

when the view has a different type of layout as parent.