I have a TabLayout with id=tabLayout . It has two tabs that scroll pages in ViewPager 'e. Pages are added programmatically using fragments. How can I make the active tab have a bar at the bottom when opening a certain page?

    1 answer 1

    Add to your markup in the TabLayout tag

     app:tabIndicatorHeight="1dp" 

    And color to pile

     app:tabIndicatorColor="@android:color/white"