diff --git a/common/src/main/java/com/yunbao/common/bean/AnchorRecommendModel.java b/common/src/main/java/com/yunbao/common/bean/AnchorRecommendModel.java index 8129692a6..d64458a2b 100644 --- a/common/src/main/java/com/yunbao/common/bean/AnchorRecommendModel.java +++ b/common/src/main/java/com/yunbao/common/bean/AnchorRecommendModel.java @@ -24,6 +24,10 @@ public class AnchorRecommendModel extends BaseModel { @SerializedName("live_battle_pass_show_status") private int showWarOrder = 0;//是否显示首页戰令 + @SerializedName("live_battle_pass_image_cn") + private String battlePassImageCn; + @SerializedName("live_battle_pass_image_en") + private String battlePassImageEn; //是否支持换一批0=不支持 1=支持 @SerializedName("up_show") @@ -58,6 +62,22 @@ public class AnchorRecommendModel extends BaseModel { return listShow; } + public String getBattlePassImageCn() { + return battlePassImageCn; + } + + public void setBattlePassImageCn(String battlePassImageCn) { + this.battlePassImageCn = battlePassImageCn; + } + + public String getBattlePassImageEn() { + return battlePassImageEn; + } + + public void setBattlePassImageEn(String battlePassImageEn) { + this.battlePassImageEn = battlePassImageEn; + } + public AnchorRecommendModel setListShow(int listShow) { this.listShow = listShow; return this; diff --git a/common/src/main/java/com/yunbao/common/utils/ViewUtils.java b/common/src/main/java/com/yunbao/common/utils/ViewUtils.java new file mode 100644 index 000000000..a36d8d4e4 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/utils/ViewUtils.java @@ -0,0 +1,12 @@ +package com.yunbao.common.utils; + +import android.view.View; + +public class ViewUtils { + public static T findViewById(View view,int id,Class clazz){ + return view.findViewById(id); + } + public static T findViewById(View view,int id){ + return view.findViewById(id); + } +} diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index ad4ebd3f5..4f645e18d 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -50,6 +50,7 @@ import com.tencent.imsdk.v2.V2TIMManager; import com.tencent.imsdk.v2.V2TIMSDKConfig; import com.tencent.imsdk.v2.V2TIMSDKListener; import com.tencent.imsdk.v2.V2TIMUserFullInfo; +import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.utils.MobclickAgent; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; @@ -101,6 +102,7 @@ import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.SpUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.VersionUtil; +import com.yunbao.common.utils.ViewUtils; import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.APKUpdateCustomPopup; import com.yunbao.common.views.AbsMainViewHolder; @@ -664,6 +666,11 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene floatWarOrder.setTag(null); } else { floatWarOrder.setVisibility(View.VISIBLE); + if (WordUtil.isNewZh()) { + ImgLoader.display(mContext, data.getBattlePassImageCn(), ViewUtils.findViewById(floatWarOrder, R.id.battleImage, ImageView.class)); + } else { + ImgLoader.display(mContext, data.getBattlePassImageEn(), ViewUtils.findViewById(floatWarOrder, R.id.battleImage, ImageView.class)); + } floatWarOrder.setTag(data); } diff --git a/main/src/main/res/layout/view_float_war_order.xml b/main/src/main/res/layout/view_float_war_order.xml index 0a867ba7e..196d78132 100644 --- a/main/src/main/res/layout/view_float_war_order.xml +++ b/main/src/main/res/layout/view_float_war_order.xml @@ -2,10 +2,12 @@ + + android:layout_height="61.5dp" + android:src="@mipmap/icon_bp_flot" />