package Ġcom . tern ary op . photos he lf . tag phot ob rowser . activity Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . Intent Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroidx . preference . Preference Manager Ċ import Ġcom . tern ary op . photos he lf . activity . Abs Photo She lf Activity Ċ import Ġcom . tern ary op . photos he lf . activity . Tag Photo Browser Data Ċ import Ġcom . tern ary op . photos he lf . core . prefs . selected Blog Name Ċ import Ġcom . tern ary op . photos he lf . fragment . app Fragment Factory Ċ import Ġcom . tern ary op . photos he lf . tag phot ob rowser . R Ċ import Ġcom . tern ary op . photos he lf . tag phot ob rowser . fragment . Tag Photo Browser Fragment Ċ import Ġdagger . h ilt . android . Android EntryPoint Ċ Ċ @ Android EntryPoint Ċ class ĠTag Photo Browser Activity Ġ: ĠAbs Photo She lf Activity () Ġ{ ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġblog Name : ĠString ĊĊĠĠĠ Ġoverride Ġval Ġcontent View Layout Id : ĠInt Ġ= ĠR . layout . activity _ tag _ photo _ browser ĊĠĠĠ Ġoverride Ġval Ġcontent Frame Id : ĠInt Ġ= ĠR . id . content _ frame ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġdata Ġ= Ġtag Photo Browser Data ( intent . extras ) ĊĠĠĠĠĠĠĠ Ġblog Name Ġ= Ġdata ?. blog Name Ġ?: ĠcheckNotNull ( Preference Manager . getDefault SharedPreferences ( this ). selected Blog Name ) ĊĠĠĠĠĠĠĠ Ġsupport FragmentManager . fragment Factory Ġ= Ġapp Fragment Factory ĊĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġcreate Fragment (): ĠFragment Ġ= ĊĠĠĠĠĠĠĠ Ġsupport FragmentManager . fragment Factory . instantiate ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġclass Loader , ĠTag Photo Browser Fragment :: class . java . name ) ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġprivate Ġconst Ġval ĠEX TRA _ TAG _ PH OTO _ BROWSER _ DATA Ġ= Ġ" com . tern ary op . photos he lf . extra . TAG _ PH OTO _ BROWSER _ DATA " ĊĠĠĠĠĠĠĠ Ġprivate Ġconst Ġval ĠEX TRA _ RETURN _ SELECTED _ POST Ġ= Ġ" com . tern ary op . photos he lf . extra . EXTRA _ RETURN _ SELECTED _ POST " ĊĊĠĠĠĠĠĠĠ Ġfun Ġcreate Intent ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcontext : ĠContext , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtag Photo Browser Data : ĠTag Photo Browser Data , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Selected Post : ĠBoolean Ġ= Ġfalse ĊĠĠĠĠĠĠĠ Ġ): ĠIntent Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġintent Ġ= ĠIntent ( context , ĠTag Photo Browser Activity :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġbundle Ġ= ĠBundle () ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġbundle . put Serializable ( EXTRA _ TAG _ PH OTO _ BROWSER _ DATA , Ġtag Photo Browser Data ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbundle . put Boolean ( EXTRA _ RETURN _ SELECTED _ POST , Ġreturn Selected Post ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġintent . put Extras ( bundle ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġintent ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġfun Ġtag Photo Browser Data ( bundle : ĠBundle ?) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbundle ?. get Serializable ( EXTRA _ TAG _ PH OTO _ BROWSER _ DATA ) Ġas ? ĠTag Photo Browser Data ĊĊĠĠĠĠĠĠĠ Ġfun Ġreturn Selected Post ( bundle : ĠBundle ?, ĠdefaultValue : ĠBoolean Ġ= Ġfalse ) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbundle ?. getBoolean ( EXTRA _ RETURN _ SELECTED _ POST , ĠdefaultValue ) Ġ?: ĠdefaultValue ĊĠĠĠ Ġ} Ċ } Ċ