I have a tablayout that contains a ViewPager, and I have two fragments. When I changed the screen by clicking on tab1 or tab2, for example, it changed the normal tab, but when I used the finger drag to go to the other screen, it changed the screen, but the tablayout indicator remained unchanged. p>
For example, I was on tab2 and the indicator was on tab1. To fix this I used setupWithViewPager(viewPager)
, so the indicator changes as I drag my finger through the tabs.
The problem is that when I use this attribute the tab titles disappear. How can I resolve this?