@H_502_2@我尝试了很多种方式来分享viewpager但是失败了.请给我一个想法
TabLayout topTabLayout = (TabLayout) findViewById(R.id.topTabLayout); topTabLayout.addTab(topTabLayout.newTab().setText("Tab 1")); topTabLayout.addTab(topTabLayout.newTab().setText("Tab 2")); topTabLayout.addTab(topTabLayout.newTab().setText("Tab 3")); TabLayout bottomTabLayout =(TabLayout)findViewById(R.id.bottomTabLayout); bottomTabLayout.addTab(bottomTabLayout.newTab().setText("Tab 4")); bottomTabLayout.addTab(bottomTabLayout.newTab().setText("Tab 5")); bottomTabLayout.addTab(bottomTabLayout.newTab().setText("Tab 6"));