package Ġcom . example . an atom y viewer . ar . ui Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroidx . constraint layout . widget . Constraint Layout Ċ import Ġandroidx . lifecycle . Lifecycle Owner Ċ import Ġcom . example . an atom y viewer . databinding . Ar Overlay Binding Ċ Ċ class ĠAr Overlay View ( context : ĠContext ) Ġ: ĠConstraint Layout ( context ) Ġ{ ĊĊĠĠĠ Ġprivate Ġvar Ġbinding : ĠAr Overlay Binding ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġinflater Ġ= Ġcontext . getSystem Service ( Context . LAYOUT _ IN FL ATER _ SERVICE ) Ġas ĠLayoutInflater ĊĠĠĠĠĠĠĠ Ġbinding Ġ= ĠAr Overlay Binding . inflate ( in flater , Ġthis , Ġtrue ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġset ViewModel ( ar ViewModel : ĠAr ViewModel , Ġlifecycle Owner : ĠLifecycle Owner ) Ġ{ ĊĠĠĠĠĠĠĠ Ġbinding . ar ViewModel Ġ= Ġar ViewModel ĊĠĠĠĠĠĠĠ Ġbinding . lifecycle Owner Ġ= Ġlifecycle Owner ĊĠĠĠ Ġ} Ċ }