本文整理匯總了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();