package Ġcom . example . android . polit ical prepared ness . launch Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġcom . example . android . polit ical prepared ness . base . Base Fragment Ċ import Ġcom . example . android . polit ical prepared ness . base . Navigation Command Ċ import Ġcom . example . android . polit ical prepared ness . databinding . Fragment Launch Binding Ċ import Ġorg . k oin . android x . view model . ext . android . viewModel Ċ Ċ class ĠLaunch Fragment Ġ: ĠBase Fragment () Ġ{ ĊĊĠĠĠ Ġoverride Ġval Ġ_ viewModel : ĠLaunch ViewModel Ġby ĠviewModel () ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( ĊĠĠĠĠĠĠĠ Ġinflater : ĠLayoutInflater , ĊĠĠĠĠĠĠĠ Ġcontainer : ĠViewGroup ?, ĊĠĠĠĠĠĠĠ ĠsavedInstanceState : ĠBundle ?, ĊĠĠĠ Ġ): ĠView Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbinding Ġ= ĠFragment Launch Binding . inflate ( in flater ) ĊĊĠĠĠĠĠĠĠ Ġwith ( binding ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlifecycle Owner Ġ= Ġthis @ Launch Fragment ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġbtn Represent ative . setOnClickListener Ġ{ Ġnav To Represent atives () Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbtn Up coming . setOnClickListener Ġ{ Ġnav To E lection s () Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn Ġbinding . root ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġnav To E lection s () Ġ{ ĊĠĠĠĠĠĠĠ Ġ_ viewModel . navigation Command . post Value ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠNavigation Command . To ( Launch Fragment Directions . action Launch Fragment To E lection s Fragment ()) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġnav To Represent atives () Ġ{ ĊĠĠĠĠĠĠĠ Ġ_ viewModel . navigation Command . post Value ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠNavigation Command . To ( Launch Fragment Directions . action Launch Fragment To Represent ative Fragment ()) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} Ċ } Ċ