ControllerFragment.java 文件源码

java
阅读 21 收藏 0 点赞 0 评论 0

项目:MiraSlide 作者:
/** We create the viewpager which shows the pages of the pdf file. If the user change the slide, the listener
 * updates tell the parent Activity to change the image in the presentation.
 * 
 * @param v : the fragment view
 */
private void createViewPager(View v) {
    mSlidesPagerAdapter = new SlidesPagerAdapter(((FragmentActivity) getActivity()).getSupportFragmentManager());
    mSlidesViewPager = (ViewPager) v.findViewById(R.id.fragment_controller_pager);
    mSlidesViewPager.setAdapter(mSlidesPagerAdapter);
    mSlidesViewPager.setOnPageChangeListener(new SimpleOnPageChangeListener() {

        @Override
        public void onPageSelected(int page) {
            ((MainActivity) getActivity()).getPresentation().moveTo(page);
        }
    });
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号