Home > Blockchain >  Only show 5 dot indicators for viewpager remaing i need to hide
Only show 5 dot indicators for viewpager remaing i need to hide

Time:12-08

I added dot indicators for viewpager, In that viewpages when I have 15 datas, dot indicators also 15 dots showing. but I don't want that I need to show only 5 dot indicators eventhough I'm having 20 datas in my view pager

 private fun setUpTabs(binding: FragmentHomeBinding, viewpager: ViewPagerAdapter) {
    binding.viewPagerNews.adapter = viewpager
    binding.indicatorContainer.setViewPager(binding.viewPagerNews)
}

enter image description here I need to show like this

enter image description here I'm getting like this

CodePudding user response:

enter image description here

  • Related