setCurrentItem of nested viewpager
问题 I have a ViewPager nested in a fragment, and when the device changes orientation I'd like to save and restore which page the ViewPager was on. I'm currently doing this: @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mViewPager = (ViewPager) inflater.inflate(R.layout.activity_albumpicker, container, false); // Create the adapter that will return a fragment for each of the three // primary sections of the activity.