package Ġcom . vl ad isl aw fox . base . presentation . adapter Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . graphics . Color Ċ import Ġandroid . view . Gravity Ċ import Ġandroidx . core . content . Context Compat Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġandroidx . recyclerview . widget . Snap Helper Ċ import Ġcom . air bnb . e po xy . Carousel Ċ import Ġcom . air bnb . e po xy . Model View Ċ import Ġcom . vl ad isl aw fox . base . R Ċ import Ġme . everything . android . ui . over scroll . Over Scroll Decorator Helper Ċ Ċ /** Ċ Ġ* ĠCreated Ġby Ġv lad isl aw fox Ġon Ġ 1 / 3 1 / 1 9 . Ċ Ġ*/ Ċ @ Model View ( save ViewState Ġ= Ġtrue , Ġauto Layout Ġ= ĠModel View . Size . MATCH _ WIDTH _ WRAP _ HEIGHT ) Ċ open Ġclass ĠCar ousel View ( context : ĠContext ) Ġ: ĠCar ousel ( context ) Ġ{ ĊĊĠ Ġprivate Ġlateinit Ġvar Ġlinear LayoutManager : ĠLinearLayoutManager ĊĊĠ Ġoverride Ġfun Ġinit () Ġ{ ĊĠĠĠ Ġset BackgroundColor ( Context Compat . getColor ( context , ĠR . color . color Primary )) ĊĠĠĠ ĠCar ousel . setDefault Global Snap Helper Factory ( object Ġ: ĠCar ousel . Snap Helper Factory () Ġ{ ĊĠĠĠĠĠ Ġoverride Ġfun Ġbuild Snap Helper ( context : ĠContext ): ĠSnap Helper Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠGr avity Snap Helper ( Gravity . START , Ġtrue ) ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ}) ĊĠĠĠ Ġsuper . init () ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġcreate LayoutManager (): ĠRecyclerView . LayoutManager Ġ{ ĊĠĠĠ Ġreturn ĠLinearLayoutManager ( context , ĠLinearLayoutManager . HORIZONTAL , Ġfalse ). apply Ġ{ ĊĠĠĠĠĠ Ġset Clip To Padding ( false ) ĊĠĠĠĠĠ Ġlinear LayoutManager Ġ= Ġthis ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ }