updateLayoutParams

Executes block with the View's layoutParams and reassigns the layoutParams with the updated version.

See also

Throws

If no LayoutParams is set on the view.


@JvmName(name = "updateLayoutParamsTyped")
inline fun <T : ViewGroup.LayoutParams> View.updateLayoutParams(block: T.() -> Unit)(source)

Executes block with a typed version of the View's layoutParams and reassigns the layoutParams with the updated version.

See also

Throws

If no LayoutParams is set on the view.

If the LayoutParams type is not T or a subtype of T.