package Ġf erg ar al . t ides app . ui . fragment Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroidx . fragment . app . view Models Ċ import Ġandroidx . lifecycle . observe Ċ import Ġandroidx . recyclerview . widget . Grid LayoutManager Ċ import Ġdagger . h ilt . android . Android EntryPoint Ċ import Ġf erg ar al . t ides app . databinding . Fragment Ports Binding Ċ import Ġf erg ar al . t ides app . repository . T ides Repository Ċ import Ġf erg ar al . t ides app . ui . adapter . Ports Adapter Ċ import Ġf erg ar al . t ides app . view model . Ports ViewModel Ċ import Ġjavax . inject . Inject Ċ Ċ @ Android EntryPoint Ċ class ĠPort s Fragment Ġ: ĠFragment () Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġports ViewModel : ĠPort s ViewModel Ġby Ġview Models () ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( ĊĠĠĠĠĠĠĠ Ġinflater : ĠLayoutInflater , ĊĠĠĠĠĠĠĠ Ġcontainer : ĠViewGroup ?, ĊĠĠĠĠĠĠĠ ĠsavedInstanceState : ĠBundle ? ĊĠĠĠ Ġ): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbinding Ġ= ĠFragment Ports Binding . inflate ( in flater , Ġcontainer , Ġfalse ) ĊĠĠĠĠĠĠĠ Ġval Ġadapter Ġ= ĠPort s Adapter () ĊĠĠĠĠĠĠĠ Ġval Ġlayout Manager Ġ= ĠGrid LayoutManager ( activity , Ġ 2 ) ĊĠĠĠĠĠĠĠ Ġbinding . ports Rv . adapter Ġ= Ġadapter ĊĠĠĠĠĠĠĠ Ġbinding . ports Rv . layout Manager Ġ= Ġlayout Manager ĊĠĠĠĠĠĠĠ Ġ// ports ViewModel . ports . observe ( view Lifecycle Owner ) Ġ{ Ġports Ġ-> ĊĠĠĠĠĠĠĠ Ġ// ĠĠĠ Ġadapter . set Ports ( ports ) ĊĠĠĠĠĠĠĠ Ġ//} ĊĠĠĠĠĠĠĠ Ġreturn Ġbinding . root ĊĠĠĠ Ġ} Ċ }