| | |
| | | * @param adLoadListener |
| | | */ |
| | | public void loadVideoDetailPlayerBottomAd(final IAdLoadListener adLoadListener) { |
| | | if(sourceType==null){ |
| | | return; |
| | | } |
| | | Log.i(TAG, "loadVideoDetailPlayerBottomAd"); |
| | | //加载大图 |
| | | String pid = null; |
| | |
| | | public void loadSearchAd(int widthDP, final IAdLoadListener adLoadListener) { |
| | | //加载大图 |
| | | String pid = null; |
| | | int height = (int) (widthDP / 1.78f); |
| | | if (sourceType == AdUtil.AD_TYPE.csj) { |
| | | pid = CSJConstant.VIDEO_SEARCH; |
| | | height=0; |
| | | } else if (sourceType == AdUtil.AD_TYPE.gdt2) { |
| | | pid = BeibeiConstant.GDT_SEARCH_NATIVE; |
| | | } else if (sourceType == AdUtil.AD_TYPE.hw) { |
| | | pid = HuaWeiAdConstant.HW_AD_NATIVE_SEARCH; |
| | | } |
| | | int height = (int) (widthDP / 1.78f); |
| | | |
| | | loadAd(widthDP, height, pid, 1, adLoadListener); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | NativeAdConfiguration adConfiguration = new NativeAdConfiguration.Builder() |
| | | .setAdSize(new AdSize(width, height)) |
| | | // .setAdSize(new AdSize(width, height)) |
| | | .setMediaAspect(NativeAdConfiguration.MediaAspect.ASPECT_LANDSCAPE) |
| | | // 是否要自定义“不再显示该广告”的功能 |
| | | .setRequestCustomDislikeThisAd(true) |
| | | // 设置原生广告是否返回多张图片素材,如果请求的创意类型是原生三小图,则需要设置此方法 |