package Ġmo e . ba ih um aru . android . ui . home . nav Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . annotation . Call Super Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġcommon s . android . core . navigation . nav Into Ċ import Ġmo e . ba ih um aru . android . databinding . Home Nav Fragment Binding Ċ import Ġmo e . ba ih um aru . android . navigation . Primary Nav Root Ċ import Ġmo e . ba ih um aru . android . ui . defaults . Core Parent Fragment Ċ Ċ abstract Ġclass ĠHome Navigation Fragment < F Ġ: ĠFragment > Ġ: ĠCore Parent Fragment < Home Nav Fragment Binding >(), ĠPrimary Nav Root Ġ{ ĊĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠ Ġconst Ġval ĠD Y NAMIC _ TAG Ġ= Ġ" dynamic _ tag " ĊĠ Ġ} ĊĊĠ Ġabstract Ġfun Ġinitial Fragment Constructor (): ĠF ĊĊĠ Ġfun Ġapply New Instance Args ( tag : ĠString ) Ġ= Ġapply Ġ{ ĊĠĠĠ Ġarguments Ġ= Ġ( arguments Ġ?: ĠBundle ()). apply Ġ{ ĊĠĠĠĠĠ Ġput String ( DYNAMIC _ TAG , Ġtag ) ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġinf late Binding ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ): ĠHome Nav Fragment Binding Ġ{ ĊĠĠĠ Ġreturn ĠHome Nav Fragment Binding . inflate ( in flater , Ġcontainer , Ġfalse ) ĊĠ Ġ} ĊĊĠ Ġfun Ġfragment Tag (): ĠString Ġ= Ġarguments ?. getString ( DYNAMIC _ TAG ) ĊĠĠĠ Ġ?: Ġthrow ĠIllegalStateException ("${ java Class . simple Name } Ġargument Ġ$ DYNAMIC _ TAG Ġis Ġnull ") ĊĊĠ Ġ@ Call Super ĊĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĠĠĠ Ġif Ġ( savedInstanceState Ġ== Ġnull ) Ġ{ ĊĠĠĠĠĠ Ġchild FragmentManager . nav Into ( binding . sub Content . id , Ġfragment Tag (), Ġ:: initial Fragment Constructor ) ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ }