From efa9c4225fe7e89c4acb1eacedd392d79aee240d Mon Sep 17 00:00:00 2001 From: admin <2780501319@qq.com> Date: 星期四, 15 四月 2021 01:59:24 +0800 Subject: [PATCH] 影视豆界面完善 --- BuWanVideo/src/com/weikou/beibeivideo/util/ad/ExpressAdManager.java | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/BuWanVideo/src/com/weikou/beibeivideo/util/ad/ExpressAdManager.java b/BuWanVideo/src/com/weikou/beibeivideo/util/ad/ExpressAdManager.java index 3ecb41d..a2a7b97 100644 --- a/BuWanVideo/src/com/weikou/beibeivideo/util/ad/ExpressAdManager.java +++ b/BuWanVideo/src/com/weikou/beibeivideo/util/ad/ExpressAdManager.java @@ -127,12 +127,12 @@ //鍔犺浇澶у浘 int deviceWidth = DimenUtils.getScreenWidth(mContext); deviceWidth = DimenUtils.px2dip(mContext, deviceWidth); - int width = deviceWidth - 6; + int width = deviceWidth -9 * 2; int height = (int) (width * 0.8); String pid = null; if (sourceType == AdUtil.AD_TYPE.csj) { pid = CSJConstant.RECOMMEND_BIG_IMG_AD; - height = (int) (width * 0.56); + height = (int) (width * 0.78); } else if (sourceType == AdUtil.AD_TYPE.gdt) { pid = BeibeiConstant.GDT_RECOMMAND_NATIVE; } else if (sourceType == AdUtil.AD_TYPE.gdt2) { @@ -180,6 +180,8 @@ } else if (sourceType == AdUtil.AD_TYPE.gdt2) { pid = GDTConstant.PID_2_VIDEO_DETAIL_PLAY_EXPRESS1; } + if (mContext == null) + return; //鑾峰彇灞忓箷鐨勫 int deviceWidth = DimenUtils.getScreenWidth(mContext); deviceWidth = DimenUtils.px2dip(mContext, deviceWidth); @@ -245,7 +247,7 @@ String pid = null; if (sourceType == AdUtil.AD_TYPE.csj) { pid = "945379581"; - } else if (sourceType == AdUtil.AD_TYPE.gdt) { + } else if (sourceType == AdUtil.AD_TYPE.gdt2) { pid = BeibeiConstant.GDT_SEARCH_RESULT_MIN_NATIVE; } //鑾峰彇灞忓箷鐨勫 @@ -327,7 +329,7 @@ String pid = null; if (sourceType == AdUtil.AD_TYPE.csj) { pid = CSJConstant.VIDEO_SEARCH; - } else if (sourceType == AdUtil.AD_TYPE.gdt) { + } else if (sourceType == AdUtil.AD_TYPE.gdt2) { pid = BeibeiConstant.GDT_SEARCH_NATIVE; } int height = (int) (widthDP / 1.78f); -- Gitblit v1.8.0