我使用ViewPager从设计库中使用TabLayout,使用函数setupWithViewPager链接它们.在更改选项卡内容后,应用程序在重新创建选项卡的情况下崩溃.崩溃痕迹:
java.lang.IllegalArgumentException: Tab belongs to a different TabLayout. at android.support.design.widget.TabLayout.addTab(TabLayout.java:433) at android.support.design.widget.TabLayout.populateFromPagerAdapter(TabLayout.java:772) at android.support.design.widget.TabLayout.setPagerAdapter(TabLayout.java:763) at android.support.design.widget.TabLayout.setupWithViewPager(TabLayout.java:715)
更新到支持库23.2.0后发生崩溃,直到v23.1.1才重现.