package Ġcom . github . sky fe 7 9 . android . library . app . examples . counter Ċ Ċ import Ġandroidx . lifecycle . ViewModel Providers Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġcom . github . sky fe 7 9 . android . react component kit . rx . Auto Dispose Bag Ċ import Ġcom . github . sky fe 7 9 . android . react component kit . rx . dis posed By Ċ import Ġorg . jetbrains . ank o . set ContentView Ċ Ċ class ĠCounter Activity : ĠAppCompatActivity () Ġ{ ĊĠĠĠ Ġprivate Ġval Ġdispose Bag : ĠAuto Dispose Bag Ġby Ġlazy Ġ{ ĊĠĠĠĠĠĠĠ ĠAuto Dispose Bag ( this ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar ĠviewModel : ĠCounter ViewModel ĊĠĠĠ Ġprivate Ġval Ġlayout : ĠCounter Layout Ġby Ġlazy Ġ{ ĊĠĠĠĠĠĠĠ ĠCounter Layout ( viewModel . token ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĊĠĠĠĠĠĠĠ ĠviewModel Ġ= ĠViewModel Providers . of ( this ). get ( Counter ViewModel :: class . java ) ĊĠĠĠĠĠĠĠ Ġlayout . set ContentView ( this ) ĊĊĠĠĠĠĠĠĠ Ġlayout . count TextView . text Ġ= Ġ"${ viewModel . count . value }" ĊĠĠĠ Ġ} Ċ }