@Override public void onAttach(Activity activity) { super.onAttach(activity); ViewPagerHandler viewPagerHandler = getViewPagerHandler(); if (viewPagerHandler == null) viewPagerHandler = new ViewPagerHandler(getActivity()); mViewPagerItems = viewPagerHandler.getViewPagerItems(); }
@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); }