behavior

fun <T : View, B : Behavior<T>> behavior(beforeChange: (old: B?, new: B?) -> Unit = { _,_ -> }): ReadWriteProperty<T, B?>

Delegate that manages installation and uninstallation of a Behavior and calls beforeChange before applying changes.

Parameters

beforeChange

is called before a change is applied


fun <T : View, B : Behavior<T>> behavior(beforeChange: (old: B?, new: B?) -> Unit = { _,_ -> }, afterChange: (old: B?, new: B?) -> Unit = { _,_ -> }): ReadWriteProperty<T, B?>