package Ġru . mobile up . rx paging loading . sample . loading Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġcom . jak ew h art on . r xb ind ing 3 . view . click s Ċ import Ġcom . jak ew h art on . r xb ind ing 3 . view . visibility Ċ import Ġkotlinx . android . synt hetic . main . activity _ loading .* Ċ import Ġkotlinx . android . synt hetic . main . layout _ empty _ view .* Ċ import Ġkotlinx . android . synt hetic . main . layout _ error _ view .* Ċ import Ġkotlinx . android . synt hetic . main . layout _ progress _ view .* Ċ import Ġme . dm dev . rx pm . base . Pm Activity Ċ import Ġme . dm dev . rx pm . bind To Ċ import Ġru . mobile up . rx paging loading . sample . R Ċ Ċ class ĠLoading Activity Ġ: ĠP m Activity < Loading Pm >() Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ loading ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġprovide Presentation Model (): ĠLoading Pm Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠLoading Pm ( Data Repository ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Bind Presentation Model ( pm : ĠLoading Pm ) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġpm . content Ġbind To Ġ{ Ġcontent View . text Ġ= Ġit . text Ġ} ĊĊĠĠĠĠĠĠĠ Ġpm . isLoading Ġbind To ĠprogressBar . visibility () ĊĊĠĠĠĠĠĠĠ Ġpm . content View Visible Ġbind To Ġcontent View . visibility () ĊĠĠĠĠĠĠĠ Ġpm . empty View Visible Ġbind To Ġempty View . visibility () ĊĠĠĠĠĠĠĠ Ġpm . error View Visible Ġbind To Ġerror View . visibility () ĊĊĠĠĠĠĠĠĠ Ġretry Button . click s () Ġbind To Ġpm . retry Action ĊĠĠĠĠĠĠĠ Ġforce Refresh Button . click s () Ġbind To Ġpm . force Refresh Action ĊĠĠĠ Ġ} Ċ }