package Ġcom . ir sc . challenge . fragments Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . databinding . Data Binding Util Ċ import Ġandroidx . fragment . app . Dialog Fragment Ċ import Ġandroidx . fragment . app . activity ViewModels Ċ import Ġandroidx . lifecycle . Observer Ċ import Ġcom . ir sc . challenge . R Ċ import Ġcom . ir sc . challenge . databinding . Fragment Message Dialog Binding Ċ import Ġcom . ir sc . challenge . databinding . Fragment Progress Dialog Binding Ċ import Ġcom . ir sc . challenge . models . Mark Model Ċ import Ġcom . ir sc . challenge . models . Shared ViewModel ĊĊ Ċ class ĠMessage Dialog Fragment Ġ: ĠDialog Fragment () Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġbinding : Fragment Message Dialog Binding ĊĠĠĠ Ġval Ġmodel : ĠShared ViewModel Ġby Ġactivity ViewModels () ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĠsavedInstanceState : ĠBundle ?): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ Ġbinding Ġ= ĠData Binding Util . inflate < Fragment Message Dialog Binding >( in flater , ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR . layout . fragment _ message _ dialog , container , false ) ĊĊĠĠĠĠĠĠĠ Ġmodel . selected . observe ( view Lifecycle Owner , ĠObserver < Mark Model > Ġ{ Ġitem Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbinding . mark Ġ= Ġitem ĊĠĠĠĠĠĠĠ Ġ}) ĊĊĠĠĠĠĠĠĠ Ġreturn Ġbinding . root ĊĠĠĠ Ġ} Ċ Ċ }