package Ġcom . gy org yz olt an . sp ray App . work . no zzle Distance Picker Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . View Ċ import Ġandroidx . lifecycle . viewModel Scope Ċ import Ġcom . gy org yz olt an . sp ray App . main . R Ċ import Ġcom . gy org yz olt an . sp ray App . main . shared . list . List Fragment Ċ import Ġcom . gy org yz olt an . sp ray App . main . shared . utilities . Bundle Argument Delegate Ċ import Ġcom . gy org yz olt an . sp ray App . main . shared . utilities . observe Events Ċ import Ġcom . gy org yz olt an . sp ray App . main . shared . utilities . with Arguments Ċ import Ġcom . gy org yz olt an . sp ray App . work . no zzle Distance Picker . list . No zzle Distance Picker Adapter Ċ import Ġcom . gy org yz olt an . sp ray App . work . no zzle Distance Picker . list . No zzle Distance Picker ListItem Ċ import Ġcom . gy org yz olt an . sp ray App . work . overview . Work Container Fragment Ċ import Ġorg . k oin . android x . view model . ext . android . viewModel Ċ import Ġorg . k oin . core . parameter . parameters Of Ċ Ċ internal Ġclass ĠNo zzle Distance Picker Fragment Ġ: ĠList Fragment < No zzle Distance Picker ViewModel , ĠNo zzle Distance Picker ListItem >( ĊĠĠĠ Ġtitle ResourceId Ġ= ĠR . string . no zzle _ distance _ picker _ title , ĊĠĠĠ Ġsubtitle ResourceId Ġ= ĠR . string . no zzle _ distance _ picker _ subtitle Ċ ) Ġ{ ĊĠĠĠ Ġoverride Ġval ĠviewModel Ġby ĠviewModel < No zzle Distance Picker ViewModel > Ġ{ Ġparameters Of ( arguments ?. current No zzle Distance ) Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġcreate Adapter () Ġ= ĠNo zzle Distance Picker Adapter ( ĊĠĠĠĠĠĠĠ Ġscope Ġ= ĠviewModel . viewModel Scope , ĊĠĠĠĠĠĠĠ Ġon No zzle Distance Changed Ġ= ĠviewModel :: on No zzle Distance Changed , ĊĠĠĠĠĠĠĠ Ġon Done Button Pressed Ġ= ĠviewModel :: on Done Button Pressed ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĠĠĠĠĠĠĠ ĠviewModel . events . observe Events ( view Lifecycle Owner , Ġ:: handle Event ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġhandle Event ( event : ĠNo zzle Distance Picker ViewModel . Event ) Ġ= Ġwhen Ġ( event ) Ġ{ ĊĠĠĠĠĠĠĠ ĠNo zzle Distance Picker ViewModel . Event . Close Screen Ġ-> Ġclose Screen () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġclose Screen () Ġ{ ĊĠĠĠĠĠĠĠ Ġ( parent Fragment Ġas ? ĠWork Container Fragment ?) ?. navigate Back () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġprivate Ġvar ĠBundle . current No zzle Distance Ġby ĠBundle Argument Delegate . Float (" current No zzle Distance ", ĠNo zzle Distance Picker ViewModel . DEFAULT _ NO ZZ LE _ DISTANCE ) ĊĊĠĠĠĠĠĠĠ Ġfun Ġnew Instance ( current No zzle Distance : ĠFloat ?) Ġ= ĠNo zzle Distance Picker Fragment (). with Arguments Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . current No zzle Distance Ġ= Ġcurrent No zzle Distance Ġ?: ĠNo zzle Distance Picker ViewModel . DEFAULT _ NO ZZ LE _ DISTANCE ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }