package Ġcom . ir sc . challenge . fragments Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . databinding . Data Binding Util Ċ import Ġandroidx . lifecycle . Observer Ċ import Ġandroidx . navigation . find Nav Controller Ċ import Ġcom . ir sc . challenge . abstract s . Abstract Fragment Ċ import Ġcom . ir sc . challenge . R Ċ import Ġcom . ir sc . challenge . databinding . Fragment Bi om ark Details Binding Ċ import Ġcom . ir sc . challenge . models . Mark Model ĊĊ Ċ class ĠBi om ark er Details Fragment Ġ: ĠAbstract Fragment () Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġbinding : ĠFragment Bi om ark Details Binding ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĠsavedInstanceState : ĠBundle ? ĊĠĠĠ Ġ): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ Ġbinding Ġ= ĠData Binding Util . inflate < Fragment Bi om ark Details Binding >( in flater , ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR . layout . fragment _ bi om ark _ details , container , false ) ĊĠĠĠĠĠĠĠ Ġreturn Ġbinding . root ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĠĠĠĠĠĠĠ Ġmodel . selected . observe ( view Lifecycle Owner , ĠObserver < Mark Model > Ġ{ Ġitem Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbinding . mark Ġ= Ġitem ĊĠĠĠĠĠĠĠ Ġ}) ĊĊĠĠĠĠĠĠĠ Ġbinding . blob . set Blob Text (" love ") ĊĠĠĠĠĠĠĠ Ġbinding . img Info . setOnClickListener { ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . find Nav Controller (). navigate ( R . id . message Dialog Fragment ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊ Ċ }