| | |
| | | import com.qq.e.comm.util.AdError; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.viewpagerindicator.TabPageIndicator; |
| | | import com.yeshi.base.entity.ad.AdPositionEnum; |
| | | import com.yeshi.base.entity.video.VideoInfo; |
| | | import com.yeshi.base.utils.BeibeiConstant; |
| | | import com.yeshi.base.utils.JsonUtil; |
| | | import com.yeshi.base.utils.ad.AdUtil; |
| | | import com.yeshi.base.utils.ad.GDTConstant; |
| | | import com.yeshi.base.utils.http.BasicTextHttpResponseHandler; |
| | | import com.yeshi.video.R; |
| | |
| | | |
| | | } |
| | | }); |
| | | if (BeibeiConstant.ADSHOW) { |
| | | if (AdUtil.getAdType(getContext(), AdPositionEnum.other) != null) { |
| | | // loadAD1(); |
| | | loadAD(); |
| | | } |
| | |
| | | Header[] headers, JSONObject jsonObject) |
| | | throws Exception { |
| | | if (jsonObject.getBoolean("IsPost")) { |
| | | Gson gson = new GsonBuilder().setFieldNamingPolicy( |
| | | FieldNamingPolicy.UPPER_CAMEL_CASE) |
| | | .create(); |
| | | List<VideoInfo> videoInfos = gson.fromJson( |
| | | List<VideoInfo> videoInfos = JsonUtil.videoGson.fromJson( |
| | | jsonObject.getJSONObject("Data") |
| | | .getJSONArray("data").toString(), |
| | | new TypeToken<List<VideoInfo>>() { |
| | |
| | | Header[] headers, JSONObject jsonObject) |
| | | throws Exception { |
| | | if (jsonObject.getBoolean("IsPost")) { |
| | | Gson gson = new GsonBuilder().setFieldNamingPolicy( |
| | | FieldNamingPolicy.UPPER_CAMEL_CASE) |
| | | .create(); |
| | | List<VideoInfo> videoInfos = gson.fromJson( |
| | | List<VideoInfo> videoInfos = JsonUtil.videoGson.fromJson( |
| | | jsonObject.getJSONObject("Data") |
| | | .getJSONArray("data").toString(), |
| | | new TypeToken<List<VideoInfo>>() { |
| | |
| | | Header[] headers, JSONObject jsonObject) |
| | | throws Exception { |
| | | if (jsonObject.getBoolean("IsPost")) { |
| | | Gson gson = new GsonBuilder().setFieldNamingPolicy( |
| | | FieldNamingPolicy.UPPER_CAMEL_CASE) |
| | | .create(); |
| | | List<VideoInfo> videoInfos = gson.fromJson( |
| | | List<VideoInfo> videoInfos = JsonUtil.videoGson.fromJson( |
| | | jsonObject.getJSONObject("Data") |
| | | .getJSONArray("data").toString(), |
| | | new TypeToken<List<VideoInfo>>() { |
| | |
| | | public void onResume() { |
| | | super.onResume(); |
| | | EventBus.getDefault().register(this); |
| | | MobclickAgent.onPageStart("播放详情—选集"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | EventBus.getDefault().unregister(this); |
| | | isShowMore = false; |
| | | page_varietyshow = 0; |
| | | MobclickAgent.onPageEnd("播放详情—选集"); |
| | | } |
| | | |
| | | public void onEventMainThread(VideoInfo info) { |
| | |
| | | |
| | | |
| | | private void loadAD() { |
| | | if (AdUtil.getAdType(getContext(), AdPositionEnum.other) == null) |
| | | return; |
| | | NativeExpressAD nativeExpressAD = new NativeExpressAD(getContext(), new ADSize(ADSize.FULL_WIDTH, ADSize.AUTO_HEIGHT), |
| | | GDTConstant.GDT_APP_ID, GDTConstant.GDT_HOME_AND_PLAY_BIG_PICTURE, new NativeExpressAD.NativeExpressADListener() { |
| | | GDTConstant.GDT_HOME_AND_PLAY_BIG_PICTURE, new NativeExpressAD.NativeExpressADListener() { |
| | | @Override |
| | | public void onADLoaded(final List<NativeExpressADView> list) { |
| | | if (list.size() > 1) { |