Code example for PagerAdapter

Methods: notifyDataSetChanged

0
     * 
     * @param tabHolders the new backstack 
     */ 
    public void setBackStack(ArrayList<TabHolder> tabHolders) {
        mTabHolders = tabHolders;
        notifyDataSetChanged(); 
    } 
 
    /** 
     * Add a new Fragment to the backstack (should only be used when the TabsAdapter is not yet 
     * fully instantiated, otherwise use the replace(...) methods) 
     * 
     * @param position           position of the backStack 
     * @param clss               the class of the fragment that should be added 
     * @param tomahawkListItemId the corresponding tomahawkListItem. If not needed this should be 
     *                           -1 
     */ 
    public void addFragmentToBackStack(int position, Class clss, long tomahawkListItemId,
            String tomahawkListItemType) {
        FragmentStateHolder fSH = new FragmentStateHolder(clss,
                getFragmentTag(getCurrentPosition(), 1), tomahawkListItemId, tomahawkListItemType);