library / org.akop.kotx.tools.view / ViewParser / parse

parse

fun parse(activity: Activity): Unit

Traverses view hierarchy of an activity, then for each member variable of the activity annotated with Leaf, assigns a reference to the corresponding View. Should be called after Activity.setContentView.

Member variables can be immutable.

fun parse(activity: Activity, obj: Any): Unit

Traverses view hierarchy of an activity, then for each member variable of obj annotated with Leaf, assigns a reference to the corresponding View. Should be called after Activity.setContentView.

Member variables can be immutable.

fun parse(view: View, obj: Any): View

Traverses hierarchy of view, then for each member variable of obj annotated with Leaf, assigns a reference to the corresponding View.

Member variables can be immutable.