ui / winkit.android.ui / android.view.View / measureIfNeeded

measureIfNeeded

fun View.measureIfNeeded(callback: (width: Int, height: Int) -> Unit): Unit

Call the callback if the view is already measured passing the view’s sizes, otherwise call the measure method.

Parameters

callback - A function that receive the view’s width and height