package Ġme . x tp . x ui . jet pack Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġkotlinx . android . synt hetic . main . activity _ view pager 2 .* Ċ import Ġme . x tp . x ui . R Ċ import Ġme . x tp . x ui . base . Base Activity Ċ Ċ class ĠView Pager 2 Activity Ġ: ĠBase Activity () Ġ{ ĊĊ ĉ override Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ Ċĉ ĉ super . onCreate ( savedInstanceState ) Ċĉ ĉ set ContentView ( R . layout . activity _ view pager 2 ) ĊĊĉ ĉ init View () Ċ ĉ } ĊĊ ĉ private Ġfun Ġinit View () Ġ{ Ċĉ ĉ view Pager . off screen Page Limit Ġ= Ġ 1 Ċĉ ĉ view Pager . set Page Transformer ( ViewPager 2 Transformer ()) Ċĉ ĉ val Ġadapter Ġ= ĠView Pager 2 Adapter () Ċĉ ĉ view Pager . adapter Ġ= Ġadapter Ċ ĉ } Ċ }