调整战令图标改为通过接口获取
This commit is contained in:
parent
949c0ab759
commit
b7c0f5d3ec
@ -24,6 +24,10 @@ public class AnchorRecommendModel extends BaseModel {
|
|||||||
|
|
||||||
@SerializedName("live_battle_pass_show_status")
|
@SerializedName("live_battle_pass_show_status")
|
||||||
private int showWarOrder = 0;//是否显示首页戰令
|
private int showWarOrder = 0;//是否显示首页戰令
|
||||||
|
@SerializedName("live_battle_pass_image_cn")
|
||||||
|
private String battlePassImageCn;
|
||||||
|
@SerializedName("live_battle_pass_image_en")
|
||||||
|
private String battlePassImageEn;
|
||||||
//是否支持换一批0=不支持 1=支持
|
//是否支持换一批0=不支持 1=支持
|
||||||
|
|
||||||
@SerializedName("up_show")
|
@SerializedName("up_show")
|
||||||
@ -58,6 +62,22 @@ public class AnchorRecommendModel extends BaseModel {
|
|||||||
return listShow;
|
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) {
|
public AnchorRecommendModel setListShow(int listShow) {
|
||||||
this.listShow = listShow;
|
this.listShow = listShow;
|
||||||
return this;
|
return this;
|
||||||
|
12
common/src/main/java/com/yunbao/common/utils/ViewUtils.java
Normal file
12
common/src/main/java/com/yunbao/common/utils/ViewUtils.java
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
@ -50,6 +50,7 @@ import com.tencent.imsdk.v2.V2TIMManager;
|
|||||||
import com.tencent.imsdk.v2.V2TIMSDKConfig;
|
import com.tencent.imsdk.v2.V2TIMSDKConfig;
|
||||||
import com.tencent.imsdk.v2.V2TIMSDKListener;
|
import com.tencent.imsdk.v2.V2TIMSDKListener;
|
||||||
import com.tencent.imsdk.v2.V2TIMUserFullInfo;
|
import com.tencent.imsdk.v2.V2TIMUserFullInfo;
|
||||||
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.utils.MobclickAgent;
|
import com.yunbao.common.utils.MobclickAgent;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.Constants;
|
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.SpUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.VersionUtil;
|
import com.yunbao.common.utils.VersionUtil;
|
||||||
|
import com.yunbao.common.utils.ViewUtils;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.common.views.APKUpdateCustomPopup;
|
import com.yunbao.common.views.APKUpdateCustomPopup;
|
||||||
import com.yunbao.common.views.AbsMainViewHolder;
|
import com.yunbao.common.views.AbsMainViewHolder;
|
||||||
@ -664,6 +666,11 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
floatWarOrder.setTag(null);
|
floatWarOrder.setTag(null);
|
||||||
} else {
|
} else {
|
||||||
floatWarOrder.setVisibility(View.VISIBLE);
|
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);
|
floatWarOrder.setTag(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,10 +2,12 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:src="@mipmap/icon_bp_flot"
|
android:id="@+id/battleImage"
|
||||||
android:layout_width="95.5dp"
|
android:layout_width="95.5dp"
|
||||||
android:layout_height="61.5dp"/>
|
android:layout_height="61.5dp"
|
||||||
|
android:src="@mipmap/icon_bp_flot" />
|
||||||
<!--<LinearLayout
|
<!--<LinearLayout
|
||||||
android:alpha="0.85"
|
android:alpha="0.85"
|
||||||
android:layout_width="140dp"
|
android:layout_width="140dp"
|
||||||
|
Loading…
Reference in New Issue
Block a user