package Ġcom . ko be . recyclerview _ in _ scroll view Ċ Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġandroid . view . View Ċ import Ġkotlinx . android . synt hetic . main . activity _ main .* Ċ Ċ class ĠMainActivity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ main ) ĊĊĠĠĠĠĠĠĠ Ġre cyclerView . over Scroll Mode Ġ= ĠView . OVER _ SCROLL _ NE VER ĊĊĠĠĠĠĠĠĠ Ġval Ġlinear LayoutManager Ġ= ĠLinearLayoutManager ( this ) ĊĠĠĠĠĠĠĠ Ġlinear LayoutManager . orientation Ġ= ĠLinearLayoutManager . VERTICAL ĊĠĠĠĠĠĠĠ Ġlinear LayoutManager . scrollTo Position ( 0 ) ĊĠĠĠĠĠĠĠ Ġre cyclerView . layout Manager Ġ= Ġlinear LayoutManager ĊĊĠĠĠĠĠĠĠ Ġval Ġadapter Ġ= ĠMy RecyclerView Adapter ( this ) ĊĠĠĠĠĠĠĠ Ġre cyclerView . adapter Ġ= Ġadapter ĊĠĠĠ Ġ} Ċ } Ċ