package Ġcom . h af iz code . movies and tv . ui . bookmark . view Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġcom . h af iz code . movies and tv . databinding . Activity Bookmark Binding Ċ import Ġcom . h af iz code . movies and tv . ui . home . content . helper . Data ViewModel Ċ import Ġcom . h af iz code . movies and tv . view model . ViewModel Factory Ċ Ċ class ĠBook mark Activity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġdata ViewModel : ĠData ViewModel ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĊĠĠĠĠĠĠĠ Ġval Ġactivity Bookmark Binding Ġ= ĠActivity Bookmark Binding . inflate ( layout Inflater ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( activity Bookmark Binding . root ) ĊĊĠĠĠĠĠĠĠ Ġval Ġfactory Ġ= ĠViewModel Factory . getInstance ( application Context ) ĊĠĠĠĠĠĠĠ Ġdata ViewModel Ġ= ĠViewModel Provider ( this , Ġfactory )[ Data ViewModel :: class . java ] ĊĊĠĠĠĠĠĠĠ Ġval Ġbookmark Section Pager Adapter Ġ= ĠBook mark Section Pager Adapter ( this , Ġsupport FragmentManager ) ĊĠĠĠĠĠĠĠ Ġactivity Bookmark Binding . view Pager Bookmark . adapter Ġ= Ġbookmark Section Pager Adapter ĊĠĠĠĠĠĠĠ Ġactivity Bookmark Binding . tabs Bookmark . setup With ViewPager ( activity Bookmark Binding . view Pager Bookmark ) ĊĠĠĠ Ġ} Ċ }