admin
2021-04-07 cbb88109494ffc7916f6639c20ce05c0cec941a9
BuWanVideo/src/com/weikou/beibeivideo/ui/media/VideoEpisodeFragment.java
@@ -81,11 +81,12 @@
    private String from;
    public static VideoEpisodeFragment newInstance(VideoInfo videoInfo,
                                                   int playingPostion, String from) {
                                                   int playingPostion, int pageSize, String from) {
        VideoEpisodeFragment videoEpisodeFragment = new VideoEpisodeFragment();
        Bundle args = new Bundle();
        args.putSerializable("video_info", videoInfo);
        args.putInt("playing_position", playingPostion);
        args.putInt("pageSize", pageSize);
        args.putString("from", from);
        videoEpisodeFragment.setArguments(args);
        return videoEpisodeFragment;
@@ -140,12 +141,16 @@
        return R.layout.video_episode_fragment;
    }
    private int pageSize = 100;
    @Override
    public void onCreateView(View contentView, Bundle savedInstanceState) {
        Log.d(TAG, "onCreateView");
        sv_detail = contentView.findViewById(R.id.sv_detail);
        mVideoInfo = (VideoInfo) getArguments().getSerializable("video_info");
        mPlayingPosition = getArguments().getInt("playing_position");
        pageSize = getArguments().getInt("pageSize", 100);
        if (getArguments() != null)
            getArguments().clear();
        // ******简介*******
@@ -191,7 +196,7 @@
            return;
        mEpisodePagerAdapter = new EpisodePagerAdapter(
                getChildFragmentManager(), mVideoInfo, mPlayingPosition, from);
                getChildFragmentManager(), mVideoInfo, mPlayingPosition, pageSize, from);
        //
        vp_episode.setAdapter(mEpisodePagerAdapter);
        // 指示当前播放页---hxh
@@ -381,8 +386,9 @@
        if (mPlayingPosition != playingPosition) {
            mPlayingPosition = playingPosition;
        }
        pageSize = info.getPageSize();
        mEpisodePagerAdapter = new EpisodePagerAdapter(
                getChildFragmentManager(), info, mPlayingPosition, from);
                getChildFragmentManager(), info, mPlayingPosition, pageSize, from);
        //
        vp_episode.setAdapter(mEpisodePagerAdapter);
    }