package Ġcom . example . payment app design . ui . settings Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġcom . example . payment app design . R Ċ import Ġcom . example . payment app design . data . Settings Ċ import Ġcom . example . payment app design . databinding . Fragment Settings Binding Ċ import Ġcom . example . payment app design . ui . common . GridView Item Decoration Ċ import Ġdagger . h ilt . android . Android EntryPoint Ċ Ċ @ Android EntryPoint Ċ class ĠSettings Fragment Ġ: ĠFragment ( R . layout . fragment _ settings ) Ġ{ ĊĊĠĠĠ Ġprivate Ġvar Ġ_ binding : ĠFragment Settings Binding ? Ġ= Ġnull ĊĠĠĠ Ġprivate Ġval Ġbinding Ġget () Ġ= Ġ_ binding !! ĊĊĠĠĠ Ġprivate Ġval Ġsettings Adapter Ġby Ġlazy Ġ{ ĊĠĠĠĠĠĠĠ ĠSettings Adapter () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( ĊĠĠĠĠĠĠĠ Ġinflater : ĠLayoutInflater , ĊĠĠĠĠĠĠĠ Ġcontainer : ĠViewGroup ?, ĊĠĠĠĠĠĠĠ ĠsavedInstanceState : ĠBundle ? ĊĠĠĠ Ġ): ĠView Ġ{ ĊĠĠĠĠĠĠĠ Ġ_ binding Ġ= ĠFragment Settings Binding . inflate ( layout Inflater ) ĊĠĠĠĠĠĠĠ Ġreturn Ġbinding . root ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĠĠĠĠĠĠĠ Ġinit RecyclerView () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġinit RecyclerView () Ġ{ ĊĠĠĠĠĠĠĠ Ġbinding . rv Settings . adapter Ġ= Ġsettings Adapter ĊĠĠĠĠĠĠĠ Ġbinding . rv Settings . addItem Decoration ( GridView Item Decoration ()) ĊĠĠĠĠĠĠĠ Ġsettings Adapter . set Items ( Settings . values (). to Mutable List ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Destroy View () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Destroy View () ĊĠĠĠĠĠĠĠ Ġ_ binding Ġ= Ġnull ĊĠĠĠ Ġ} Ċ }