admin
2021-04-07 cbb88109494ffc7916f6639c20ce05c0cec941a9
BuWanVideo/src/com/weikou/beibeivideo/ui/media/EpisodeFragment.java
@@ -111,6 +111,9 @@
    private int episodePage = 2;//当前页
    //默认页大小为100
    private int pageSize = 100;
    private String fromName = null;
    public static DisplayImageOptions option = new DisplayImageOptions.Builder()
@@ -127,13 +130,14 @@
            .build();
    public static EpisodeFragment newInstance(VideoInfo videoInfo,
                                              int playingPosition, int start, int end, String from) {
                                              int playingPosition, int pageSize, int start, int end, String from) {
        EpisodeFragment episodeFragment = new EpisodeFragment();
        Bundle args = new Bundle();
        args.putSerializable("video_info", videoInfo);
        args.putInt("playing_position", playingPosition);
        args.putInt("start", start);
        args.putInt("end", end);
        args.putInt("pageSize", pageSize);
        args.putString("from", from);
        episodeFragment.setArguments(args);
        return episodeFragment;
@@ -240,6 +244,7 @@
                .getString("from", "");
        mPlayingPosition = bundle.getInt("playing_position");
        pageSize = bundle.getInt("pageSize", 100);
        mStart = bundle.getInt("start");
        mEnd = bundle.getInt("end");
@@ -338,7 +343,7 @@
                            break;
                        }
                        if (checkedResource != null) {
                            loadMoreEpisode(mVideoInfo.getId(), checkedResource.getId(), episodePage);
                            loadMoreEpisode(mVideoInfo.getId(), checkedResource.getId(), episodePage, pageSize);
                        }
                    }
                }
@@ -790,7 +795,7 @@
            ImageView iv = view.findViewById(R.id.iv_resource);
            TextView tv = view.findViewById(R.id.tv_resource);
            try {
                Glide.with(getActivity().getApplicationContext())
                Glide.with(iv)
                        .load(reList.get(position).getPicture())
                        .apply(new RequestOptions().placeholder(R.drawable.from_other).error(R.drawable.from_other))
                        .into(iv);
@@ -1014,8 +1019,8 @@
     * @param videoId
     * @param resourceId
     */
    private synchronized void loadMoreEpisode(String videoId, String resourceId, int page) {
        BeibeiVideoAPI.getVideoEpisodeList(ll_add_attention.getContext(), UserUtil.getUid(getContext()), resourceId, videoId, page, new
    private synchronized void loadMoreEpisode(String videoId, String resourceId, int page, int pageSize) {
        BeibeiVideoAPI.getVideoEpisodeList(ll_add_attention.getContext(), UserUtil.getUid(getContext()), resourceId, videoId, page, pageSize, new
                BasicTextHttpResponseHandler() {
                    @Override