package Ġcom . ak bol at ss . workshop . sl iding panel . sample app . examples . scroll able view Ċ Ċ import Ġandroid . annotation . Suppress Lint Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġcom . ak bol at ss . workshop . sl iding panel . Panel State Ċ import Ġcom . ak bol at ss . workshop . sl iding panel . sample app . R Ċ import Ġcom . ak bol at ss . workshop . sl iding panel . sample app . utils . Dummy ListItem Ċ import Ġcom . ak bol at ss . workshop . sl iding panel . sample app . utils . adapters . RecyclerView Adapter Ċ import Ġkotlinx . android . synt hetic . main . activity _ basic _ horizontal _ example .* Ċ import Ġkotlinx . android . synt hetic . main . recycler _ view .* Ċ Ċ class ĠScroll ableView Example Activity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġ@ Suppress Lint (" SetText I 1 8 n ") ĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ scroll able _ view _ example ) ĊĊĠĠĠĠĠĠĠ Ġre cycler _ view . layout Manager Ġ= ĠLinearLayoutManager ( this ) ĊĠĠĠĠĠĠĠ Ġre cycler _ view . adapter Ġ= ĠRecyclerView Adapter ( Dummy ListItem . ITEMS ) ĊĊĠĠĠĠĠĠĠ Ġval Ġformatter Ġ= Ġ"% . 2 f " ĊĊĠĠĠĠĠĠĠ Ġsl iding _ panel . add Slide Listener Ġ{ Ġ_, Ġstate , Ġcurrent Slide Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġwhen Ġ( state ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠPanel State . EXP AN DED Ġ-> Ġpanel _ state _ text _ view . text Ġ= Ġ" Sl iding Ġview ĠEX PAN DED : Ġ${ formatter . format ( current Slide )}" ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠPanel State . COLL AP SED Ġ-> Ġpanel _ state _ text _ view . text Ġ= Ġ" Sl iding Ġview ĠCOL LAP SED : Ġ${ formatter . format ( current Slide )}" ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠPanel State . SL ID ING Ġ-> Ġpanel _ state _ text _ view . text Ġ= Ġ" Sl iding Ġview ĠSL ID ING : Ġ${ formatter . format ( current Slide )}" ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġre cycler _ view . alpha Ġ= Ġ 0 f ĊĠĠĠĠĠĠĠ Ġsl iding _ panel . add Slide Listener Ġ{ Ġ_, Ġ_, Ġcurrent Slide Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġre cycler _ view . alpha Ġ= Ġcurrent Slide ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }