| | |
| | | import com.weikou.beibeivideo.entity.VideoInfo; |
| | | import com.weikou.beibeivideo.entity.VideoResource; |
| | | import com.weikou.beibeivideo.R; |
| | | import com.weikou.beibeivideo.util.VideoUtil; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | gv_episode2.setNumColumns(5); |
| | | } |
| | | |
| | | if (mVideoInfo.getVideoDetailList() != null |
| | | && !mVideoInfo.getVideoDetailList().isEmpty()) { |
| | | if (VideoUtil.videoEpisodeList != null |
| | | && !VideoUtil.videoEpisodeList.isEmpty()) { |
| | | gv_episode2.setAdapter(new GridEpisodeAdapter2(mVideoInfo, |
| | | mPlayingPosition)); |
| | | gv_episode2.setOnItemClickListener(new OnItemClickListener() { |
| | |
| | | .optString("Url")); |
| | | info.setParams(jsonObject.getJSONObject("Data") |
| | | .optString("Params")); |
| | | info.setAid(jsonObject.getJSONObject("Data") |
| | | .optString("Aid")); |
| | | info.setVid(jsonObject.getJSONObject("Data") |
| | | .optString("Vid")); |
| | | info.setCode(jsonObject.getJSONObject("Data") |
| | | .optString("Code")); |
| | | Play play = new Play(); |
| | | play.setPlayUrl(info); |
| | | EventBus.getDefault().post(play); |
| | |
| | | |
| | | public void onEventMainThread(VideoDetailInfo videoDetailInfo) { |
| | | int playingPosition = 0; |
| | | for (int i = 0; i < mVideoInfo.getVideoDetailList().size(); i++) { |
| | | for (int i = 0; i < VideoUtil.videoEpisodeList.size(); i++) { |
| | | if (videoDetailInfo.getId().equals( |
| | | mVideoInfo.getVideoDetailList().get(i).getId())) { |
| | | VideoUtil.videoEpisodeList.get(i).getId())) { |
| | | playingPosition = i; |
| | | break; |
| | | } |