package Ġcom . line cy . interest ing . ui . transition Ċ Ċ import Ġandroid . databinding . ViewData Binding Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . support . v 7 . widget . Linear LayoutManager Ċ import Ġandroid . transition . Slide Ċ import Ġandroid . view . Gravity Ċ import Ġcom . line cy . interest ing . BR Ċ import Ġcom . line cy . interest ing . R Ċ import Ġcom . line cy . interest ing . R . layout Ċ import Ġcom . line cy . interest ing . data . Response Ċ import Ġcom . line cy . interest ing . ui . Base Activity Ċ import Ġcom . line cy . interest ing . ui . adapter . Custom Adapter Ċ import Ġkotlinx . android . synt hetic . main . layout _ recycler _ view . re cyclerView ĊĊ Ċ /** Ċ Ġ* Ċ Ġ* ĠSlide Ġ åĬ¨çĶ» ãĢĤ Ċ Ġ* Ċ Ġ* Ġå°Ĩ è§ĨåĽ¾ ä»İ è¾¹ ç¼ ĺ ï¼Ī ä¸Ĭ ãĢģ ä¸ĭ ãĢģ å·¦ ãĢģ åı³ ï¼ī ç§» åħ¥ åĴĮ ç§» åĩº ï¼Į åı¯ä»¥ è®¾ç½® æıĴ åĢ¼ åĻ¨ æĿ¥ æĶ¹åıĺ éĢŁ çİĩ , éĢļè¿ĩ ä»£çłģ åĴĮ åĪĽå»º transition åĬ¨çĶ» æĿ¥ å®ŀçİ° ï¼Į Ċ Ġ* Ġ æĺ¯ä¸Ģä¸ª çº¿ æĢ§ çļĦ åģı ç§» ãĢĤ Ċ Ġ* Ċ Ġ* Ġ@ author Ġby Ġline cy . Ċ Ġ*/ Ċ class ĠSlide Activity Ġ: ĠBase Activity < ViewData Binding >() Ġ{ ĊĊĠ Ġoverride Ġfun Ġlayout Res Id (): ĠInt Ġ{ ĊĠĠĠ Ġreturn ĠR . layout . layout _ recycler _ view ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Init View ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠ Ġwindow ?. let Ġ{ ĊĠĠĠĠĠ Ġval Ġslide Ġ= ĠSlide () ĊĠĠĠĠĠ Ġslide . slide Edge Ġ= ĠGr avity . END ĊĠĠĠĠĠ Ġslide . duration Ġ= Ġ 5 0 0 ĊĠĠĠĠĠ Ġit . enter Transition Ġ= Ġslide ĊĠĠĠĠĠ Ġit . exit Transition Ġ= Ġslide ĊĠĠĠĠĠ Ġit . re enter Transition Ġ= Ġslide ĊĠĠĠĠĠ Ġit . return Transition Ġ= Ġslide ĊĠĠĠ Ġ} ĊĠĠĠ Ġset Bottom Fab Image Resource ( R . drawable . ic _ arrow _ up ward _ white _ 2 4 dp ) ĊĠĠĠ Ġval Ġadapter Ġ= ĠCustom Adapter ( this , Ġint ArrayOf ( layout . layout _ item ), Ġint ArrayOf ( BR . item )) ĊĠĠĠ Ġre cyclerView . layout Manager Ġ= ĠLinearLayoutManager ( this ) ĊĠĠĠ Ġre cyclerView . adapter Ġ= Ġadapter ĊĠĠĠ Ġadapter . refresh Data ( Response . create List Data ( 1 0 )) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Bottom AppBar Fab () Ġ{ ĊĠĠĠ Ġif Ġ(( re cyclerView . adapter ?. item Count Ġ?: Ġ 0 ) Ġ> Ġ 0 ) Ġ{ ĊĠĠĠĠĠ Ġre cyclerView . scrollTo Position ( 0 ) ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ }