Code example for ViewPager

Methods: setAdapter

    public void setAdapter(PagerAdapter adapter) {
        if (!(adapter instanceof TaskListFragmentPagerAdapter))
            throw new ClassCastException("TaskListFragmentPager requires an adapter of type TaskListFragmentPagerAdapter"); //$NON-NLS-1$
     * Hack to enable reloading fragments while they are being viewed 
    public void forceReload() { 
        int position = getCurrentItem();
        setCurrentItem(position, false);
     * Show the supplied filter, adding it to the data source if it doesn't exist 
     * @param f 
Experience pair programming with AI  Get Codota for Java