package Ġio . homeassistant . comp anion . android . n fc Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . View Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroidx . fragment . app . activity ViewModels Ċ import Ġandroidx . lifecycle . Observer Ċ import Ġandroidx . navigation . fragment . find Nav Controller Ċ import Ġio . homeassistant . comp anion . android . R Ċ Ċ /** Ċ Ġ* ĠA Ġsimple Ġ[ Fragment ] Ġsubclass Ġas Ġthe Ġsecond Ġdestination Ġin Ġthe Ġnavigation . Ċ Ġ*/ Ċ class ĠN fc Read Fragment Ġ: ĠFragment ( R . layout . fragment _ n fc _ read ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval ĠviewModel : ĠN fc ViewModel Ġby Ġactivity ViewModels () ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġn fc Read Observer Ġ= ĠObserver < String > Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfind Nav Controller (). navigate ( R . id . action _ N FC _ EDIT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ ĠviewModel . n fc Read Event . observe ( view Lifecycle Owner , Ġn fc Read Observer ) ĊĠĠĠ Ġ} Ċ } Ċ