package Ġdebug Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . support . v 7 . app . AppCompatActivity Ċ import Ġandroid . support . v 7 . widget . Linear LayoutManager Ċ import Ġandroid . support . v 7 . widget . RecyclerView Ċ import Ġcom . any . banner library . Banner View Ċ import Ġcom . any . banner library . R Ċ Ċ /** Ċ Ġ* Ċ Ġ* Ġ@ author Ġany Ċ Ġ* Ġ@ time Ġ 2 0 1 9 / 0 6 / 1 2 Ġ 1 7 . 1 5 Ċ Ġ* Ġ@ details Ċ Ġ*/ Ċ class ĠMainActivity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . b np k _ main _ activity ) ĊĊĊĠĠĠĠĠĠĠ Ġval Ġbn View : Banner View Ġ= ĠfindViewById ( R . id . banner _ view ) ĊĊĠĠĠĠĠĠĠ Ġval Ġadapter Ġ= ĠBanner Adapter () ĊĊĠĠĠĠĠĠĠ Ġbn View . setAdapter ( adapter ) ĊĊĊĠĠĠĠĠĠĠ Ġval Ġlinear LayoutManager : Linear LayoutManager Ġ= ĠLinearLayoutManager ( this ) ĊĊĠĠĠĠĠĠĠ Ġval Ġre cyclerView : RecyclerView Ġ= ĠRecyclerView ( this ) ĊĊĠĠĠĠĠĠĠ Ġre cyclerView . layout Manager Ġ= Ġlinear LayoutManager ĊĠĠĠ Ġ} Ċ }