package Ġde . kle inel am as . sv bro ck sche id . fragments Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroidx . lifecycle . Observer Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġde . kle inel am as . sv bro ck sche id . League Adapter Ċ import Ġde . kle inel am as . sv bro ck sche id . R Ċ import Ġde . kle inel am as . sv bro ck sche id . SV B App Ċ import Ġde . kle inel am as . sv bro ck sche id . model . Game LiveData Ċ import Ġkotlinx . android . synt hetic . main . fragment _ games .* Ċ import Ġkotlinx . android . synt hetic . main . fragment _ games . view .* Ċ import Ġjavax . inject . Inject ĊĊ Ċ /** Ċ Ġ* Ġ@ author ĠMat th ias ĠK ut sche id Ċ Ġ*/ Ċ class ĠGames Fragment Ġ: ĠFragment () Ġ{ ĊĊĠĠĠ Ġ@ Inject Ġlateinit Ġvar Ġgame Data Ġ: ĠGame LiveData ĊĠĠĠ Ġprivate Ġval Ġadapter : ĠLeague Adapter Ġ= ĠLeague Adapter () ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ ĠSV B App . component . inject ( this ) ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġgame Data . observe ( this , ĠObserver Ġ{ Ġgames Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġgames ?. let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġadapter . league Holder Ġ= Ġgames ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġswipe Layout . is Refresh ing Ġ= Ġfalse ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĠsavedInstanceState : ĠBundle ?): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ Ġ// ĠInf late Ġthe Ġlayout Ġfor Ġthis Ġfragment ĊĠĠĠĠĠĠĠ Ġval Ġview Ġ= Ġinflater . inflate ( R . layout . fragment _ games , Ġcontainer , Ġfalse ) ĊĠĠĠĠĠĠĠ Ġview ?. swipe Layout ?. setOn Refresh Listener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ// Ġget Ġthe Ġdata ĊĠĠĠĠĠĠĠĠĠĠĠ Ġgame Data . refresh () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġview ?. re cyclerView ?. layout Manager Ġ= ĠLinearLayoutManager ( view ?. re cyclerView ?. context , ĠRecyclerView . VERTICAL , Ġfalse ) ĊĠĠĠĠĠĠĠ Ġview ?. re cyclerView ?. adapter Ġ= Ġadapter ĊĠĠĠĠĠĠĠ Ġreturn Ġview ĊĠĠĠ Ġ} Ċ }