package Ġorg . wild aid . of ish . ui . ful li mage Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . View Ċ import Ġandroidx . core . view . View Compat Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroidx . fragment . app . activity ViewModels Ċ import Ġandroidx . fragment . app . view Models Ċ import Ġandroidx . lifecycle . Observer Ċ import Ġandroidx . transition . Transition Inflater Ċ import Ġcom . bump tech . glide . G lide Ċ import Ġcom . bump tech . glide . request . RequestOptions Ċ import Ġorg . wild aid . of ish . R Ċ import Ġorg . wild aid . of ish . databinding . Fragment Full Image Binding Ċ import Ġorg . wild aid . of ish . ui . base . PH OTO _ ID Ċ import Ġorg . wild aid . of ish . ui . cre at ere port . Create Report ViewModel Ċ import Ġorg . wild aid . of ish . util . get ViewModel Factory Ċ Ċ class ĠFull Image Fragment Ġ: ĠFragment ( R . layout . fragment _ full _ image ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġfragment ViewModel : ĠFull Image ViewModel Ġby Ġview Models Ġ{ Ġget ViewModel Factory () Ġ} ĊĠĠĠ Ġprivate Ġval Ġactivity ViewModel : ĠCreate Report ViewModel Ġby Ġactivity ViewModels Ġ{ Ġget ViewModel Factory () Ġ} ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġview Data Binding : ĠFragment Full Image Binding ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġshared Element Enter Transition Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠTransition Inflater . from ( context ). inflate Transition ( android . R . transition . move ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġview Data Binding Ġ= ĠFragment Full Image Binding . bind ( view ). apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġthis . lifecycle Owner Ġ= Ġthis @ Full Image Fragment . view Lifecycle Owner ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġval Ġphoto Id Ġ= Ġarguments ?. get ( PH OTO _ ID ) Ġas ĠString ĊĠĠĠĠĠĠĠ ĠView Compat . set Transition Name ( view Data Binding . full Image , Ġphoto Id ) ĊĊĠĠĠĠĠĠĠ Ġfragment ViewModel . photo LiveData . observe ( view Lifecycle Owner , ĠObserver Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠG lide . with ( this ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. load ( it . local Uri Ġ?: Ġit . photo . getResource For Loading ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. into ( view Data Binding . full Image ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠRequest Options (). dont Transform () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ}) ĊĊĠĠĠĠĠĠĠ Ġfragment ViewModel . find Photo ( activity ViewModel . report Photos , Ġphoto Id ) ĊĠĠĠĠĠĠĠ Ġview Data Binding . execute Pending Bindings () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonStart () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onStart () ĊĠĠĠĠĠĠĠ Ġactivity ViewModel . is On Search Ġ= Ġtrue ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Stop () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Stop () ĊĠĠĠĠĠĠĠ Ġactivity ViewModel . is On Search Ġ= Ġfalse ĊĠĠĠ Ġ} Ċ }