private void initView() { mImgFollowMe = (ImageView) findViewById(R.id.image_notice); mImgFollowMe.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { if (!isCatch) { catchMeRequest(); } else { dropCatch(); } } }); // mImgFav = (ImageView) findViewById(R.id.image_fav); // mImgFav.setImgStateChangeListener(this); mRadioGroup = (FlowRadioGroup) this.findViewById(R.id.video_detail_radiogroup); mRadioGroup.setOnCheckedChangeListener(mRadioCheckedChangeListener); mRadioGroup.getRadioButton(0).setChecked(true); bar = (ProgressBar) findViewById(R.id.videoplayerPreloader); video_down_layout = (RelativeLayout) findViewById(R.id.video_down_layoutx); mVideoView = (cn.fxdata.tv.view.video.FullScreenVideoView) findViewById(R.id.video_viewx); mDownloadImage = (ImageView) findViewById(R.id.image_download); mDownloadImage.setOnClickListener(this); btnShare = (ImageView) findViewById(R.id.image_share); btnShare.setOnClickListener(this); image_fav = (ImageView) findViewById(R.id.image_fav); image_fav.setOnClickListener(this); }
@Override public void onSuccess(String response) { Log.d(TAG, "the response --> " + response); Movie movie = MJsonUtil.gson.fromJson(response, new TypeToken<Movie>() {}.getType()); if (movie.getErrorCode() == 0) { mCurrentMovieDetail = movie; videoUri = movie.getData().getFilmUrl(); String title = movie.getData().getMovieName(); Log.d(TAG, "reponse video url: " + videoUri + " the name -->> " + title); mVideoView.setVideoURI(Uri.parse(videoUri), title); mVideoView.requestFocus(); // updateShareTVdatabase(movie, // mVideoView.getCurrentPosition()); int mPostion = getIntent().getIntExtra(Constants.MovieExtra.EXTRA_MOVIE_POSTION, 0); Log.d(TAG, "mPostion: " + mPostion); mVideoView.seekTo(mPostion); mVideoView.start(); // 需要更新底部的Fragment的信息 if (mNeedShowChildFragmentLater) { mNeedShowChildFragmentLater = false; Log.d(TAG, "show child fragment later"); showChildFragment(mRadioGroup.getCheckedRadioButtonId()); } } else { Log.d(TAG, movie.getErrorMsg()); } }