Search code examples
javaandroidtabsandroid-tablayoutpageviews

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?


Solution

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