| | |
| | | |
| | | private int episodePage = 2;//当前页 |
| | | |
| | | //默认页大小为100 |
| | | private int pageSize = 100; |
| | | |
| | | private String fromName = null; |
| | | |
| | | public static DisplayImageOptions option = new DisplayImageOptions.Builder() |
| | |
| | | .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; |
| | |
| | | .getString("from", ""); |
| | | |
| | | mPlayingPosition = bundle.getInt("playing_position"); |
| | | pageSize = bundle.getInt("pageSize", 100); |
| | | mStart = bundle.getInt("start"); |
| | | mEnd = bundle.getInt("end"); |
| | | |
| | |
| | | break; |
| | | } |
| | | if (checkedResource != null) { |
| | | loadMoreEpisode(mVideoInfo.getId(), checkedResource.getId(), episodePage); |
| | | loadMoreEpisode(mVideoInfo.getId(), checkedResource.getId(), episodePage, pageSize); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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); |
| | |
| | | * @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 |