Code example for ViewPager

Methods: getAdaptergetCurrentItemsetCurrentItem

0
 
    /** 
     * Hack to enable reloading fragments while they are being viewed 
     */ 
    public void forceReload() { 
        int position = getCurrentItem();
        setAdapter(getAdapter()); 
        setCurrentItem(position, false);
    } 
 
    /** 
     * Show the supplied filter, adding it to the data source if it doesn't exist 
     * @param f 
     */ 
    public void showFilter(Filter f) { 
        TaskListFragmentPagerAdapter adapter = (TaskListFragmentPagerAdapter) getAdapter();
        showFilter(adapter.addOrLookup(f));
    } 
 
    /** 
Connect your IDE to all the code out there  Get Codota for Java