package Ġio . ex zo coin . wallet . modules . coin . coin mark ets Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . navigation . nav Graph ViewModels Ċ import Ġio . ex zo coin . wallet . R Ċ import Ġio . ex zo coin . wallet . core . Base Fragment Ċ import Ġio . ex zo coin . wallet . modules . coin . Coin ViewModel Ċ import Ġio . ex zo coin . core . find Nav Controller Ċ import Ġkotlinx . android . synt hetic . main . fragment _ coin _ mark ets .* Ċ Ċ class ĠCoin Mark ets Fragment Ġ: ĠBase Fragment () Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġcoin ViewModel Ġby Ġnav Graph ViewModels < Coin ViewModel >( R . id . coin Fragment ) ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĠsavedInstanceState : ĠBundle ?): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġinflater . inflate ( R . layout . fragment _ coin _ mark ets , Ġcontainer , Ġfalse ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĊĠĠĠĠĠĠĠ Ġtoolbar . title Ġ= ĠgetString ( R . string . Coin Market _ Title , Ġcoin ViewModel . coin Code ) ĊĠĠĠĠĠĠĠ Ġtoolbar . set Navigation OnClickListener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfind Nav Controller (). pop Back Stack () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġval Ġmarket Items Adapter Ġ= ĠCoin Market Item Adapter () ĊĊĠĠĠĠĠĠĠ Ġre cyclerView . adapter Ġ= Ġmarket Items Adapter ĊĊĠĠĠĠĠĠĠ Ġcoin ViewModel . coin Mark ets . observe ( view Lifecycle Owner , Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmarket Items Adapter . submit List ( it ) ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠ Ġ} Ċ Ċ } Ċ