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)
}
CodePudding user response: