| | |
| | | import com.hanju.video.app.ui.media.VideoDetailActivity; |
| | | import com.hanju.video.app.ui.video.VideoAlbumAdapter; |
| | | import com.hanju.video.app.ui.video.VideoColumn2Adapter; |
| | | import com.hanju.video.app.util.JsonUtil; |
| | | import com.hanju.video.app.util.ad.AdUtil; |
| | | import com.hanju.video.app.util.ad.ExpressAdManager; |
| | | import com.hanju.video.app.util.video.VideoUtil; |
| | |
| | | intent = new Intent(v.getContext(), StarsActivity.class); |
| | | v.getContext().startActivity(intent); |
| | | } else { |
| | | Gson gson = new GsonBuilder() |
| | | .setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE) |
| | | .create(); |
| | | VideoType type = gson.fromJson(homeType.getParams().replace( |
| | | |
| | | VideoType type = JsonUtil.videoGson.fromJson(homeType.getParams().replace( |
| | | "\\" + "\"", "\""), VideoType.class); |
| | | try { |
| | | intent = new Intent(v.getContext(), Class.forName(homeType.getActivity())); |
| | |
| | | |
| | | |
| | | if (needAd) { |
| | | if (expressAdManager == null) |
| | | expressAdManager = new ExpressAdManager(AdUtil.getSmallExpressAdType(), mContext); |
| | | expressAdManager.loadRecommendSmallAd(new ExpressAdManager.IAdLoadListener() { |
| | | @Override |
| | | public void onSuccess(List<ExpressAdContainer> adList) { |
| | | if (adList != null && adList.size() > 0) { |
| | | if (contentList != null && contentList.size() > 0 && contentList.get(0).getType() == HomeTypeContent.TYPE_CONTENT) { |
| | | contentList.add(0, new HomeTypeContent(HomeTypeContent.TYPE_AD, adList.get(0))); |
| | | notifyDataSetChanged(); |
| | | if (expressAdManager == null) { |
| | | try { |
| | | expressAdManager = new ExpressAdManager(AdUtil.getSmallExpressAdType(), mContext); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | if (expressAdManager != null) |
| | | |
| | | expressAdManager.loadRecommendSmallAd(new ExpressAdManager.IAdLoadListener() { |
| | | @Override |
| | | public void onSuccess(List<ExpressAdContainer> adList) { |
| | | if (adList != null && adList.size() > 0) { |
| | | if (contentList != null && contentList.size() > 0 && contentList.get(0).getType() == HomeTypeContent.TYPE_CONTENT) { |
| | | contentList.add(0, new HomeTypeContent(HomeTypeContent.TYPE_AD, adList.get(0))); |
| | | notifyDataSetChanged(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | |