Solution :
I hope you know that the support libraries have changed. Now with the new support library (currently using 23.2.1) you must only add to your Viewpager and you must not to the TabLayout otherwise you will end up with the new behavior showing double tabs and other very funky and different behavior.
I am giving you the below methods which you can use in your code to fix your issues.
You need to add the removeTabPage method as shown below to your PagerAdapter
public void removeTabPage(int position) {
if (!tabItems.isEmpty() && position<tabItems.size()) {
tabItems.remove(position);
notifyDataSetChanged();
}
}
Also you need to add the addTabPage method as shown below to your PagerAdapter
public void addTabPage(String title) {
tabItems.add(title);
notifyDataSetChanged();
}
If you want to remove all the tabs from the tabLayout then you can use below code
tabLayout.removeAllTabs();