@Override public void onListsChanged() { // refresh list adapter mListsAdapter.onListsChanged(); // update tabs mTabs.setViewPager(mPager); }
private void setupViews() { mListsAdapter = new ListsPagerAdapter(getSupportFragmentManager(), this); mPager = (ViewPager) findViewById(R.id.viewPagerTabs); mPager.setAdapter(mListsAdapter); mTabs = (SlidingTabLayout) findViewById(R.id.tabLayoutTabs); mTabs.setCustomTabView(R.layout.tabstrip_item_allcaps, R.id.textViewTabStripItem); mTabs.setSelectedIndicatorColors(getResources().getColor(R.color.white)); mTabs.setOnTabClickListener( new SlidingTabLayout.OnTabClickListener() { @Override public void onTabClick(int position) { if (mPager.getCurrentItem() == position) { showListManageDialog(position); } } }); mTabs.setViewPager(mPager); }