Blackstar Blackstar - 2 months ago 18
Android Question

Tablayout , disable change between tabs with slide

I made a TabLayout and it's work fine , but I want to disable change between tabs with slide and make it change tabs only by clicking the tab name
is there a way to do it?

Answer

Just use the TabLayout without the ViewPager. In your onTabSelected, you load the view or fragment you want into the page container.