日常笔记
public void setTabsFromPagerAdapter(@NonNull PagerAdapter adapter){
removeAllTabs();
for (int i = 0, count = adapter.getCount(); i < count; i++) {
addTab(newTab().setText(adapter.getPageTitle(i)));
}
}