package Ġorg . opp ia . android . app . help . third party Ċ Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġorg . opp ia . android . app . fragment . Fragment Scope Ċ import Ġorg . opp ia . android . app . recyclerview . Bind able Adapter Ċ import Ġorg . opp ia . android . app . view model . ViewModel Provider Ċ import Ġorg . opp ia . android . databinding . Third Party Dependency Item Binding Ċ import Ġorg . opp ia . android . databinding . Third Party Dependency List Fragment Binding Ċ import Ġjavax . inject . Inject Ċ Ċ /** ĠThe Ġpresenter Ġfor Ġ[ Third Party Dependency List Fragment ]. Ġ*/ Ċ @ Fragment Scope Ċ class ĠThird Party Dependency List Fragment Presenter Ġ@ Inject Ġconstructor ( ĊĠ Ġprivate Ġval Ġactivity : ĠAppCompatActivity , ĊĠ Ġprivate Ġval Ġfragment : ĠFragment , ĊĠ Ġprivate Ġval ĠviewModel Provider : ĠViewModel Provider < Third Party Dependency List ViewModel > Ċ ) Ġ{ ĊĠ Ġprivate Ġlateinit Ġvar Ġbinding : ĠThird Party Dependency List Fragment Binding ĊĊĠ Ġ/** ĠHandles ĠonCreate View () Ġmethod Ġof Ġthe Ġ[ Third Party Dependency List Fragment ]. Ġ*/ ĊĠ Ġfun Ġhandle Create View ( ĊĠĠĠ Ġinflater : ĠLayoutInflater , ĊĠĠĠ Ġcontainer : ĠViewGroup ?, ĊĠĠĠ Ġis Multip ane : ĠBoolean ĊĠ Ġ): ĠView Ġ{ ĊĠĠĠ Ġval ĠviewModel Ġ= Ġget Third Party Dependency List ViewModel () ĊĠĠĠ ĠviewModel . is Multip ane . set ( is Multip ane ) ĊĠĠĠ Ġbinding Ġ= ĠThird Party Dependency List Fragment Binding . inflate ( ĊĠĠĠĠĠ Ġinflater , ĊĠĠĠĠĠ Ġcontainer , ĊĠĠĠĠĠ Ġ/* Ġattach To Root = Ġ*/ Ġfalse ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġre cycler view Adapter Ġ= Ġcreate RecyclerView Adapter () ĊĊĠĠĠ Ġbinding . third Party Dependency List Fragment RecyclerView . apply Ġ{ ĊĠĠĠĠĠ Ġlayout Manager Ġ= ĠLinearLayoutManager ( activity . application Context ) ĊĠĠĠĠĠ Ġadapter Ġ= Ġre cycler view Adapter ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġbinding . let Ġ{ ĊĠĠĠĠĠ Ġit . lifecycle Owner Ġ= Ġfragment ĊĠĠĠĠĠ Ġit . viewModel Ġ= ĠviewModel ĊĠĠĠ Ġ} ĊĠĠĠ Ġreturn Ġbinding . root ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġcreate RecyclerView Adapter (): ĠBind able Adapter < Third Party Dependency Item ViewModel > Ġ{ ĊĠĠĠ Ġreturn ĠBind able Adapter . Single Type Builder ĊĠĠĠĠĠ Ġ. newBuilder < Third Party Dependency Item ViewModel >() ĊĠĠĠĠĠ Ġ. register ViewData Binder With Same Model Type ( ĊĠĠĠĠĠĠĠ Ġinf late Data Binding Ġ= ĠThird Party Dependency Item Binding :: inflate , ĊĠĠĠĠĠĠĠ Ġset ViewModel Ġ= ĠThird Party Dependency Item Binding :: set ViewModel ĊĠĠĠĠĠ Ġ) ĊĠĠĠĠĠ Ġ. build () ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġget Third Party Dependency List ViewModel (): ĠThird Party Dependency List ViewModel Ġ{ ĊĠĠĠ Ġreturn ĠviewModel Provider . get For Fragment ( fragment , ĠThird Party Dependency List ViewModel :: class . java ) ĊĠ Ġ} Ċ } Ċ