package Ġcom . github . sat osh un . example Ċ Ċ import Ġandroid . app . Activity Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . activity . Component Activity Ċ import Ġandroidx . core . view . get Ċ import Ġandroidx . databinding . Data Binding Util Ċ import Ġandroidx . databinding . ViewData Binding Ċ import Ġandroidx . fragment . app . Fragment Ċ Ċ fun Ġ< T Ġ: ĠView Data Binding > ĠComponent Activity . bind View (): ĠT Ġ= ĊĠ ĠData Binding Util . bind ( getContent View ()) !! Ċ Ċ private Ġfun ĠActivity . getContent View (): ĠView Ġ= ĊĠ ĠfindViewById < ViewGroup >( android . R . id . content )[ 0 ] Ċ Ċ fun Ġ< T Ġ: ĠView Data Binding > ĠComponent Activity . bind Lazy View () Ġ= Ġlazy < T > Ġ{ ĊĠ Ġbind View () Ċ } Ċ Ċ fun Ġ< T Ġ: ĠView Data Binding > ĠFragment . bind View (): ĠT Ġ= ĠData Binding Util . bind ( view !! ) !! Ċ