ongakuer / CircleIndicator

A lightweight indicator like in nexus 5 launcher
Apache License 2.0
4.27k stars 714 forks source link

RecyclerView + PagerSnapHelper #145

Open GodFan4 opened 4 years ago

GodFan4 commented 4 years ago

list.size is 15, one page have 3. so pages is 5 How to make the number of indicators the same as the number of pages,not same as the list.siz

val layoutManager = GridLayoutManager(this,3,GridLayoutManager.HORIZONTAL,false) recyclerview.layoutManager = layoutManager val snapHelper = PagerSnapHelper() snapHelper.attachToRecyclerView(recyclerview) circleIndicator.attachToRecyclerView(recyclerview,snapHelper)

ongakuer commented 3 years ago

manual-control https://github.com/ongakuer/CircleIndicator#manual-control