| | |
| | | package com.weikou.beibeivideo.ui.media; |
| | | |
| | | import android.app.Activity; |
| | | import android.content.Context; |
| | | import android.content.SharedPreferences; |
| | | import android.graphics.Canvas; |
| | | import android.graphics.Rect; |
| | | import android.os.Bundle; |
| | | import android.support.v4.view.ViewPager; |
| | | import android.support.v7.widget.GridLayoutManager; |
| | | import android.support.v7.widget.RecyclerView; |
| | | import android.text.Html; |
| | | import android.util.Log; |
| | |
| | | import android.view.animation.Animation; |
| | | import android.view.animation.RotateAnimation; |
| | | import android.view.animation.Transformation; |
| | | import android.widget.AdapterView; |
| | | import android.widget.AdapterView.OnItemClickListener; |
| | | import android.widget.FrameLayout; |
| | | import android.widget.GridView; |
| | | import android.widget.ImageView; |
| | | import android.widget.LinearLayout; |
| | | import android.widget.ScrollView; |
| | |
| | | import com.lcjian.library.RetainViewFragment; |
| | | import com.lcjian.library.util.common.DimenUtils; |
| | | import com.lcjian.library.util.common.StringUtils; |
| | | import com.qq.e.ads.cfg.VideoOption; |
| | | import com.qq.e.ads.nativ.ADSize; |
| | | import com.qq.e.ads.nativ.NativeExpressAD; |
| | | import com.qq.e.ads.nativ.NativeExpressADView; |
| | | import com.qq.e.comm.util.AdError; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.weikou.beibeivideo.BasicTextHttpResponseHandler; |
| | | import com.weikou.beibeivideo.BeibeiVideoAPI; |
| | | import com.weikou.beibeivideo.R; |
| | | import com.weikou.beibeivideo.entity.PushEpisode; |
| | | import com.weikou.beibeivideo.entity.VideoInfo; |
| | | import com.weikou.beibeivideo.entity.ad.ExpressAdContainer; |
| | | import com.weikou.beibeivideo.entity.video.FunshionPlayInfo; |
| | | import com.weikou.beibeivideo.ui.common.GridVideoAdapter1; |
| | | import com.weikou.beibeivideo.ui.media.VideoDetailActivity.ChangeVideoEvent; |
| | | import com.weikou.beibeivideo.entity.video.ChangeVideoEvent; |
| | | import com.weikou.beibeivideo.ui.video.IVideoClickListener; |
| | | import com.weikou.beibeivideo.ui.video.VideoColumn2Adapter; |
| | | import com.weikou.beibeivideo.util.BeibeiConstant; |
| | | import com.weikou.beibeivideo.util.ad.AdUtil; |
| | | import com.weikou.beibeivideo.util.ad.ExpressAdManager; |
| | | import com.weikou.beibeivideo.widget.FullyGridLayoutManager; |
| | | import com.weikou.beibeivideo.R; |
| | | |
| | | import org.apache.http.Header; |
| | | import org.json.JSONObject; |
| | |
| | | super.onResume(); |
| | | EventBus.getDefault().register(this); |
| | | MobclickAgent.onPageStart("播放详情—选集"); |
| | | Log.i(TAG,"onResume"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | isShowMore = false; |
| | | page_varietyshow = 0; |
| | | MobclickAgent.onPageEnd("播放详情—选集"); |
| | | Log.i(TAG,"onPause"); |
| | | } |
| | | |
| | | public void onEventMainThread(VideoInfo info) { |
| | | // Log.i("result", "收到来源点击产生的列表EventBus-------------1,电视剧的长度为:" + mVideoInfo.getVideoDetailList().size()); |
| | | int playingPosition = 0; |
| | | if (mPlayingPosition != playingPosition) { |
| | | mPlayingPosition = playingPosition; |
| | |
| | | public void onEventMainThread(PushEpisode info) { |
| | | if (mVideoInfo == null) |
| | | return; |
| | | // Log.i("result", "收到来源点击产生的列表EventBus-------------1,电视剧的长度为:" + mVideoInfo.getVideoDetailList().size()); |
| | | if (mVideoInfo.getShowType() == 1) {// 综艺 如果是综艺的话就分页加载 |
| | | if (info.getEpisodeNum() > 10) { |
| | | page_varietyshow = info.getEpisodeNum() / 10 + 1; |
| | |
| | | new ExpressAdManager(AdUtil.AD_TYPE.gdt2, getContext()).loadVideoDetailRelativeVideoBottomAd(new ExpressAdManager.IAdLoadListener() { |
| | | @Override |
| | | public void onSuccess(List<ExpressAdContainer> adList) { |
| | | if (adList != null && adList.size() > 0) |
| | | if (adList != null && adList.size() > 0) { |
| | | ExpressAdManager.renderAd(getActivity(), adList.get(0), new ExpressAdManager.IAdRenderListener() { |
| | | @Override |
| | | public void onRenderSuccess(List<ExpressAdContainer> adList) { |
| | |
| | | fl_native_ad_1.removeAllViews(); |
| | | } |
| | | }); |
| | | } else { |
| | | new ExpressAdManager(AdUtil.AD_TYPE.csj, getContext()).loadVideoDetailRelativeVideoBottomAd(new ExpressAdManager.IAdLoadListener() { |
| | | @Override |
| | | public void onSuccess(List<ExpressAdContainer> adList) { |
| | | if (adList != null && adList.size() > 0) { |
| | | ExpressAdManager.renderAndFillAd(getActivity(), adList.get(0), fl_native_ad_1, new ExpressAdManager.IAdEventListener() { |
| | | @Override |
| | | public void closeAd(ExpressAdContainer ad) { |
| | | fl_native_ad_1.removeAllViews(); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | }); |
| | |
| | | if (rv_video_related_video != null && adRunnable != null) |
| | | rv_video_related_video.removeCallbacks(adRunnable); |
| | | super.onDestroy(); |
| | | Log.i(TAG,"onDestroy"); |
| | | } |
| | | |
| | | @Override |
| | | public void onDestroyView() { |
| | | super.onDestroyView(); |
| | | Log.i(TAG,"onDestroyView"); |
| | | } |
| | | } |