Exemplo n.º 1
0
  @Override
  public void onAttach(Activity activity) {
    super.onAttach(activity);

    ViewPagerHandler viewPagerHandler = getViewPagerHandler();
    if (viewPagerHandler == null) viewPagerHandler = new ViewPagerHandler(getActivity());
    mViewPagerItems = viewPagerHandler.getViewPagerItems();
  }
Exemplo n.º 2
0
  @Override
  public void updateNavigationDrawerTopHandler(
      ViewPagerHandler viewPagerHandler, int defaultViewPagerPageSelectedPosition) {
    if (viewPagerHandler == null) viewPagerHandler = new ViewPagerHandler(getActivity());
    mViewPagerItems.clear();
    mViewPagerItems.addAll(viewPagerHandler.getViewPagerItems());
    mViewPagerAdapter.notifyDataSetChanged();

    selectPage(defaultViewPagerPageSelectedPosition);
  }