package Ġcom . example . device info . first čĊč Ċ import Ġandroid . os . Bundle č Ċ import Ġandroid . view . View č Ċ import Ġandroidx . fragment . app . Fragment č Ċ import Ġandroidx . fragment . app . view Models č Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager č Ċ import Ġandroidx . recyclerview . widget . RecyclerView č Ċ import Ġcom . example . device info . R č Ċ import Ġcom . x wr ay . group ie . Group Adapter č Ċ import Ġcom . x wr ay . group ie . Group ie ViewHolder č Ċ import Ġcom . x wr ay . group ie . group i ex . plus Assign čĊč Ċ /** čĊ Ġ* ĠA Ġsimple Ġ[ Fragment ] Ġsubclass Ġas Ġthe Ġdefault Ġdestination Ġin Ġthe Ġnavigation . čĊ Ġ*/ č Ċ class ĠSummary Fragment Ġ: ĠFragment ( R . layout . fragment _ list ) Ġ{ čĊĠĠĠ Ġprivate Ġval ĠviewModel Ġby Ġview Models < Summary ViewModel >() čĊčĊĠĠĠ Ġprivate Ġval Ġgroup Adapter Ġ= ĠGroup Adapter < Group ie ViewHolder >() čĊčĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ čĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) čĊčĊĠĠĠĠĠĠĠ Ġgroup Adapter . clear () čĊĠĠĠĠĠĠĠ Ġgroup Adapter Ġ+= ĠviewModel . getData Items ( require Context ()) čĊĠĠĠĠĠĠĠ Ġview . findViewById < RecyclerView >( R . id . first RecyclerView ). apply Ġ{ čĊĠĠĠĠĠĠĠĠĠĠĠ Ġadapter Ġ= Ġgroup Adapter čĊĠĠĠĠĠĠĠĠĠĠĠ Ġlayout Manager Ġ= ĠLinearLayoutManager ( require Context ()) čĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Has Fixed Size ( true ) čĊĠĠĠĠĠĠĠ Ġ} čĊĠĠĠ Ġ} č Ċ } čĊ