I have the same problem, and I found that the new Tablayout uses a pool to cache Tab. in 23.1.1 public Tab newTab() { return new Tab(this); }
public Tab newTab() { return new Tab(this); }
and in 23.2.0 public Tab newTab() { Tab tab = sTabPool.acquire(); if (tab == null) { tab = new Tab(this); } tab.mView = createTabView(tab); return tab; }
public Tab newTab() { Tab tab = sTabPool.acquire(); if (tab == null) { tab = new Tab(this); } tab.mView = createTabView(tab); return tab; }
therefore, if you use newTab () to create a tab, and for some reason you did not add it to TableLayout. The next time you enter another action using TabLayout, this will happen.
source share