调整战令图标改为通过接口获取

This commit is contained in:
zlzw 2024-05-31 10:30:12 +08:00
parent 949c0ab759
commit b7c0f5d3ec
4 changed files with 43 additions and 2 deletions

View File

@ -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;

View File

@ -0,0 +1,12 @@
package com.yunbao.common.utils;
import android.view.View;
public class ViewUtils {
public static <T extends View> T findViewById(View view,int id,Class<T> clazz){
return view.findViewById(id);
}
public static <T extends View> T findViewById(View view,int id){
return view.findViewById(id);
}
}

View File

@ -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);
}

View File

@ -2,10 +2,12 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:src="@mipmap/icon_bp_flot"
android:id="@+id/battleImage"
android:layout_width="95.5dp"
android:layout_height="61.5dp"/>
android:layout_height="61.5dp"
android:src="@mipmap/icon_bp_flot" />
<!--<LinearLayout
android:alpha="0.85"
android:layout_width="140dp"