package Ġcom . pel is app . ui . dashboard Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġcom . pel is app . core . Movie Api Ċ import Ġcom . pel is app . databinding . Fragment Dashboard Binding Ċ Ċ class ĠDashboard Fragment Ġ: ĠFragment () Ġ{ ĊĠĠĠ Ġprivate Ġvar Ġ_ binding : ĠFragment Dashboard Binding ? Ġ= Ġnull ĊĠĠĠ Ġ// ĠThis Ġproperty Ġis Ġonly Ġvalid Ġbetween ĠonCreate View Ġand ĊĠĠĠ Ġ// Ġon Destroy View . ĊĠĠĠ Ġprivate Ġval Ġbinding Ġget () Ġ= Ġ_ binding !! ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġre cyclerView : ĠRecyclerView ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĠsavedInstanceState : ĠBundle ?): ĠView Ġ{ ĊĠĠĠĠĠĠĠ Ġ_ binding Ġ= ĠFragment Dashboard Binding . inflate ( in flater , Ġcontainer , Ġfalse ) ĊĠĠĠĠĠĠĠ Ġreturn Ġbinding . root ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĊĠĠĠĠĠĠĠ Ġval Ġmovies Ġ= ĠMovie Api (). get Movies () ĊĊĠĠĠĠĠĠĠ Ġval Ġview Manager Ġ= ĠLinearLayoutManager ( this . context ) ĊĠĠĠĠĠĠĠ Ġval Ġview Adapter Ġ= ĠMov ies Adapter ( movies ) ĊĊĠĠĠĠĠĠĠ Ġre cyclerView Ġ= Ġbinding . my RecyclerView . apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlayout Manager Ġ= Ġview Manager ĊĠĠĠĠĠĠĠĠĠĠĠ Ġadapter Ġ= Ġview Adapter ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }