本文整理汇总了Java中android.support.v13.app.FragmentStatePagerAdapter类的典型用法代码示例。如果您正苦于以下问题:Java FragmentStatePagerAdapter类的具体用法?Java FragmentStatePagerAdapter怎么用?Java FragmentStatePagerAdapter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FragmentStatePagerAdapter类属于android.support.v13.app包,在下文中一共展示了FragmentStatePagerAdapter类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onViewCreated
import android.support.v13.app.FragmentStatePagerAdapter; //导入依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
ViewPager viewPager = (ViewPager) view;
viewPager.setAdapter(new FragmentStatePagerAdapter(getFragmentManager()) {
@Override
public Fragment getItem(int position) {
return SimpleImageFragment.getFragment(mUrls.get(position));
}
@Override
public int getCount() {
return mUrls.size();
}
});
viewPager.setPageTransformer(true, new PageTransformer.ZoomOutPageTransformer());
viewPager.setCurrentItem(mCurrentIndex);
}
示例2: getPagerAdapter
import android.support.v13.app.FragmentStatePagerAdapter; //导入依赖的package包/类
@Override
public FragmentStatePagerAdapter getPagerAdapter() {
return new ImgurAlbumPagerAdapter(getFragmentManager(), getImages());
}
示例3: getPagerAdapter
import android.support.v13.app.FragmentStatePagerAdapter; //导入依赖的package包/类
public FragmentStatePagerAdapter getPagerAdapter() {
return new CursorPagerAdapter(getFragmentManager(), null);
}
示例4: getPagerAdapter
import android.support.v13.app.FragmentStatePagerAdapter; //导入依赖的package包/类
@Override
public FragmentStatePagerAdapter getPagerAdapter() {
return new CursorPagerAdapterFree(getFragmentManager(), null);
}
示例5: getPagerAdapter
import android.support.v13.app.FragmentStatePagerAdapter; //导入依赖的package包/类
public FragmentStatePagerAdapter getPagerAdapter() {
return new ImgurAlbumPagerAdapterFree(getFragmentManager(), getImages());
}
示例6: getPagerAdapter
import android.support.v13.app.FragmentStatePagerAdapter; //导入依赖的package包/类
/**
* Get the adapter for the ViewPager. It is expected that it will return a subclass of
* FragmentStatePagerAdapter
*
* @return The adapter for the ViewPager
*/
public abstract FragmentStatePagerAdapter getPagerAdapter();