Ejemplo n.º 1
0
 @Override
 public void onListsChanged() {
   // refresh list adapter
   mListsAdapter.onListsChanged();
   // update indicator and view pager
   mTabs.notifyDataSetChanged();
 }
  public void setViewPager(ViewPager pager) {
    this.pager = pager;

    if (pager.getAdapter() == null) {
      throw new IllegalStateException("ViewPager does not have adapter instance.");
    }

    pager.setOnPageChangeListener(pageListener);

    notifyDataSetChanged();
  }