service / com.scurab.android.uitor.tools / android.view.View

Extensions for android.view.View

absoluteScale

Return absolute scale of view. Any parent scale is also part of the result

fun View.absoluteScale(): Pair<Float, Float>

hasSize

Return true if the view has View#width and View#height non zero value

fun View.hasSize(): Boolean

parentViews

fun View.parentViews(): Iterator<ViewGroup>

render

Render view into bitmap

fun View.render(includeLocationOnScreen: Boolean = false): Bitmap

renderBackground

Render background into a bitmap if view has size

fun View.renderBackground(): Bitmap?