Merge branch 'master' into master_融云升级
# Conflicts: # config.gradle
@ -216,7 +216,7 @@ dependencies {
|
||||
api 'com.yanzhenjie.recyclerview:x:1.3.2'
|
||||
|
||||
//华为支付插件包
|
||||
//api project(':lib_huawei')
|
||||
// api project(':lib_huawei')
|
||||
|
||||
//google插件包
|
||||
api project(':lib_google')
|
||||
|
@ -38,6 +38,17 @@ public class GuardGetGuardUserInfoModel extends BaseModel {
|
||||
private String userLanguage;
|
||||
@SerializedName("live_language")
|
||||
private String liveLanguage;
|
||||
@SerializedName("is_open")
|
||||
private String isOpen;
|
||||
|
||||
public String getIsOpen() {
|
||||
return isOpen;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setIsOpen(String isOpen) {
|
||||
this.isOpen = isOpen;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
|
@ -8,6 +8,17 @@ public class GuardModel extends BaseModel {
|
||||
private String type;
|
||||
@SerializedName("endtime")
|
||||
private String endtime;
|
||||
@SerializedName("guard_type")
|
||||
private String guardType;
|
||||
|
||||
public String getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public GuardModel setGuardType(String guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
|
@ -27,7 +27,7 @@ public class GuardUserInfoModel extends BaseModel {
|
||||
@SerializedName("live_avatar")
|
||||
private String liveAvatar;
|
||||
@SerializedName("guard_type")
|
||||
private String guardType;
|
||||
private int guardType;
|
||||
@SerializedName("exp")
|
||||
private String exp;
|
||||
@SerializedName("level")
|
||||
@ -38,6 +38,17 @@ public class GuardUserInfoModel extends BaseModel {
|
||||
private String userLanguage;
|
||||
@SerializedName("live_language")
|
||||
private String liveLanguage;
|
||||
@SerializedName("is_open")
|
||||
private String isOpen;
|
||||
|
||||
public String getIsOpen() {
|
||||
return isOpen;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setIsOpen(String isOpen) {
|
||||
this.isOpen = isOpen;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
@ -75,11 +86,11 @@ public class GuardUserInfoModel extends BaseModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGuardType() {
|
||||
public int getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setGuardType(String guardType) {
|
||||
public GuardUserInfoModel setGuardType(int guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
@ -0,0 +1,37 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class NewGuardLevelModel extends BaseModel{
|
||||
|
||||
@SerializedName("guard_type")
|
||||
private int guardType;
|
||||
@SerializedName("cn")
|
||||
private String cn;
|
||||
@SerializedName("en")
|
||||
private String en;
|
||||
|
||||
public int getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public void setGuardType(int guardType) {
|
||||
this.guardType = guardType;
|
||||
}
|
||||
|
||||
public String getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(String cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public String getEn() {
|
||||
return en;
|
||||
}
|
||||
|
||||
public void setEn(String en) {
|
||||
this.en = en;
|
||||
}
|
||||
}
|
@ -5,7 +5,6 @@ import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
@ -43,39 +42,49 @@ public class GuardBuyTipsDialog {
|
||||
contentTextView.setVisibility(View.VISIBLE);
|
||||
buyTypeTextView.setVisibility(View.VISIBLE);
|
||||
content2.setVisibility(View.GONE);
|
||||
if (!isOpen) {
|
||||
if (!TextUtils.isEmpty(coin)) {
|
||||
contentTextView.setText(context.getString(R.string.guard_buy_tips_1, coin));
|
||||
}
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
buyTypeTextView.setText("【" + content + "】");
|
||||
}
|
||||
if (TextUtils.isEmpty(coin) && mGuardUserInfoModel == null && !isOpen && guardType == -200) {
|
||||
content1.setVisibility(View.GONE);
|
||||
contentTextView.setVisibility(View.VISIBLE);
|
||||
buyTypeTextView.setVisibility(View.GONE);
|
||||
content2.setVisibility(View.GONE);
|
||||
contentTextView.setText(content);
|
||||
} else {
|
||||
if (!TextUtils.isEmpty(coin)) {
|
||||
contentTextView.setText(context.getString(R.string.guard_buy_tips_2, coin));
|
||||
if (!isOpen) {
|
||||
if (!TextUtils.isEmpty(coin)) {
|
||||
contentTextView.setText(context.getString(R.string.guard_buy_tips_1, coin));
|
||||
}
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
buyTypeTextView.setText("【" + content + "】");
|
||||
}
|
||||
} else {
|
||||
if (!TextUtils.isEmpty(coin)) {
|
||||
contentTextView.setText(context.getString(R.string.guard_buy_tips_2, coin));
|
||||
}
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
buyTypeTextView.setText("【" + content + "】");
|
||||
}
|
||||
}
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
buyTypeTextView.setText("【" + content + "】");
|
||||
}
|
||||
}
|
||||
if (mGuardUserInfoModel != null) {
|
||||
if (mGuardUserInfoModel.getGuardType() != 0) {
|
||||
if (guardType < mGuardUserInfoModel.getGuardType()) {
|
||||
content1.setVisibility(View.GONE);
|
||||
contentTextView.setVisibility(View.GONE);
|
||||
buyTypeTextView.setVisibility(View.GONE);
|
||||
content2.setVisibility(View.VISIBLE);
|
||||
if (mGuardUserInfoModel != null) {
|
||||
if (mGuardUserInfoModel.getGuardType() != 0) {
|
||||
if (TextUtils.equals(mGuardUserInfoModel.getIsOpen(), "1") &&
|
||||
guardType < mGuardUserInfoModel.getGuardType()) {
|
||||
content1.setVisibility(View.GONE);
|
||||
contentTextView.setVisibility(View.GONE);
|
||||
buyTypeTextView.setVisibility(View.GONE);
|
||||
content2.setVisibility(View.VISIBLE);
|
||||
|
||||
} else if (guardType==mGuardUserInfoModel.getGuardType()){
|
||||
} else if (TextUtils.equals(mGuardUserInfoModel.getIsOpen(), "1") && guardType > mGuardUserInfoModel.getGuardType()) {
|
||||
content1.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
content1.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
content1.setVisibility(View.GONE);
|
||||
}else {
|
||||
content1.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else {
|
||||
content1.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
content1.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
|
||||
dialog.findViewById(R.id.btn_cancel).setOnClickListener(new View.OnClickListener() {
|
||||
@ -88,9 +97,9 @@ public class GuardBuyTipsDialog {
|
||||
btn_confirm.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (content2.getVisibility()==View.VISIBLE){
|
||||
if (content2.getVisibility() == View.VISIBLE) {
|
||||
dialog.dismiss();
|
||||
}else {
|
||||
} else {
|
||||
simpleCallback.onConfirmClick(dialog, "");
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
@ -68,6 +68,7 @@ public class GuardUpgradePopup extends CenterPopupView {
|
||||
} else {
|
||||
hintStringBuffer.append("Your guardian level has reached level ")
|
||||
.append(mUpgradesModel.getLevel())
|
||||
.append(" You can receive the following rewards")
|
||||
;
|
||||
}
|
||||
leave_hint.setText(hintStringBuffer.toString());
|
||||
@ -98,7 +99,7 @@ public class GuardUpgradePopup extends CenterPopupView {
|
||||
rewards_line3.setVisibility(VISIBLE);
|
||||
RewardsModel rewardsModel1 = mUpgradesModel.getRewards().get(0);
|
||||
RewardsModel rewardsModel2 = mUpgradesModel.getRewards().get(1);
|
||||
RewardsModel rewardsModel3 = mUpgradesModel.getRewards().get(3);
|
||||
RewardsModel rewardsModel3 = mUpgradesModel.getRewards().get(2);
|
||||
|
||||
ImgLoader.display(getContext(), rewardsModel1.getImagePath(), rewards_img1);
|
||||
rewards_text1.setText(rewardsModel1.getRewardName());
|
||||
@ -148,11 +149,11 @@ public class GuardUpgradePopup extends CenterPopupView {
|
||||
IMLoginModel userInfo = IMLoginManager.get(getContext()).getUserInfo();
|
||||
htmlUrl.append(CommonAppConfig.HOST)
|
||||
.append("/h5/Guard/level.html?")
|
||||
.append("&token=")
|
||||
.append("token=")
|
||||
.append(userInfo.getToken())
|
||||
.append("&uid=")
|
||||
.append(userInfo.getId())
|
||||
.append("&&anchorUid=")
|
||||
.append("&anchorUid=")
|
||||
.append(mLiveUid)
|
||||
.append("&isZh=")
|
||||
.append(((WordUtil.isNewZh()) ? "1" : "0"));
|
||||
|
@ -0,0 +1,32 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class SkitCheckInWasSuccessfulPopup extends CenterPopupView {
|
||||
public SkitCheckInWasSuccessfulPopup(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.skit_check_in_was_successful_popup;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.icon_slice_368), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,227 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AllServerNotifyFFGGGDJANEvent extends BaseModel {
|
||||
|
||||
@SerializedName("_method_")
|
||||
private String method;
|
||||
@SerializedName("action")
|
||||
private String action;
|
||||
@SerializedName("msg_cn")
|
||||
private String msgCn;
|
||||
@SerializedName("msg_en")
|
||||
private String msgEn;
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("background_image")
|
||||
private String backgroundImage;
|
||||
@SerializedName("style")
|
||||
private List<StyleDTO> style;
|
||||
@SerializedName("jump_type")
|
||||
private String jumpType;
|
||||
@SerializedName("link")
|
||||
private String link;
|
||||
@SerializedName("button_image")
|
||||
private String buttonImage;
|
||||
@SerializedName("button_msg_cn")
|
||||
private String buttonMsgCn;
|
||||
@SerializedName("button_msg_en")
|
||||
private String buttonMsgEn;
|
||||
@SerializedName("button_style")
|
||||
private List<ButtonStyleDTO> buttonStyle;
|
||||
@SerializedName("h5_type")
|
||||
private String h5Type;
|
||||
|
||||
public String getH5Type() {
|
||||
return h5Type;
|
||||
}
|
||||
|
||||
public AllServerNotifyFFGGGDJANEvent setH5Type(String h5Type) {
|
||||
this.h5Type = h5Type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setMethod(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public void setAction(String action) {
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
public String getMsgCn() {
|
||||
return msgCn;
|
||||
}
|
||||
|
||||
public void setMsgCn(String msgCn) {
|
||||
this.msgCn = msgCn;
|
||||
}
|
||||
|
||||
public String getMsgEn() {
|
||||
return msgEn;
|
||||
}
|
||||
|
||||
public void setMsgEn(String msgEn) {
|
||||
this.msgEn = msgEn;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public void setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
}
|
||||
|
||||
public String getBackgroundImage() {
|
||||
return backgroundImage;
|
||||
}
|
||||
|
||||
public void setBackgroundImage(String backgroundImage) {
|
||||
this.backgroundImage = backgroundImage;
|
||||
}
|
||||
|
||||
public List<StyleDTO> getStyle() {
|
||||
return style;
|
||||
}
|
||||
|
||||
public void setStyle(List<StyleDTO> style) {
|
||||
this.style = style;
|
||||
}
|
||||
|
||||
public String getJumpType() {
|
||||
return jumpType;
|
||||
}
|
||||
|
||||
public void setJumpType(String jumpType) {
|
||||
this.jumpType = jumpType;
|
||||
}
|
||||
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public void setLink(String link) {
|
||||
this.link = link;
|
||||
}
|
||||
|
||||
public String getButtonImage() {
|
||||
return buttonImage;
|
||||
}
|
||||
|
||||
public void setButtonImage(String buttonImage) {
|
||||
this.buttonImage = buttonImage;
|
||||
}
|
||||
|
||||
public String getButtonMsgCn() {
|
||||
return buttonMsgCn;
|
||||
}
|
||||
|
||||
public void setButtonMsgCn(String buttonMsgCn) {
|
||||
this.buttonMsgCn = buttonMsgCn;
|
||||
}
|
||||
|
||||
public String getButtonMsgEn() {
|
||||
return buttonMsgEn;
|
||||
}
|
||||
|
||||
public void setButtonMsgEn(String buttonMsgEn) {
|
||||
this.buttonMsgEn = buttonMsgEn;
|
||||
}
|
||||
|
||||
public List<ButtonStyleDTO> getButtonStyle() {
|
||||
return buttonStyle;
|
||||
}
|
||||
|
||||
public void setButtonStyle(List<ButtonStyleDTO> buttonStyle) {
|
||||
this.buttonStyle = buttonStyle;
|
||||
}
|
||||
|
||||
public static class StyleDTO {
|
||||
@SerializedName("str_cn")
|
||||
private String strCn;
|
||||
@SerializedName("str_en")
|
||||
private String strEn;
|
||||
@SerializedName("colour")
|
||||
private String colour;
|
||||
|
||||
public String getStrCn() {
|
||||
return strCn;
|
||||
}
|
||||
|
||||
public void setStrCn(String strCn) {
|
||||
this.strCn = strCn;
|
||||
}
|
||||
|
||||
public String getStrEn() {
|
||||
return strEn;
|
||||
}
|
||||
|
||||
public void setStrEn(String strEn) {
|
||||
this.strEn = strEn;
|
||||
}
|
||||
|
||||
public String getColour() {
|
||||
return colour;
|
||||
}
|
||||
|
||||
public void setColour(String colour) {
|
||||
this.colour = colour;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ButtonStyleDTO {
|
||||
@SerializedName("str_cn")
|
||||
private String strCn;
|
||||
@SerializedName("str_en")
|
||||
private String strEn;
|
||||
@SerializedName("colour")
|
||||
private String colour;
|
||||
|
||||
public String getStrCn() {
|
||||
return strCn;
|
||||
}
|
||||
|
||||
public void setStrCn(String strCn) {
|
||||
this.strCn = strCn;
|
||||
}
|
||||
|
||||
public String getStrEn() {
|
||||
return strEn;
|
||||
}
|
||||
|
||||
public void setStrEn(String strEn) {
|
||||
this.strEn = strEn;
|
||||
}
|
||||
|
||||
public String getColour() {
|
||||
return colour;
|
||||
}
|
||||
|
||||
public void setColour(String colour) {
|
||||
this.colour = colour;
|
||||
}
|
||||
}
|
||||
}
|
@ -208,6 +208,10 @@ public class CommonHttpUtil {
|
||||
JSONArray levelArray = obj.getJSONArray("liveclass");
|
||||
new LiveClassManager(context).UpDataLiveClass(levelArray.toJSONString());
|
||||
}
|
||||
if (obj.containsKey("guard_type")) {
|
||||
JSONArray levelArray = obj.getJSONArray("guard_type");
|
||||
new NewLevelManager(context).upDataGuardLevel(levelArray.toJSONString());
|
||||
}
|
||||
if (obj.containsKey("apk_ver")) {
|
||||
APKManager.get().setApkVer(obj.getString("apk_ver"));
|
||||
}
|
||||
|
@ -110,7 +110,8 @@ public interface PDLiveApi {
|
||||
@Field("user_pass") String passWord,
|
||||
@Field("uuid_Device") String uuidDevice,
|
||||
@Field("pushid") String pushid,
|
||||
@Field("lastlogindevice") String lastlogindevice
|
||||
@Field("lastlogindevice") String lastlogindevice,
|
||||
@Field("langue")String langue
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -13,6 +13,7 @@ import com.yunbao.common.http.API;
|
||||
import com.yunbao.common.http.ResponseData;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -54,7 +55,7 @@ public class MainNetManager {
|
||||
* @param callback 网络请求回调
|
||||
*/
|
||||
public void login(String phoneNum, String pwd, String uuid, HttpCallback<IMLoginModel> callback) {
|
||||
API.get().pdLiveApi(mContext).loginByManager(phoneNum, pwd, uuid, "", "Android")
|
||||
API.get().pdLiveApi(mContext).loginByManager(phoneNum, pwd, uuid, "", "Android", WordUtil.isNewZh()?"chinese":"english")
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<IMLoginModel>>() {
|
||||
|
@ -57,6 +57,15 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
|
||||
private final String KEY_LANGUAGE = "language";
|
||||
private final String KEY_GAME = "key_game";
|
||||
private final String GUARD_TYPE = "key_GUARD_TYPE";
|
||||
|
||||
public void setGuardType(int guardType) {
|
||||
put(GUARD_TYPE, guardType);
|
||||
}
|
||||
|
||||
public int getGuardType() {
|
||||
return getInt(GUARD_TYPE, 0);
|
||||
}
|
||||
|
||||
public void setRedPoint() {
|
||||
put("RedPoint", "1");
|
||||
|
@ -5,6 +5,7 @@ import android.content.Context;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.yunbao.common.bean.FansModel;
|
||||
import com.yunbao.common.bean.NewGuardLevelModel;
|
||||
import com.yunbao.common.bean.NewLevelModel;
|
||||
import com.yunbao.common.manager.base.BaseCacheManager;
|
||||
|
||||
@ -19,10 +20,12 @@ public class NewLevelManager extends BaseCacheManager {
|
||||
private final String KEY_ANCHOR_LEVEL = "keyAnchorLevel";
|
||||
private final String KEY_LIVE_LEVEL = "keyLiveLevel";
|
||||
private final String KEY_FANS_LEVEL = "keyFansLevel";
|
||||
private final String KEY_GUARD_LEVEL = "keyGuardLevel";
|
||||
|
||||
private List<NewLevelModel> newLevelModels = new ArrayList<>();
|
||||
private List<NewLevelModel> keyAnchorLevel = new ArrayList<>();
|
||||
private List<FansModel> fansModels = new ArrayList<>();
|
||||
private List<NewGuardLevelModel> newGuardLevelModels = new ArrayList<>();
|
||||
|
||||
public NewLevelManager(Context context) {
|
||||
super(context);
|
||||
@ -62,6 +65,29 @@ public class NewLevelManager extends BaseCacheManager {
|
||||
return fansModel;
|
||||
}
|
||||
|
||||
public void upDataGuardLevel(String json) {
|
||||
newGuardLevelModels = new Gson().fromJson(json, new TypeToken<List<NewGuardLevelModel>>() {
|
||||
}.getType());
|
||||
put(KEY_GUARD_LEVEL, newGuardLevelModels);
|
||||
}
|
||||
|
||||
public List<NewGuardLevelModel> getGuardLevel() {
|
||||
newGuardLevelModels = getList(KEY_GUARD_LEVEL, new TypeToken<List<NewGuardLevelModel>>() {
|
||||
}.getType());
|
||||
return newGuardLevelModels;
|
||||
}
|
||||
|
||||
public NewGuardLevelModel getGuardModel(int type) {
|
||||
getGuardLevel();
|
||||
NewGuardLevelModel guardLevelModel = null;
|
||||
for (NewGuardLevelModel model : newGuardLevelModels) {
|
||||
if (model.getGuardType() == type) {
|
||||
guardLevelModel = model;
|
||||
}
|
||||
}
|
||||
return guardLevelModel;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取等级数据
|
||||
*
|
||||
|
@ -50,11 +50,14 @@ public class NewRoleFunGamesChildViewHolder extends RecyclerView.ViewHolder {
|
||||
}
|
||||
|
||||
funGameName.setText(model.getTitle());
|
||||
if (TextUtils.equals(model.getTitle(), WordUtil.getNewString(com.yunbao.common.R.string.guard_guard)) && IMLoginManager.get(itemView.getContext()).getGuardRedPoint()) {
|
||||
total_image_red_point.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
total_image_red_point.setVisibility(View.GONE);
|
||||
if (total_image_red_point!=null){
|
||||
if (TextUtils.equals(model.getTitle(), WordUtil.getNewString(com.yunbao.common.R.string.guard_guard)) && IMLoginManager.get(itemView.getContext()).getGuardRedPoint()) {
|
||||
total_image_red_point.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
total_image_red_point.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
|
@ -48,18 +48,24 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rewards_line1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="13dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rewards_img1"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/tequan_1" />
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/icon_ssssbbbbbsd">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rewards_img1"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:scaleType="fitXY" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rewards_text1"
|
||||
@ -67,6 +73,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
android:text="獎勵名稱"
|
||||
android:textColor="#FF8503"
|
||||
android:textSize="14sp" />
|
||||
@ -74,7 +81,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rewards_line2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="32dp"
|
||||
@ -82,12 +89,17 @@
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rewards_img2"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/tequan_1" />
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/icon_ssssbbbbbsd">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rewards_img2"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:scaleType="fitXY" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rewards_text2"
|
||||
@ -95,6 +107,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
android:text="獎勵名稱"
|
||||
android:textColor="#FF8503"
|
||||
android:textSize="14sp" />
|
||||
@ -102,18 +115,23 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rewards_line3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="13dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rewards_img3"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/tequan_1" />
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/icon_ssssbbbbbsd">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rewards_img3"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:scaleType="fitXY" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rewards_text3"
|
||||
@ -121,6 +139,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
android:text="獎勵名稱"
|
||||
android:textColor="#FF8503"
|
||||
android:textSize="14sp" />
|
||||
@ -135,21 +154,23 @@
|
||||
android:layout_marginEnd="13dp"
|
||||
android:layout_marginBottom="38dp">
|
||||
|
||||
<Button
|
||||
<TextView
|
||||
android:id="@+id/view_grade"
|
||||
android:layout_width="94dp"
|
||||
android:layout_height="36dp"
|
||||
android:background="@drawable/button_guard_upgrade"
|
||||
android:gravity="center"
|
||||
android:text="@string/view_grade"
|
||||
android:textColor="#893D0D"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Button
|
||||
<TextView
|
||||
android:id="@+id/confirm"
|
||||
android:layout_width="94dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="end"
|
||||
android:background="@drawable/button_guard_upgrade"
|
||||
android:gravity="center"
|
||||
android:text="@string/to_receive"
|
||||
android:textColor="#893D0D"
|
||||
android:textSize="14sp" />
|
||||
|
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="258dp"
|
||||
android:layout_height="293dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/back_slice_367" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_slice_368"
|
||||
android:layout_width="40dp"
|
||||
android:padding="10dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="79dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:src="@mipmap/icon_slice_368" />
|
||||
|
||||
</FrameLayout>
|
@ -10,10 +10,11 @@
|
||||
<TextView
|
||||
android:id="@+id/opening_time"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="19dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:gravity="start"
|
||||
android:text="@string/one_month"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
BIN
common/src/main/res/mipmap-xxhdpi/back_slice_367.png
Normal file
After Width: | Height: | Size: 536 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_slice_368.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_ssssbbbbbsd.png
Normal file
After Width: | Height: | Size: 48 KiB |
@ -170,7 +170,7 @@
|
||||
<string name="guard_my">My</string>
|
||||
<string name="theguardianof">Become the guardian of %s</string>
|
||||
<string name="favoriteanchor">Open a guard for your favorite anchor</string>
|
||||
<string name="guardiandate">The guardian date expires at: %s</string>
|
||||
<string name="guardiandate">Guardianship date is up to: %s</string>
|
||||
<string name="get">GET</string>
|
||||
<string name="only_one">Only one can be given away~</string>
|
||||
<string name="guard_guard">Guard</string>
|
||||
@ -1457,7 +1457,7 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="guardian_privilege">Guardianship privileges</string>
|
||||
<string name="be_their_exclusive_guardian">Be the anchor‘s guardian</string>
|
||||
<string name="not_yet_open">Not opened</string>
|
||||
<string name="tas_guardian_group">guardian group</string>
|
||||
<string name="tas_guardian_group">Guardian group ></string>
|
||||
<string name="open_the_kings_guard">Activate King Guardian</string>
|
||||
<string name="open_the_start_guard">Activate Star Guardian</string>
|
||||
<string name="open_the_god_guard">Activate God Guardian</string>
|
||||
@ -1466,7 +1466,7 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="six_month">6 month</string>
|
||||
<string name="one_two_month">12 month</string>
|
||||
<string name="guardian_for_your_favorite_anchor">Quickly activate guardian for your favorite anchor!</string>
|
||||
<string name="guardian_task">Guardian Task</string>
|
||||
<string name="guardian_task">Guard tasks</string>
|
||||
<string name="my_graud_grade">My level ></string>
|
||||
<string name="no_one_guarding_the_anchor_yet">No one is guarding the anchor yet, come and guard it now~</string>
|
||||
<string name="this_week_contribution">Contribution/week</string>
|
||||
|
@ -1498,4 +1498,5 @@
|
||||
<string name="dragon_rule5">1.神龍送財是開通【神之守護】的用戶給予直播間觀眾的免費金豆福利;</string>
|
||||
<string name="dragon_rule6">2.用戶關注主播並參與活動,將在倒計時五分鐘結束後瓜分活動金豆;</string>
|
||||
<string name="dragon_rule7">3.此活動的最終解釋權歸PDLIVE所有。</string>
|
||||
<string name="main_type_theater">短劇</string>
|
||||
</resources>
|
||||
|
@ -1497,4 +1497,5 @@
|
||||
<string name="dragon_rule5">1.神龍送財是開通【神之守護】的用戶給予直播間觀眾的免費金豆福利;</string>
|
||||
<string name="dragon_rule6">2.用戶關注主播並參與活動,將在倒計時五分鐘結束後瓜分活動金豆;</string>
|
||||
<string name="dragon_rule7">3.此活動的最終解釋權歸PDLIVE所有。</string>
|
||||
<string name="main_type_theater">短劇</string>
|
||||
</resources>
|
||||
|
@ -1494,5 +1494,6 @@
|
||||
<string name="dragon_rule5">1.神龍送財是開通【神之守護】的用戶給予直播間觀眾的免費金豆福利;</string>
|
||||
<string name="dragon_rule6">2.用戶關注主播並參與活動,將在倒計時五分鐘結束後瓜分活動金豆;</string>
|
||||
<string name="dragon_rule7">3.此活動的最終解釋權歸PDLIVE所有。</string>
|
||||
<string name="main_type_theater">短劇</string>
|
||||
|
||||
</resources>
|
||||
|
@ -170,7 +170,7 @@
|
||||
<string name="guard_my">My</string>
|
||||
<string name="theguardianof">Become the guardian of %s</string>
|
||||
<string name="favoriteanchor">Open a guard for your favorite anchor</string>
|
||||
<string name="guardiandate">The guardian date expires at: %s</string>
|
||||
<string name="guardiandate">Guardianship date is up to: %s</string>
|
||||
<string name="get">GET</string>
|
||||
<string name="only_one">Only one can be given away~</string>
|
||||
<string name="guard_guard">Guard</string>
|
||||
@ -1460,7 +1460,7 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="guardian_privilege">Guardianship privileges</string>
|
||||
<string name="be_their_exclusive_guardian">Be the anchor‘s guardian</string>
|
||||
<string name="not_yet_open">Not opened</string>
|
||||
<string name="tas_guardian_group">guardian group</string>
|
||||
<string name="tas_guardian_group">Guardian group ></string>
|
||||
<string name="open_the_kings_guard">Activate King Guardian</string>
|
||||
<string name="open_the_start_guard">Activate Star Guardian</string>
|
||||
<string name="open_the_god_guard">Activate God Guardian</string>
|
||||
@ -1469,7 +1469,7 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="six_month">6 month</string>
|
||||
<string name="one_two_month">12 month</string>
|
||||
<string name="guardian_for_your_favorite_anchor">Quickly activate guardian for your favorite anchor!</string>
|
||||
<string name="guardian_task">Guardian Task</string>
|
||||
<string name="guardian_task">Guard tasks</string>
|
||||
<string name="my_graud_grade">My level ></string>
|
||||
<string name="no_one_guarding_the_anchor_yet">No one is guarding the anchor yet, come and guard it now~</string>
|
||||
<string name="this_week_contribution">Contribution/week</string>
|
||||
@ -1503,4 +1503,5 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="dragon_rule5">1.Dragon\'s Wealth is a free golden bean benefit provided to live stream viewers by users who have activated the 【God Guardian】 feature;</string>
|
||||
<string name="dragon_rule6">2.Users who follow the anchor and participate in the activity will divide the gold beans of the activity after the countdown of five minutes ends;</string>
|
||||
<string name="dragon_rule7">3.The final interpretation of this activity belongs to PDLIVE.</string>
|
||||
<string name="main_type_theater" >Theater</string>
|
||||
</resources>
|
||||
|
@ -4,15 +4,14 @@ ext {
|
||||
buildToolsVersion: "29.0.2",
|
||||
minSdkVersion : 23,
|
||||
targetSdkVersion : 33,
|
||||
versionCode : 469,
|
||||
versionName : "6.6.5",
|
||||
namespace : "com.pandoralive.shayu"
|
||||
versionCode : 468,
|
||||
versionName : "6.6.6"
|
||||
]
|
||||
manifestPlaceholders = [
|
||||
//正式、
|
||||
// serverHost : "https://napi.yaoulive.com",
|
||||
serverHost : "https://napi.yaoulive.com",
|
||||
// 测试
|
||||
serverHost : "https://ceshi.yaoulive.com",
|
||||
// serverHost : "https://ceshi.yaoulive.com",
|
||||
|
||||
//百度语音识别
|
||||
|
||||
@ -22,7 +21,7 @@ ext {
|
||||
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
|
||||
|
||||
// true表示谷歌支付 false 0 链接包 1 谷歌包 2华为包 3 samsung包
|
||||
isGooglePlay : 0,
|
||||
isGooglePlay : 3,
|
||||
//是否上报异常日志
|
||||
isUploadLog : true,
|
||||
//是否打包成插件包模式
|
||||
|
@ -506,7 +506,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
mLiveRoomViewHolder.onGuardInfoChanged(bean);
|
||||
LiveChatBean chatBean = new LiveChatBean();
|
||||
chatBean.setContent(bean.getUserName());
|
||||
chatBean.setType(LiveChatBean.SYSTEM);
|
||||
chatBean.setType(LiveChatBean.SYSTEM2);
|
||||
mLiveRoomViewHolder.insertChat(chatBean, 1);
|
||||
}
|
||||
}
|
||||
@ -1267,7 +1267,13 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
if (uid == null) {
|
||||
uid = mLiveUid;
|
||||
}
|
||||
MobclickAgent.onEvent(mContext, "guardian_people", "守护席点击次数及人数");
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MobclickAgent.onEvent(mContext, "guardian_people", "守护席点击次数及人数");
|
||||
}
|
||||
}, 500);
|
||||
|
||||
LiveHttpUtil.getGuardList(uid, 1, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
@ -1275,7 +1281,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
Log.e("getGuardList", list.toString());
|
||||
if (list.isEmpty()) {
|
||||
// openNewBuyGuardWindow(true);
|
||||
new LiveGuardDialog(mContext, true,mLiveUid,mStream).showDialog();
|
||||
new LiveGuardDialog(mContext, true, mLiveUid, mStream).showDialog();
|
||||
} else {
|
||||
// LiveNewGuardDialogFragment fragment = new LiveNewGuardDialogFragment();
|
||||
// fragment.setList(list);
|
||||
@ -1286,7 +1292,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
// bundle.putBoolean("showBuyView", !showBuyView);
|
||||
// fragment.setArguments(bundle);
|
||||
// fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
|
||||
new LiveGuardDialog(mContext, false,mLiveUid,mStream).showDialog();
|
||||
new LiveGuardDialog(mContext, false, mLiveUid, mStream).showDialog();
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -1411,18 +1417,28 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream) || mLiveGuardInfo == null) {
|
||||
return;
|
||||
}
|
||||
LiveNewGuardBuyDialogFragment fragment = new LiveNewGuardBuyDialogFragment();
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.COIN_NAME, mCoinName);
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_ANCHER_NAME, mAncherName);
|
||||
bundle.putString(Constants.STREAM, mStream);
|
||||
bundle.putString(Constants.LIVE_ANCHER_ICON, mAncherIcon);
|
||||
bundle.putString(Constants.USER_ICON, CommonAppConfig.getInstance().getUserBean().getAvatar());
|
||||
bundle.putString("by", by);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(getSupportFragmentManager(), "LiveGuardBuyDialogFragment");
|
||||
LiveHttpUtil.getGuardList(mLiveUid, 1, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
List<GuardUserModel> list = JSON.parseArray(Arrays.toString(info), GuardUserModel.class);
|
||||
Log.e("getGuardList", list.toString());
|
||||
if (list.isEmpty()) {
|
||||
// openNewBuyGuardWindow(true);
|
||||
new LiveGuardDialog(mContext, true, mLiveUid, mStream).showDialog();
|
||||
} else {
|
||||
// LiveNewGuardDialogFragment fragment = new LiveNewGuardDialogFragment();
|
||||
// fragment.setList(list);
|
||||
// fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
// Bundle bundle = new Bundle();
|
||||
// bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
// bundle.putBoolean(Constants.ANCHOR, mIsAnchor);
|
||||
// bundle.putBoolean("showBuyView", !showBuyView);
|
||||
// fragment.setArguments(bundle);
|
||||
// fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
|
||||
new LiveGuardDialog(mContext, false, mLiveUid, mStream).showDialog();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -62,6 +62,7 @@ import com.yunbao.common.dialog.LiveChargeDialogFragment;
|
||||
import com.yunbao.common.dialog.SlideSettingsDialog;
|
||||
import com.yunbao.common.dialog.SudGameListPopup;
|
||||
import com.yunbao.common.dialog.YoursystemisolderDialog;
|
||||
import com.yunbao.common.event.AllServerNotifyFFGGGDJANEvent;
|
||||
import com.yunbao.common.event.CustomDrawerPopupEvent;
|
||||
import com.yunbao.common.event.FollowEvent;
|
||||
import com.yunbao.common.event.GiftWallIlluminateEvent;
|
||||
@ -1954,6 +1955,13 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onAllServerNotifyFFGGGDJANEvent(AllServerNotifyFFGGGDJANEvent event) {
|
||||
if (manager != null) {
|
||||
manager.showAllServerNotifyFFGGGD(event);
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onSendMoneyLongEndEvent(SendMoneyLongEndEvent sendMoneyLongModel) {
|
||||
Log.e("DateRemindModel", sendMoneyLongModel.toString());
|
||||
|
@ -51,6 +51,7 @@ import com.yunbao.common.bean.MicUserBean;
|
||||
import com.yunbao.common.bean.SendMoneyLongModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.dialog.NotCancelableDialog;
|
||||
import com.yunbao.common.event.AllServerNotifyFFGGGDJANEvent;
|
||||
import com.yunbao.common.event.GiftWallIlluminateEvent;
|
||||
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
|
||||
import com.yunbao.common.event.LoginInvalidEvent;
|
||||
@ -1923,4 +1924,10 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
|
||||
|
||||
}
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onAllServerNotifyFFGGGDJANEvent(AllServerNotifyFFGGGDJANEvent event) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.showAllServerNotifyFFGGGD(event,false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ public class ZhuangBanActivity extends AbsActivity {
|
||||
|
||||
public static void forward(Context context, String url, boolean addArgs, int isLive) {
|
||||
if (addArgs) {
|
||||
url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
}
|
||||
Intent intent = new Intent(context, ZhuangBanActivity.class);
|
||||
Log.i("tag", url);
|
||||
@ -310,6 +310,16 @@ public class ZhuangBanActivity extends AbsActivity {
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void forwardqeqweqq(Context context, String url, int isLive) {
|
||||
|
||||
Intent intent = new Intent(context, ZhuangBanActivity.class);
|
||||
Log.i("tag", url);
|
||||
intent.putExtra(Constants.URL, url);
|
||||
intent.putExtra("title", "");
|
||||
intent.putExtra("isLive", isLive);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void forward(Context context, String url, int isLive) {
|
||||
forward(context, url, true, isLive);
|
||||
}
|
||||
|
@ -50,6 +50,17 @@ public class GuardUserModel extends BaseModel {
|
||||
private String guardName;
|
||||
@SerializedName("guard_img")
|
||||
private String guardImg;
|
||||
@SerializedName("guard_level_card")
|
||||
private String guardLevelCard;
|
||||
|
||||
public String getGuardLevelCard() {
|
||||
return guardLevelCard;
|
||||
}
|
||||
|
||||
public GuardUserModel setGuardLevelCard(String guardLevelCard) {
|
||||
this.guardLevelCard = guardLevelCard;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
|
@ -5,6 +5,7 @@ import android.text.TextUtils;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||
import com.yunbao.common.event.AllServerNotifyFFGGGDJANEvent;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/22.
|
||||
@ -66,6 +67,26 @@ public class LiveReceiveGiftBean extends BaseModel {
|
||||
private String msg;
|
||||
private String msg_en;
|
||||
private String guard_type;
|
||||
private AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent;
|
||||
private boolean showB;
|
||||
|
||||
public boolean isShowB() {
|
||||
return showB;
|
||||
}
|
||||
|
||||
public LiveReceiveGiftBean setShowB(boolean showB) {
|
||||
this.showB = showB;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AllServerNotifyFFGGGDJANEvent getNotifyFFGGGDJANEvent() {
|
||||
return notifyFFGGGDJANEvent;
|
||||
}
|
||||
|
||||
public LiveReceiveGiftBean setNotifyFFGGGDJANEvent(AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent) {
|
||||
this.notifyFFGGGDJANEvent = notifyFFGGGDJANEvent;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
|
@ -36,6 +36,17 @@ public class NewAllServerNotifyGuardEvent extends BaseModel {
|
||||
private String msgCn;
|
||||
@SerializedName("msg_en")
|
||||
private String msgEn;
|
||||
@SerializedName("is_onlookers")
|
||||
private String isOnlookers ;
|
||||
|
||||
public String getIsOnlookers() {
|
||||
return isOnlookers;
|
||||
}
|
||||
|
||||
public NewAllServerNotifyGuardEvent setIsOnlookers(String isOnlookers) {
|
||||
this.isOnlookers = isOnlookers;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
|
@ -38,6 +38,7 @@ import com.yunbao.common.bean.GuardDataTipModel;
|
||||
import com.yunbao.common.bean.GuardGetGuardOpenInfoModel;
|
||||
import com.yunbao.common.bean.GuardGetGuardUserInfoModel;
|
||||
import com.yunbao.common.bean.GuardPriceModel;
|
||||
import com.yunbao.common.bean.GuardUserInfoModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.common.dialog.GuardBuyTipsDialog;
|
||||
@ -85,6 +86,7 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
|
||||
List<String> guardPrivilegeStrings = new ArrayList<>();
|
||||
GuardDataTipModel dataTipModel;
|
||||
GuardGetGuardUserInfoModel mGuardUserInfoModel;
|
||||
GuardUserInfoModel userInfo;
|
||||
|
||||
public LiveBuyGuardDialog(@NonNull Context context, String liveUid, String stream, GuardGetGuardUserInfoModel guardUserInfoModel) {
|
||||
super(context);
|
||||
@ -131,6 +133,7 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
|
||||
@Override
|
||||
public void onSuccess(GuardGetGuardOpenInfoModel data) {
|
||||
guardDataTipModels = data.getGuardData();
|
||||
userInfo = data.getUserInfo();
|
||||
// guardDataTipModels.get(0).setOpen(true);
|
||||
for (GuardDataTipModel guardDataTipModel : guardDataTipModels) {
|
||||
BuyGuardBannerModel guardBannerModel = new BuyGuardBannerModel();
|
||||
@ -161,7 +164,7 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mGuardUserInfoModel != null) {
|
||||
if (mGuardUserInfoModel.getGuardType() != 0) {
|
||||
if (mGuardUserInfoModel.getGuardType() != 0 && TextUtils.equals(mGuardUserInfoModel.getIsOpen(), "1")) {
|
||||
buyGuardBanner.setBannerCurrentItem(mGuardUserInfoModel.getGuardType() - 1);
|
||||
}
|
||||
|
||||
@ -197,6 +200,13 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
|
||||
ImgLoader.display(getContext(), guardBannerModel.getGuardOpen(), guardOpen);
|
||||
ImgLoader.display(getContext(), guardBannerModel.getUserAvatar(), userAvatar);
|
||||
ImgLoader.display(getContext(), guardBannerModel.getLiveAvatar(), liveAvatar);
|
||||
ViewClicksAntiShake.clicksAntiShake(view.findViewById(R.id.tas_guardian_group), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
new LiveGuardDialog(mContext, false, mLiveUid, mStream).showDialog();
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
@ -218,20 +228,20 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
|
||||
MobclickAgent.onEvent(mContext, "star_guardian_people", "星之守护页面观看次数及人数");
|
||||
bottomPanel.setBackgroundResource(R.drawable.bg_star_guard_bottom_panel);
|
||||
ImgLoader.display(getContext(), R.mipmap.btn_star_guard, btnGuard);
|
||||
openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.getNewString(R.string.renewal_guardian)
|
||||
openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.isNewZh() ? "續費星之守護" : "Renew Star Guardian"
|
||||
: WordUtil.getNewString(R.string.open_the_start_guard));
|
||||
|
||||
} else if (position == 1) {
|
||||
MobclickAgent.onEvent(mContext, "king_guardian_people", "王之守护页面观看次数及人数");
|
||||
bottomPanel.setBackgroundResource(R.drawable.bg_king_guard_bottom_panel);
|
||||
ImgLoader.display(getContext(), R.mipmap.btn_king_guard, btnGuard);
|
||||
openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.getNewString(R.string.renewal_guardian)
|
||||
openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.isNewZh() ? "續費王之守護" : "Renew King Guardian"
|
||||
: WordUtil.getNewString(R.string.open_the_kings_guard));
|
||||
} else if (position == 2) {
|
||||
MobclickAgent.onEvent(mContext, "god_guardian_people", "神之守护页面观看次数及人数");
|
||||
bottomPanel.setBackgroundResource(R.drawable.bg_god_guard_bottom_panel);
|
||||
ImgLoader.display(getContext(), R.mipmap.btn_god_guard, btnGuard);
|
||||
openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.getNewString(R.string.renewal_guardian)
|
||||
openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.isNewZh() ? "續費神之守護" : "Renew God Guardian"
|
||||
: WordUtil.getNewString(R.string.open_the_god_guard));
|
||||
}
|
||||
guardPriceModel = price.get(0);
|
||||
@ -286,7 +296,7 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
|
||||
.isDestroyOnDismiss(true)
|
||||
.isLightStatusBar(false)
|
||||
.popupPosition(PopupPosition.Top)
|
||||
.asCustom(new LiveBuyGuardSelectPopup(getContext(), price,guardPriceModel)
|
||||
.asCustom(new LiveBuyGuardSelectPopup(getContext(), price, guardPriceModel)
|
||||
.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
@ -328,6 +338,205 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
|
||||
ViewClicksAntiShake.clicksAntiShake(openTheGuard, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (TextUtils.equals(userInfo.getIsOpen(), "1")) {
|
||||
GuardBuyTipsDialog
|
||||
.showBuyOrRenewDialog(mContext,
|
||||
discountPrice.getText().toString(),
|
||||
dataTipModel.getGuardName(), dataTipModel.isOpen(),
|
||||
mGuardUserInfoModel, dataTipModel.getGuardType(), new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
|
||||
LiveNetManager.get(activity)
|
||||
.openGuard(mLiveUid,
|
||||
String.valueOf(dataTipModel.getGuardType()),
|
||||
String.valueOf(guardPriceModel.getPriceKey()), mStream, new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
if (TextUtils.equals(data, "22")) {
|
||||
new DialogUitl.Builder(mContext)
|
||||
.setView(R.layout.dialog_live_unfollow)
|
||||
.setConfirmString(mContext.getString(R.string.charge))
|
||||
.setContent(mContext.getString(R.string.insufficient_balance))
|
||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
LiveBuyGuardDialog.this.dismiss();
|
||||
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
|
||||
}
|
||||
}).build().show();
|
||||
} else {
|
||||
IMLoginManager.get(mContext).setGuardType(dataTipModel.getGuardType());
|
||||
ToastUtil.show(data);
|
||||
dismiss();
|
||||
if (dataTipModel.getGuardType() == 3) {
|
||||
new XPopup.Builder(mContext)
|
||||
.dismissOnTouchOutside(false) // 点击外部是否关闭弹窗,默认为true
|
||||
.asCustom(new DragonSendsMoneyPopup(mContext, mLiveUid))
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (userInfo.getGuardType() > dataTipModel.getGuardType()) {
|
||||
String name = "星之守護";
|
||||
switch (userInfo.getGuardType()) {
|
||||
case 1:
|
||||
name = WordUtil.isNewZh() ? "星之守護" : "star guardian";
|
||||
break;
|
||||
case 2:
|
||||
name = WordUtil.isNewZh() ? "王之守護" : "king guardian";
|
||||
break;
|
||||
case 3:
|
||||
name = WordUtil.isNewZh() ? "神之守護" : "god guardian";
|
||||
break;
|
||||
|
||||
}
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
if (WordUtil.isNewZh()) {
|
||||
buffer.append("您的【")
|
||||
.append(name).append("】已過期\n").append("開通相同或更高等級守護將會保留您的守護等級").append("開通低等級守護將重新計算您的守護等級");
|
||||
} else {
|
||||
buffer.append("Your [")
|
||||
.append(name).append("] has expired").append("active the same or higher level of guardian will retain your guardian level").append("active lower level guardian will recalculate your guardian level");
|
||||
}
|
||||
GuardBuyTipsDialog
|
||||
.showBuyOrRenewDialog(mContext,
|
||||
null,
|
||||
buffer.toString(), false,
|
||||
null, -200, new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
GuardBuyTipsDialog
|
||||
.showBuyOrRenewDialog(mContext,
|
||||
discountPrice.getText().toString(),
|
||||
dataTipModel.getGuardName(), dataTipModel.isOpen(),
|
||||
mGuardUserInfoModel, dataTipModel.getGuardType(), new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
|
||||
LiveNetManager.get(activity)
|
||||
.openGuard(mLiveUid,
|
||||
String.valueOf(dataTipModel.getGuardType()),
|
||||
String.valueOf(guardPriceModel.getPriceKey()), mStream, new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
if (TextUtils.equals(data, "22")) {
|
||||
new DialogUitl.Builder(mContext)
|
||||
.setView(R.layout.dialog_live_unfollow)
|
||||
.setConfirmString(mContext.getString(R.string.charge))
|
||||
.setContent(mContext.getString(R.string.insufficient_balance))
|
||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
LiveBuyGuardDialog.this.dismiss();
|
||||
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
|
||||
}
|
||||
}).build().show();
|
||||
} else {
|
||||
IMLoginManager.get(mContext).setGuardType(dataTipModel.getGuardType());
|
||||
ToastUtil.show(data);
|
||||
dismiss();
|
||||
if (dataTipModel.getGuardType() == 3) {
|
||||
new XPopup.Builder(mContext)
|
||||
.dismissOnTouchOutside(false) // 点击外部是否关闭弹窗,默认为true
|
||||
.asCustom(new DragonSendsMoneyPopup(mContext, mLiveUid))
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}else {
|
||||
GuardBuyTipsDialog
|
||||
.showBuyOrRenewDialog(mContext,
|
||||
discountPrice.getText().toString(),
|
||||
dataTipModel.getGuardName(), dataTipModel.isOpen(),
|
||||
mGuardUserInfoModel, dataTipModel.getGuardType(), new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
|
||||
LiveNetManager.get(activity)
|
||||
.openGuard(mLiveUid,
|
||||
String.valueOf(dataTipModel.getGuardType()),
|
||||
String.valueOf(guardPriceModel.getPriceKey()), mStream, new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
if (TextUtils.equals(data, "22")) {
|
||||
new DialogUitl.Builder(mContext)
|
||||
.setView(R.layout.dialog_live_unfollow)
|
||||
.setConfirmString(mContext.getString(R.string.charge))
|
||||
.setContent(mContext.getString(R.string.insufficient_balance))
|
||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
LiveBuyGuardDialog.this.dismiss();
|
||||
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
|
||||
}
|
||||
}).build().show();
|
||||
} else {
|
||||
IMLoginManager.get(mContext).setGuardType(dataTipModel.getGuardType());
|
||||
ToastUtil.show(data);
|
||||
dismiss();
|
||||
if (dataTipModel.getGuardType() == 3) {
|
||||
new XPopup.Builder(mContext)
|
||||
.dismissOnTouchOutside(false) // 点击外部是否关闭弹窗,默认为true
|
||||
.asCustom(new DragonSendsMoneyPopup(mContext, mLiveUid))
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
switch (dataTipModel.getGuardType()) {
|
||||
case 1:
|
||||
MobclickAgent.onEvent(mContext, "star_guardian_renew_btn", "星之守护开通/续费按钮点击次数及人数");
|
||||
@ -341,56 +550,7 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
|
||||
|
||||
}
|
||||
|
||||
GuardBuyTipsDialog
|
||||
.showBuyOrRenewDialog(mContext,
|
||||
discountPrice.getText().toString(),
|
||||
dataTipModel.getGuardName(), dataTipModel.isOpen(),
|
||||
mGuardUserInfoModel, dataTipModel.getGuardType(), new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
|
||||
LiveNetManager.get(activity)
|
||||
.openGuard(mLiveUid,
|
||||
String.valueOf(dataTipModel.getGuardType()),
|
||||
String.valueOf(guardPriceModel.getPriceKey()), mStream, new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
if (TextUtils.equals(data, "22")) {
|
||||
new DialogUitl.Builder(mContext)
|
||||
.setView(R.layout.dialog_live_unfollow)
|
||||
.setConfirmString(mContext.getString(R.string.charge))
|
||||
.setContent(mContext.getString(R.string.insufficient_balance))
|
||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
LiveBuyGuardDialog.this.dismiss();
|
||||
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
|
||||
}
|
||||
}).build().show();
|
||||
} else {
|
||||
ToastUtil.show(data);
|
||||
dismiss();
|
||||
if (dataTipModel.getGuardType() == 3) {
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new DragonSendsMoneyPopup(mContext, mLiveUid))
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
// new XPopup.Builder(mContext)
|
||||
// .asCustom(new DragonSendsMoneyPopup(mContext))
|
||||
// .show();
|
||||
|
@ -825,51 +825,54 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
giftSendLayout.setVisibility(View.VISIBLE);
|
||||
mBtnSendGroup.removeCallbacks(newLianSongRunnable);
|
||||
getCoin();
|
||||
LiveNetManager.get(mContext)
|
||||
.getGiftNamingInfo(liveGiftModel.getId() + "", new com.yunbao.common.http.base.HttpCallback<GiftNamingInfoModel>() {
|
||||
@Override
|
||||
public void onSuccess(GiftNamingInfoModel data) {
|
||||
if (TextUtils.equals(data.getNamingStatus(), "1")) {
|
||||
liveGiftModel = JSONObject.parseObject(GsonUtils.toJson(data), LiveGiftBean.class);
|
||||
if (!TextUtils.isEmpty(liveGiftModel.getNamingLiveuid()) &&
|
||||
!TextUtils.isEmpty(liveGiftModel.getNamingUid()) &&
|
||||
!TextUtils.equals(liveGiftModel.getNamingLiveuid(), "0") &&
|
||||
!TextUtils.equals(liveGiftModel.getNamingUid(), "0")) {
|
||||
namingLayout.setVisibility(View.VISIBLE);
|
||||
ImgLoader.display(mContext, liveGiftModel.getNamingLiveAvatar(), namingAvatar);
|
||||
StringBuffer namingNameText = new StringBuffer();
|
||||
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
namingNameText.append("获取冠名:")
|
||||
.append(liveGiftModel.getNamingUserCoin())
|
||||
.append(" ");
|
||||
if (liveGiftModel!=null){
|
||||
LiveNetManager.get(mContext)
|
||||
.getGiftNamingInfo(liveGiftModel.getId() + "", new com.yunbao.common.http.base.HttpCallback<GiftNamingInfoModel>() {
|
||||
@Override
|
||||
public void onSuccess(GiftNamingInfoModel data) {
|
||||
if (TextUtils.equals(data.getNamingStatus(), "1")) {
|
||||
liveGiftModel = JSONObject.parseObject(GsonUtils.toJson(data), LiveGiftBean.class);
|
||||
if (!TextUtils.isEmpty(liveGiftModel.getNamingLiveuid()) &&
|
||||
!TextUtils.isEmpty(liveGiftModel.getNamingUid()) &&
|
||||
!TextUtils.equals(liveGiftModel.getNamingLiveuid(), "0") &&
|
||||
!TextUtils.equals(liveGiftModel.getNamingUid(), "0")) {
|
||||
namingLayout.setVisibility(View.VISIBLE);
|
||||
ImgLoader.display(mContext, liveGiftModel.getNamingLiveAvatar(), namingAvatar);
|
||||
StringBuffer namingNameText = new StringBuffer();
|
||||
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
namingNameText.append("获取冠名:")
|
||||
.append(liveGiftModel.getNamingUserCoin())
|
||||
.append(" ");
|
||||
|
||||
} else {
|
||||
namingNameText.append("Get title: ")
|
||||
.append(liveGiftModel.getNamingUserCoin())
|
||||
.append(" ");
|
||||
}
|
||||
namingNameText.append(mContext.getText(com.yunbao.live.R.string.title_anchor))
|
||||
.append(liveGiftModel.getNamingLiveName())
|
||||
.append(" ")
|
||||
.append(mContext.getText(com.yunbao.live.R.string.the_title_financier))
|
||||
.append(" ")
|
||||
.append(liveGiftModel.getNamingUserName());
|
||||
namingName.setText(namingNameText.toString());
|
||||
} else {
|
||||
namingNameText.append("Get title: ")
|
||||
.append(liveGiftModel.getNamingUserCoin())
|
||||
.append(" ");
|
||||
namingLayout.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
namingNameText.append(mContext.getText(com.yunbao.live.R.string.title_anchor))
|
||||
.append(liveGiftModel.getNamingLiveName())
|
||||
.append(" ")
|
||||
.append(mContext.getText(com.yunbao.live.R.string.the_title_financier))
|
||||
.append(" ")
|
||||
.append(liveGiftModel.getNamingUserName());
|
||||
namingName.setText(namingNameText.toString());
|
||||
} else {
|
||||
namingLayout.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
} else {
|
||||
namingLayout.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,6 +2,7 @@ package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
@ -199,44 +200,57 @@ public class LiveGuardDialog extends AbsDialogPopupWindow {
|
||||
@Override
|
||||
public void onSuccess(GuardGetGuardUserInfoModel data) {
|
||||
getGuardUserInfoModel = data;
|
||||
if (data.getGuardType() == 0) {
|
||||
if (TextUtils.equals(data.getIsOpen(), "0")) {
|
||||
guardianTask.setVisibility(GONE);
|
||||
myGraudGrade.setVisibility(GONE);
|
||||
btnGuardOpen.setText(WordUtil.isNewZh() ? "開通守護" : "Open Guard");
|
||||
guard_hint.setText(WordUtil.getNewString(R.string.guardian_for_your_favorite_anchor));
|
||||
guard_hint.setText(WordUtil.isNewZh() ? "快為您喜歡的主播開通守護吧!" : "Turn on the guard for your favorite anchor!");
|
||||
} else {
|
||||
guardianTask.setVisibility(VISIBLE);
|
||||
myGraudGrade.setVisibility(VISIBLE);
|
||||
btnGuardOpen.setText(WordUtil.isNewZh() ? "續費守護" : "Renewal Guard");
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "您是當前主播的" : "You are the current anchor's ")
|
||||
.append("【");
|
||||
switch (data.getGuardType()) {
|
||||
case 1:
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "星之守護" : "Star Guardian")
|
||||
.append("】");
|
||||
guard_hint.setText(stringBuffer.toString());
|
||||
break;
|
||||
case 2:
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "王之守護" : "King Guardian")
|
||||
.append("】");
|
||||
guard_hint.setText(stringBuffer.toString());
|
||||
break;
|
||||
case 3:
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "神之守護" : "God Guardian")
|
||||
.append("】");
|
||||
guard_hint.setText(stringBuffer.toString());
|
||||
break;
|
||||
default:
|
||||
guard_hint.setText(WordUtil.getNewString(R.string.guardian_for_your_favorite_anchor));
|
||||
break;
|
||||
if (data.getGuardType() == 0) {
|
||||
guardianTask.setVisibility(GONE);
|
||||
myGraudGrade.setVisibility(GONE);
|
||||
btnGuardOpen.setText(WordUtil.isNewZh() ? "開通守護" : "Open Guard");
|
||||
guard_hint.setText(WordUtil.isNewZh() ? "快為您喜歡的主播開通守護吧!" : "Turn on the guard for your favorite anchor!");
|
||||
} else {
|
||||
guardianTask.setVisibility(VISIBLE);
|
||||
myGraudGrade.setVisibility(VISIBLE);
|
||||
btnGuardOpen.setText(WordUtil.isNewZh() ? "續費守護" : "Renewal");
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "您是當前主播的" : "You are the ");
|
||||
switch (data.getGuardType()) {
|
||||
case 1:
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "【星之守護】" : "star guardian")
|
||||
.append(WordUtil.isNewZh() ? " " :" of the current streamer");
|
||||
guard_hint.setText(stringBuffer.toString());
|
||||
break;
|
||||
case 2:
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "【王之守護】" : "king guardian")
|
||||
.append(WordUtil.isNewZh() ? " " :" of the current streamer");
|
||||
guard_hint.setText(stringBuffer.toString());
|
||||
break;
|
||||
case 3:
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "【神之守護】" : "god guardian")
|
||||
.append(WordUtil.isNewZh() ? " " :" of the current streamer");
|
||||
guard_hint.setText(stringBuffer.toString());
|
||||
break;
|
||||
default:
|
||||
guard_hint.setText(WordUtil.isNewZh() ? "快為您喜歡的主播開通守護吧!" : "Turn on the guard for your favorite anchor!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (data.getEndtime() == 0) {
|
||||
guard_time.setVisibility(GONE);
|
||||
} else {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
if (WordUtil.isNewZh()) {
|
||||
stringBuffer.append("守護日期截止到 ").append(TimeUtils.getDateToString(data.getEndtime() * 1000, "yyyy-MM-dd"));
|
||||
} else {
|
||||
stringBuffer.append("Guardianship date is up to ").append(TimeUtils.getDateToString(data.getEndtime() * 1000, "yyyy-MM-dd"));
|
||||
}
|
||||
|
||||
guard_time.setText(String.format(WordUtil.getNewString(R.string.guardiandate), TimeUtils.getDateToString(data.getEndtime() * 1000, "yyyy-MM-dd")));
|
||||
guard_time.setText(stringBuffer.toString());
|
||||
}
|
||||
|
||||
}
|
||||
@ -277,11 +291,11 @@ public class LiveGuardDialog extends AbsDialogPopupWindow {
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
htmlUrl.append(CommonAppConfig.HOST)
|
||||
.append("/h5/Guard/mission.html?")
|
||||
.append("&token=")
|
||||
.append("token=")
|
||||
.append(userInfo.getToken())
|
||||
.append("&uid=")
|
||||
.append(userInfo.getId())
|
||||
.append("&&anchorUid=")
|
||||
.append("&anchorUid=")
|
||||
.append(mLiveUid)
|
||||
.append("&isZh=")
|
||||
.append(((WordUtil.isNewZh()) ? "1" : "0"));
|
||||
@ -303,11 +317,11 @@ public class LiveGuardDialog extends AbsDialogPopupWindow {
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
htmlUrl.append(CommonAppConfig.HOST)
|
||||
.append("/h5/Guard/level.html?")
|
||||
.append("&token=")
|
||||
.append("token=")
|
||||
.append(userInfo.getToken())
|
||||
.append("&uid=")
|
||||
.append(userInfo.getId())
|
||||
.append("&&anchorUid=")
|
||||
.append("&anchorUid=")
|
||||
.append(mLiveUid)
|
||||
.append("&isZh=")
|
||||
.append(((WordUtil.isNewZh()) ? "1" : "0"));
|
||||
@ -330,9 +344,35 @@ public class LiveGuardDialog extends AbsDialogPopupWindow {
|
||||
userNickname.setText(guardUserModel.getUserNicename());
|
||||
weekContribution.setText(WordUtil.getNewString(R.string.this_week_contribution) + " " + guardUserModel.getContribute());
|
||||
userSex.setImageResource(CommonIconUtil.getSexIcon(guardUserModel.getSex()));
|
||||
ImgLoader.display(mContext, guardUserModel.getGuardImg(), tagKing);
|
||||
|
||||
guardLevel.setText(String.valueOf(guardUserModel.getGuardLevel()));
|
||||
ImgLoader.display(mContext, guardUserModel.getAvatar(), guardIcon);
|
||||
giftSvga.setImageResource(R.mipmap.guardian_img_wings_p);
|
||||
if (TextUtils.equals(guardUserModel.getGuardLevelCard(), "0")) {
|
||||
switch (guardUserModel.getGuardType()) {
|
||||
case 1:
|
||||
ImgLoader.display(mContext, R.mipmap.tag_start_hui, tagKing);
|
||||
break;
|
||||
case 2:
|
||||
ImgLoader.display(mContext, R.mipmap.tag_king_hui, tagKing);
|
||||
break;
|
||||
case 3:
|
||||
ImgLoader.display(mContext, R.mipmap.tag_god_hui, tagKing);
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
switch (guardUserModel.getGuardType()) {
|
||||
case 1:
|
||||
ImgLoader.display(mContext, R.mipmap.tag_start, tagKing);
|
||||
break;
|
||||
case 2:
|
||||
ImgLoader.display(mContext, R.mipmap.tag_king, tagKing);
|
||||
break;
|
||||
case 3:
|
||||
ImgLoader.display(mContext, R.mipmap.tag_god, tagKing);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -368,6 +368,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
||||
//守護
|
||||
} else if (TextUtils.equals(event.getMethod(), "BuyProtection")) {
|
||||
((LiveActivity) mContext).openNewBuyGuardWindow(event.getData());
|
||||
dismiss();
|
||||
} else if (TextUtils.equals(event.getMethod(), "BuyVIP")) {
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname="
|
||||
|
@ -4,15 +4,20 @@ import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.text.Html;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextUtils;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -34,12 +39,15 @@ import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
import com.opensource.svgaplayer.utils.SVGARect;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||
import com.yunbao.common.event.AllServerNotifyFFGGGDJANEvent;
|
||||
import com.yunbao.common.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.CommonHttpConsts;
|
||||
@ -49,6 +57,7 @@ import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.GiftCacheUtil;
|
||||
import com.yunbao.common.utils.HtmlTagHandler;
|
||||
@ -59,11 +68,14 @@ import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.activity.ZhuangBanActivity;
|
||||
import com.yunbao.live.bean.LiveGiftPrizePoolWinBean;
|
||||
import com.yunbao.live.bean.LiveLuckGiftWinBean;
|
||||
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||
import com.yunbao.live.bean.NewAllServerNotifyGuardEvent;
|
||||
import com.yunbao.live.custom.FrameImageView;
|
||||
import com.yunbao.live.dialog.LiveHDDialogFragment;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
import com.yunbao.live.utils.AllMsgTextRender;
|
||||
import com.yunbao.live.utils.LiveIconUtil;
|
||||
@ -127,8 +139,10 @@ public class LiveGiftAnimPresenter {
|
||||
private ObjectAnimator mGifGiftTipHideAnimatorAllServer;
|
||||
private ObjectAnimator mGifGiftTipShowAnimatorBuyGuard;
|
||||
private ObjectAnimator mGifGiftTipShowAnimatorBuyGuardNew;
|
||||
private ObjectAnimator mGifGiftTipShowAnimatorfull_service_notice_new;
|
||||
private ObjectAnimator mGifGiftTipHideAnimatorBuyGuard;
|
||||
private ObjectAnimator mGifGiftTipHideAnimatorBuyGuardNew;
|
||||
private ObjectAnimator mGifGiftTipHideAnimatorfull_service_notice_new;
|
||||
|
||||
private ObjectAnimator mGifGiftTipShowAnimatorBuyZuoji;
|
||||
private ObjectAnimator mGifGiftTipHideAnimatorBuyZuoji;
|
||||
@ -167,6 +181,8 @@ public class LiveGiftAnimPresenter {
|
||||
private static final int WHAT_BUY_VIP_2 = -14;
|
||||
private static final int WHAT_BUY_GUARD_NEW_1 = -15;
|
||||
private static final int WHAT_BUY_GUARD_NEW_2 = -16;
|
||||
private static final int full_service_notice_new_1 = -17;
|
||||
private static final int full_service_notice_new_2 = -18;
|
||||
private boolean mShowGif;
|
||||
private boolean mShowBuyGuard;
|
||||
private boolean mShowAllServer;
|
||||
@ -257,6 +273,12 @@ public class LiveGiftAnimPresenter {
|
||||
ivGuardType = v.findViewById(R.id.ivGuardType);
|
||||
|
||||
mFrameImageView = (FrameImageView) v.findViewById(R.id.all_frame_img);
|
||||
full_service_notice_new = v.findViewById(R.id.full_service_notice_new);
|
||||
full_service_notice_new_bg = v.findViewById(R.id.full_service_notice_new_bg);
|
||||
full_service_notice_new_text = v.findViewById(R.id.full_service_notice_new_text);
|
||||
iv_look_full_service_notice_new = v.findViewById(R.id.iv_look_full_service_notice_new);
|
||||
iv_look_full_service_notice_new3 = v.findViewById(R.id.iv_look_full_service_notice_new3);
|
||||
iv_look_full_service_notice_new2 = v.findViewById(R.id.iv_look_full_service_notice_new2);
|
||||
|
||||
mIvLookClick();
|
||||
mIvLookBuyGuardClick();
|
||||
@ -264,6 +286,7 @@ public class LiveGiftAnimPresenter {
|
||||
mIvLookBuyLiangNameClick();
|
||||
mIvLookBuyVipClick();
|
||||
onmIvLookBuyGuardNew();
|
||||
oniv_look_full_service_notice_new();
|
||||
setGitTipAnimator1();
|
||||
setGitTipAnimatorAllServer();
|
||||
setGitTipAnimatorBuyGuard();
|
||||
@ -271,7 +294,7 @@ public class LiveGiftAnimPresenter {
|
||||
setGitTipAnimatorBuyLiangName();
|
||||
setGitTipAnimatorBuyVip();
|
||||
setGitTipAnimatorBuyGuardNew();
|
||||
|
||||
setGitTipAnimatormGifGiftTipShowAnimatorfull_service_notice_new();
|
||||
mSendString = "送了";
|
||||
mLiveGiftViewHolders = new LiveGiftViewHolder[2];
|
||||
mLiveGiftViewHolders[0] = new LiveGiftViewHolder(context, (ViewGroup) v.findViewById(R.id.gift_group_2));
|
||||
@ -550,6 +573,39 @@ public class LiveGiftAnimPresenter {
|
||||
});
|
||||
}
|
||||
|
||||
private void setGitTipAnimatormGifGiftTipShowAnimatorfull_service_notice_new() {
|
||||
mDp500 = DpUtil.dp2px(500);
|
||||
mGifGiftTipShowAnimatorfull_service_notice_new = ObjectAnimator.ofFloat(full_service_notice_new, "translationX", mDp500, 0);
|
||||
mGifGiftTipShowAnimatorfull_service_notice_new.setDuration(2000);
|
||||
mGifGiftTipShowAnimatorfull_service_notice_new.setInterpolator(new LinearInterpolator());
|
||||
mGifGiftTipShowAnimatorfull_service_notice_new.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (mHandler != null) {
|
||||
mHandler.sendEmptyMessageDelayed(full_service_notice_new_1, 5000);
|
||||
}
|
||||
}
|
||||
});
|
||||
mDp10 = DpUtil.dp2px(10);
|
||||
mGifGiftTipHideAnimatorfull_service_notice_new = ObjectAnimator.ofFloat(full_service_notice_new, "translationX", 0);
|
||||
mGifGiftTipHideAnimatorfull_service_notice_new.setDuration(3000);
|
||||
mGifGiftTipHideAnimatorfull_service_notice_new.setInterpolator(new AccelerateDecelerateInterpolator());
|
||||
mGifGiftTipHideAnimatorfull_service_notice_new.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
|
||||
@Override
|
||||
public void onAnimationUpdate(ValueAnimator animation) {
|
||||
full_service_notice_new.setAlpha(1 - animation.getAnimatedFraction());
|
||||
}
|
||||
});
|
||||
mGifGiftTipHideAnimatorfull_service_notice_new.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (mHandler != null) {
|
||||
mHandler.sendEmptyMessageDelayed(full_service_notice_new_2, 100);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setGitTipAnimatorBuyZuoji() {
|
||||
mDp500 = DpUtil.dp2px(500);
|
||||
mGifGiftTipShowAnimatorBuyZuoji = ObjectAnimator.ofFloat(mGifGiftTipGroupBuyZuoji, "translationX", mDp500, 0);
|
||||
@ -766,6 +822,9 @@ public class LiveGiftAnimPresenter {
|
||||
} else if (msg.what == WHAT_BUY_GUARD_NEW_1) {
|
||||
mGifGiftTipHideAnimatorBuyGuardNew.setFloatValues(0, -mDp10 - mGifGiftTipGroupBuyGuardNew.getWidth());
|
||||
mGifGiftTipHideAnimatorBuyGuardNew.start();
|
||||
} else if (msg.what == full_service_notice_new_1) {
|
||||
mGifGiftTipHideAnimatorfull_service_notice_new.setFloatValues(0, -mDp10 - full_service_notice_new.getWidth());
|
||||
mGifGiftTipHideAnimatorfull_service_notice_new.start();
|
||||
} else if (msg.what == WHAT_BUY_GUARD_2) {
|
||||
mShowAllServer = false;
|
||||
heightOffsetArr[index4Guard] = 0;
|
||||
@ -780,6 +839,13 @@ public class LiveGiftAnimPresenter {
|
||||
if (bean != null) {
|
||||
chooseInto(bean);
|
||||
}
|
||||
} else if (msg.what == full_service_notice_new_2) {
|
||||
mShowAllServer = false;
|
||||
heightOffsetArr[index4Guard] = 0;
|
||||
LiveReceiveGiftBean bean = mGifAll.poll();
|
||||
if (bean != null) {
|
||||
chooseInto(bean);
|
||||
}
|
||||
} else if (msg.what == WHAT_BUY_ZUOJI_1) {
|
||||
mGifGiftTipHideAnimatorBuyZuoji.setFloatValues(0, -mDp10 - mGifGiftTipGroupBuyZuoji.getWidth());
|
||||
mGifGiftTipHideAnimatorBuyZuoji.start();
|
||||
@ -839,6 +905,8 @@ public class LiveGiftAnimPresenter {
|
||||
showSystAnim(bean);
|
||||
} else if (action == 90) {
|
||||
showBuyGuardGiftAnimNew(notifyGuardEvent);
|
||||
} else if (action == 91) {
|
||||
showAllServerNotifyFFGGGD(bean.getNotifyFFGGGDJANEvent(), bean.isShowB());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1024,6 +1092,95 @@ public class LiveGiftAnimPresenter {
|
||||
}
|
||||
}
|
||||
|
||||
View full_service_notice_new;
|
||||
ImageView full_service_notice_new_bg;
|
||||
TextView full_service_notice_new_text;
|
||||
TextView iv_look_full_service_notice_new;
|
||||
AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent;
|
||||
View iv_look_full_service_notice_new3;
|
||||
ImageView iv_look_full_service_notice_new2;
|
||||
|
||||
public void showAllServerNotifyFFGGGD(AllServerNotifyFFGGGDJANEvent event, boolean showB) {
|
||||
if (TextUtils.isEmpty(event.getBackgroundImage())) return;
|
||||
|
||||
|
||||
mRoomNum = event.getLiveuid();
|
||||
if (mShowAllServer) {
|
||||
if (mGifAll != null) {
|
||||
LiveReceiveGiftBean bean = new LiveReceiveGiftBean();
|
||||
bean.setSendtype(91);
|
||||
bean.setNotifyFFGGGDJANEvent(event);
|
||||
bean.setShowB(showB);
|
||||
mGifAll.offer(bean);
|
||||
}
|
||||
} else {
|
||||
notifyFFGGGDJANEvent = event;
|
||||
mShowAllServer = true;
|
||||
index4Guard = getFirstIndexOfValue(heightOffsetArr, 0);
|
||||
if (index4Guard >= 0) {
|
||||
heightOffsetArr[index4Guard] = 1;
|
||||
int y;
|
||||
y = index4Guard * 60;
|
||||
FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) full_service_notice_new.getLayoutParams();
|
||||
params.topMargin = DpUtil.dp2px(y);
|
||||
full_service_notice_new.setLayoutParams(params);
|
||||
}
|
||||
full_service_notice_new.setAlpha(1f);
|
||||
full_service_notice_new.setVisibility(View.VISIBLE);
|
||||
ImgLoader.display(mContext, event.getBackgroundImage(), full_service_notice_new_bg);
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||
String msgN = WordUtil.isNewZh() ? event.getMsgCn() : event.getMsgEn();
|
||||
builder.append(msgN);
|
||||
for (AllServerNotifyFFGGGDJANEvent.StyleDTO dto : event.getStyle()) {
|
||||
String textMsg = WordUtil.isNewZh() ? dto.getStrCn() : dto.getStrEn();
|
||||
int unameIndexOf = msgN.indexOf(textMsg);
|
||||
int unameSize = textMsg.length();
|
||||
builder.setSpan(new ForegroundColorSpan(Color.parseColor(dto.getColour())), unameIndexOf, unameIndexOf + unameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
if (!showB){
|
||||
iv_look_full_service_notice_new3.setVisibility(View.GONE);
|
||||
}else {
|
||||
if (TextUtils.equals(event.getJumpType(),"0")){
|
||||
iv_look_full_service_notice_new3.setVisibility(View.GONE);
|
||||
}else {
|
||||
iv_look_full_service_notice_new3.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(event.getButtonImage())) {
|
||||
|
||||
ImgLoader.display(mContext, event.getButtonImage(), iv_look_full_service_notice_new2);
|
||||
SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
|
||||
String buttonString = WordUtil.isNewZh() ? event.getButtonMsgCn() : event.getButtonMsgEn();
|
||||
stringBuilder.append(buttonString);
|
||||
try {
|
||||
for (AllServerNotifyFFGGGDJANEvent.ButtonStyleDTO dto : event.getButtonStyle()) {
|
||||
String textMsg = WordUtil.isNewZh() ? dto.getStrCn() : dto.getStrEn();
|
||||
int unameIndexOf = buttonString.indexOf(textMsg);
|
||||
int unameSize = textMsg.length();
|
||||
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(dto.getColour())), unameIndexOf, unameIndexOf + unameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
iv_look_full_service_notice_new.setText(buttonString);
|
||||
}
|
||||
iv_look_full_service_notice_new.setText(stringBuilder);
|
||||
}
|
||||
full_service_notice_new_text.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (full_service_notice_new_text != null) {
|
||||
full_service_notice_new_text.setSelected(true);
|
||||
full_service_notice_new_text.setEllipsize(TextUtils.TruncateAt.MARQUEE);
|
||||
full_service_notice_new_text.requestFocus();
|
||||
full_service_notice_new_text.setText(builder);
|
||||
}
|
||||
|
||||
}
|
||||
}, 500);
|
||||
mGifGiftTipShowAnimatorfull_service_notice_new.start();
|
||||
}
|
||||
}
|
||||
|
||||
View mGifGiftTipGroupBuyGuardNew;
|
||||
LinearLayout guardAllServerNotifyBg;
|
||||
TextView mGifGiftTipBuyGuardNew;
|
||||
@ -1076,7 +1233,7 @@ public class LiveGiftAnimPresenter {
|
||||
break;
|
||||
|
||||
}
|
||||
if (TextUtils.equals(mLiveUid, event.getLiveuid())) {
|
||||
if (!TextUtils.isEmpty(event.getIsOnlookers()) && TextUtils.equals("0", event.getIsOnlookers())) {
|
||||
mIvLookBuyGuardNew.setVisibility(View.GONE);
|
||||
} else {
|
||||
mIvLookBuyGuardNew.setVisibility(View.VISIBLE);
|
||||
@ -1105,11 +1262,50 @@ public class LiveGiftAnimPresenter {
|
||||
ViewClicksAntiShake.clicksAntiShake(mIvLookBuyGuardNew, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
mIvLookBuyGuardNew.setVisibility(View.GONE);
|
||||
changeLiveRoom();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void oniv_look_full_service_notice_new() {
|
||||
ViewClicksAntiShake.clicksAntiShake(iv_look_full_service_notice_new, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
MobclickAgent.onEvent(mContext, "new_full_server", "全服的埋点");
|
||||
String jumpType = notifyFFGGGDJANEvent.getJumpType();
|
||||
if (TextUtils.equals(jumpType, "1")) {
|
||||
changeLiveRoom();
|
||||
} else if (TextUtils.equals(jumpType, "2")) {
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
if (!TextUtils.isEmpty(notifyFFGGGDJANEvent.getLink())) {
|
||||
StringBuffer htmlUrl = new StringBuffer();
|
||||
htmlUrl.append(notifyFFGGGDJANEvent.getLink())
|
||||
.append(notifyFFGGGDJANEvent.getLink().contains("?") ? "&uid=" : "?uid=")
|
||||
.append(userInfo.getId())
|
||||
.append("&token=")
|
||||
.append(userInfo.getToken())
|
||||
.append("&isZh=")
|
||||
.append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
if (!TextUtils.isEmpty(notifyFFGGGDJANEvent.getH5Type())) {
|
||||
if (TextUtils.equals(notifyFFGGGDJANEvent.getH5Type(), "1")) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("url", htmlUrl.toString());
|
||||
bundle.putInt("height", DeviceUtils.getScreenHeight((Activity) mContext) / 5 * 3);
|
||||
LiveHDDialogFragment fragment = new LiveHDDialogFragment();
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
||||
} else if (TextUtils.equals(notifyFFGGGDJANEvent.getH5Type(), "2")) {
|
||||
ZhuangBanActivity.forwardqeqweqq(mContext, htmlUrl.toString(), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//购买守护 全服通知
|
||||
public void showBuyGuardGiftAnim(LiveReceiveGiftBean bean) {
|
||||
if (bean.ismTypeBuyGuard()) {
|
||||
@ -1661,6 +1857,12 @@ public class LiveGiftAnimPresenter {
|
||||
if (mGifGiftTipHideAnimatorBuyGuardNew != null) {
|
||||
mGifGiftTipHideAnimatorBuyGuardNew.cancel();
|
||||
}
|
||||
if (mGifGiftTipHideAnimatorfull_service_notice_new != null) {
|
||||
mGifGiftTipHideAnimatorfull_service_notice_new.cancel();
|
||||
}
|
||||
if (mGifGiftTipShowAnimatorfull_service_notice_new != null) {
|
||||
mGifGiftTipShowAnimatorfull_service_notice_new.cancel();
|
||||
}
|
||||
|
||||
if (mGifGiftTipShowAnimatorBuyZuoji != null) {
|
||||
mGifGiftTipShowAnimatorBuyZuoji.cancel();
|
||||
|
@ -102,7 +102,7 @@ public class SocketRyChatUtil {
|
||||
.param("uid", u.getId())
|
||||
.param("liangname", u.getGoodName())
|
||||
.param("vip_type", u.getVip().getType())
|
||||
.param("guard_type", guardType)
|
||||
.param("guard_type", IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getGuardType())
|
||||
.param("medal_name", u.getMedalName())
|
||||
.param("medal_level", model.getMedalLevel())
|
||||
.param("good_num", u.getGoodnum())
|
||||
@ -180,7 +180,7 @@ public class SocketRyChatUtil {
|
||||
.param("bubble", u.getDress().getBubble())
|
||||
.param("medal", u.getDress().getMedal())
|
||||
.param("medal_new", u.getDress().getMedal_new())
|
||||
.param("guard_type", guardType)
|
||||
.param("guard_type", IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getGuardType())
|
||||
.param("medal_name", u.getMedalName())
|
||||
.param("medal_level", u.getMedalLevel())
|
||||
.param("good_num", u.getGoodnum())
|
||||
@ -716,7 +716,7 @@ public class SocketRyChatUtil {
|
||||
.param("uhead", u.getAvatar())
|
||||
.param("votestotal", votes)
|
||||
.param("guard_nums", guardNum)
|
||||
.param("guard_type", guardType);
|
||||
.param("guard_type", IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getGuardType());
|
||||
msg.create();
|
||||
|
||||
}
|
||||
@ -742,7 +742,7 @@ public class SocketRyChatUtil {
|
||||
.param("bubble", u.getDress().getBubble())
|
||||
.param("medal", u.getDress().getMedal())
|
||||
.param("medal_new", u.getDress().getMedal_new())
|
||||
.param("guard_type", guardType);
|
||||
.param("guard_type", IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getGuardType());
|
||||
msg.create();
|
||||
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.bean.WishModel;
|
||||
import com.yunbao.common.bean.XydCompleteModel;
|
||||
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||
import com.yunbao.common.event.AllServerNotifyFFGGGDJANEvent;
|
||||
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
||||
import com.yunbao.common.event.GiftWallIlluminateEvent;
|
||||
import com.yunbao.common.event.QuickGiftingEvent;
|
||||
@ -391,7 +392,7 @@ public class SocketRyClient {
|
||||
} else if (action2 == 61) {//赠送礼物
|
||||
sendGiftByNotify(map);
|
||||
} else if (action2 == 62) {//购买守护
|
||||
buyGuardByNotify(map);
|
||||
// buyGuardByNotify(map);
|
||||
// }else if (action2 == 63){
|
||||
} else if (action2 == 63) {//购买vip
|
||||
buyVipByNotify(map);
|
||||
@ -443,6 +444,10 @@ public class SocketRyClient {
|
||||
} else if (action2 == 90) {
|
||||
NewAllServerNotifyGuardEvent notifyGuardEvent = GsonUtils.fromJson(map.toString(), NewAllServerNotifyGuardEvent.class);
|
||||
Bus.get().post(notifyGuardEvent);
|
||||
buyGuardInSameRoom(map);
|
||||
}else if (action2==91){
|
||||
AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent = GsonUtils.fromJson(map.toString(), AllServerNotifyFFGGGDJANEvent.class);
|
||||
Bus.get().post(notifyFFGGGDJANEvent);
|
||||
}
|
||||
break;
|
||||
case Constants.SOCKET_SEND_BARRAGE://发弹幕
|
||||
@ -820,16 +825,18 @@ public class SocketRyClient {
|
||||
}
|
||||
|
||||
private void buyGuardInSameRoom(JSONObject map) {
|
||||
String guardName = WordUtil.isNewZh() ? "周守護" : "Week Guardian";
|
||||
if (TextUtils.isEmpty(map.getString("ancherName")) || TextUtils.isEmpty(map.getString("uname")))
|
||||
return;
|
||||
String guardName = WordUtil.isNewZh() ? "星之守護" : "Star Guardian";
|
||||
switch (map.getIntValue("guard_type")) {
|
||||
case 1:
|
||||
guardName = WordUtil.isNewZh() ? "周守護" : "Week Guardian";
|
||||
guardName = WordUtil.isNewZh() ? "星之守護" : "Star Guardian";
|
||||
break;
|
||||
case 2:
|
||||
guardName = WordUtil.isNewZh() ? "月守護" : "Month Guardian";
|
||||
guardName = WordUtil.isNewZh() ? "王之守護" : "King Guardian";
|
||||
break;
|
||||
case 3:
|
||||
guardName = WordUtil.isNewZh() ? "年守護" : "Year Guardian";
|
||||
guardName = WordUtil.isNewZh() ? "神之守護" : "God Guardian";
|
||||
break;
|
||||
}
|
||||
String content = WordUtil.isNewZh() ? "%s在%s的直播間開通了%s" : "%s has been opened in %s live broadcast room %s";
|
||||
@ -845,7 +852,7 @@ public class SocketRyClient {
|
||||
|
||||
private void buyGuardByNotify(JSONObject map) {
|
||||
if (mLiveUid.equals(map.getString("liveuid"))) {
|
||||
buyGuardInSameRoom(map);
|
||||
// buyGuardInSameRoom(map);
|
||||
//同一直播间,玩家自己开通,也能看到全服通知
|
||||
String userId = CommonAppConfig.getInstance().getUid();
|
||||
String uid = map.getString("uid");
|
||||
|
@ -32,9 +32,9 @@ import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.target.CustomTarget;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.AiAutomaticSpeechModel;
|
||||
import com.yunbao.common.bean.MsgModel;
|
||||
import com.yunbao.common.bean.NewGuardLevelModel;
|
||||
import com.yunbao.common.bean.NewLevelModel;
|
||||
import com.yunbao.common.custom.VerticalImageSpan;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
@ -262,95 +262,170 @@ public class LiveTextRender {
|
||||
|
||||
}
|
||||
|
||||
public interface CreatePrefixCallback {
|
||||
void onPrefixCallback(SpannableStringBuilder builder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成前缀
|
||||
*/
|
||||
private SpannableStringBuilder createPrefix(Drawable levelDrawable, LiveChatBean bean) {
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||
int index = 0;
|
||||
private void createPrefix(Drawable levelDrawable, LiveChatBean bean, CreatePrefixCallback createPrefixCallback) {
|
||||
|
||||
if (levelDrawable != null) {
|
||||
builder.append(" ");
|
||||
levelDrawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(levelDrawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
|
||||
if (gzDrawablesMap.containsKey(bean)) {//贵族
|
||||
builder.append(" ");
|
||||
gzDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(35), DpUtil.dp2px(20));
|
||||
builder.setSpan(new VerticalImageSpan(gzDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
// if (bean.getGuardType() != Constants.GUARD_TYPE_NONE) {//守护图标
|
||||
// Drawable drawable;
|
||||
// if (bean.getGuardType() == Constants.GUARD_TYPE_MONTH) {
|
||||
// drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_guard_type_1);
|
||||
// } else if (bean.getGuardType() == Constants.GUARD_TYPE_YEAR) {
|
||||
// drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_guard_type_2);
|
||||
// } else {
|
||||
// drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_guard_type_0);
|
||||
// }
|
||||
getGuardImage(CommonAppContext.sInstance, bean.getGuardType(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||
int index = 0;
|
||||
|
||||
if (ryxzDrawablesMap.containsKey(bean)) {//荣誉勋章
|
||||
builder.append(" ");
|
||||
ryxzDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(18), DpUtil.dp2px(18));
|
||||
builder.setSpan(new VerticalImageSpan(ryxzDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
if (levelDrawable != null) {
|
||||
builder.append(" ");
|
||||
levelDrawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(levelDrawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
|
||||
if (nhDrawablesMap.containsKey(bean)) {//靓号
|
||||
builder.append(" ");
|
||||
nhDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(nhDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
if (gzDrawablesMap.containsKey(bean)) {//贵族
|
||||
builder.append(" ");
|
||||
gzDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(35), DpUtil.dp2px(20));
|
||||
builder.setSpan(new VerticalImageSpan(gzDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
|
||||
if (bean.getGuardType() != Constants.GUARD_TYPE_NONE) {//守护图标
|
||||
Drawable drawable;
|
||||
if (bean.getGuardType() == Constants.GUARD_TYPE_MONTH) {
|
||||
drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_guard_type_1);
|
||||
} else if (bean.getGuardType() == Constants.GUARD_TYPE_YEAR) {
|
||||
drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_guard_type_2);
|
||||
} else {
|
||||
drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_guard_type_0);
|
||||
if (ryxzDrawablesMap.containsKey(bean)) {//荣誉勋章
|
||||
builder.append(" ");
|
||||
ryxzDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(18), DpUtil.dp2px(18));
|
||||
builder.setSpan(new VerticalImageSpan(ryxzDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
|
||||
if (nhDrawablesMap.containsKey(bean)) {//靓号
|
||||
builder.append(" ");
|
||||
nhDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(nhDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
if (drawable != null) {
|
||||
builder.append(" ");
|
||||
drawable.setBounds(0, 0, DpUtil.dp2px(34), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
//在这里添加粉丝徽章的图片
|
||||
if (!TextUtils.isEmpty(bean.getMedalNmae()) && !TextUtils.isEmpty(bean.getMedalLevelImageUrl())
|
||||
&& !bean.getMedalNmae().equals("null") && !bean.getMedalNmae().equals("(null)") && !bean.getMedalNmae().equals("<null>")) {//粉丝徽章图标
|
||||
Drawable drawable2 = getMedalImage(bean);
|
||||
if (drawable2 != null) {
|
||||
builder.append(" ");
|
||||
drawable2.setBounds(0, 0, DpUtil.dp2px(44), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(drawable2), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (bean.isManager()) {//直播间管理员图标
|
||||
Drawable drawable3 = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_live_chat_m);
|
||||
if (drawable3 != null) {
|
||||
builder.append(" ");
|
||||
drawable3.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(14));
|
||||
builder.setSpan(new VerticalImageSpan(drawable3), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(bean.getLiangName())) {//靓号图标
|
||||
Drawable drawable4 = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_live_chat_liang);
|
||||
if (drawable4 != null) {
|
||||
builder.append(" ");
|
||||
drawable4.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(14));
|
||||
builder.setSpan(new VerticalImageSpan(drawable4), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
// new add
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
createPrefixCallback.onPrefixCallback(builder);
|
||||
}
|
||||
|
||||
if (drawable != null) {
|
||||
builder.append(" ");
|
||||
drawable.setBounds(0, 0, DpUtil.dp2px(18), DpUtil.dp2px(16));
|
||||
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||
int index = 0;
|
||||
|
||||
if (levelDrawable != null) {
|
||||
builder.append(" ");
|
||||
levelDrawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(levelDrawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
|
||||
if (gzDrawablesMap.containsKey(bean)) {//贵族
|
||||
builder.append(" ");
|
||||
gzDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(35), DpUtil.dp2px(20));
|
||||
builder.setSpan(new VerticalImageSpan(gzDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
|
||||
if (ryxzDrawablesMap.containsKey(bean)) {//荣誉勋章
|
||||
builder.append(" ");
|
||||
ryxzDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(18), DpUtil.dp2px(18));
|
||||
builder.setSpan(new VerticalImageSpan(ryxzDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
|
||||
if (nhDrawablesMap.containsKey(bean)) {//靓号
|
||||
builder.append(" ");
|
||||
nhDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(nhDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
//在这里添加粉丝徽章的图片
|
||||
if (!TextUtils.isEmpty(bean.getMedalNmae()) && !TextUtils.isEmpty(bean.getMedalLevelImageUrl())
|
||||
&& !bean.getMedalNmae().equals("null") && !bean.getMedalNmae().equals("(null)") && !bean.getMedalNmae().equals("<null>")) {//粉丝徽章图标
|
||||
Drawable drawable = getMedalImage(bean);
|
||||
if (drawable != null) {
|
||||
builder.append(" ");
|
||||
drawable.setBounds(0, 0, DpUtil.dp2px(44), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (bean.isManager()) {//直播间管理员图标
|
||||
Drawable drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_live_chat_m);
|
||||
if (drawable != null) {
|
||||
builder.append(" ");
|
||||
drawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(14));
|
||||
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(bean.getLiangName())) {//靓号图标
|
||||
Drawable drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_live_chat_liang);
|
||||
if (drawable != null) {
|
||||
builder.append(" ");
|
||||
drawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(14));
|
||||
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
// new add
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
createPrefixCallback.onPrefixCallback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
//在这里添加粉丝徽章的图片
|
||||
if (!TextUtils.isEmpty(bean.getMedalNmae()) && !TextUtils.isEmpty(bean.getMedalLevelImageUrl())
|
||||
&& !bean.getMedalNmae().equals("null") && !bean.getMedalNmae().equals("(null)") && !bean.getMedalNmae().equals("<null>")) {//粉丝徽章图标
|
||||
Drawable drawable = getMedalImage(bean);
|
||||
if (drawable != null) {
|
||||
builder.append(" ");
|
||||
drawable.setBounds(0, 0, DpUtil.dp2px(44), DpUtil.dp2px(17));
|
||||
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if (bean.isManager()) {//直播间管理员图标
|
||||
Drawable drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_live_chat_m);
|
||||
if (drawable != null) {
|
||||
builder.append(" ");
|
||||
drawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(14));
|
||||
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(bean.getLiangName())) {//靓号图标
|
||||
Drawable drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_live_chat_liang);
|
||||
if (drawable != null) {
|
||||
builder.append(" ");
|
||||
drawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(14));
|
||||
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
// new add
|
||||
index = builder.length();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
private Drawable getMedalImage(final LiveChatBean bean) {
|
||||
@ -439,6 +514,36 @@ public class LiveTextRender {
|
||||
});
|
||||
}
|
||||
|
||||
public void getGuardImage(Context mContext, int guardType, ImgLoader.DrawableCallback callback) {
|
||||
if (guardType==0){
|
||||
callback.onLoadFailed();
|
||||
}else {
|
||||
if (mContext instanceof Activity) {
|
||||
if (((Activity) mContext).isDestroyed()) {
|
||||
mContext = CommonAppContext.getTopActivity();
|
||||
}
|
||||
}
|
||||
List<NewGuardLevelModel> models = new NewLevelManager(mContext).getGuardLevel();
|
||||
String imgUrl = WordUtil.isNewZh() ? "https://downs.yaoulive.com/%E6%98%9F%E4%B9%8B%E5%AE%88%E6%8A%A4%E9%93%AD%E7%89%8C.png" : "https://downs.yaoulive.com/%E6%98%9F%E5%AE%88%E9%8A%98%E7%89%8C-2.png";
|
||||
for (NewGuardLevelModel newGuardLevelModel : models) {
|
||||
if (newGuardLevelModel.getGuardType() == guardType) {
|
||||
imgUrl = WordUtil.isNewZh() ? newGuardLevelModel.getCn() : newGuardLevelModel.getEn();
|
||||
}
|
||||
}
|
||||
ImgLoader.displayDrawable(mContext, imgUrl, new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
callback.onLoadSuccess(drawable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
callback.onLoadFailed();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 等级设置
|
||||
@ -576,42 +681,53 @@ public class LiveTextRender {
|
||||
getLiveLevelImage(context, bean.getLevel(), false, new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
SpannableStringBuilder builder = createPrefix(drawable, bean);
|
||||
int color = Color.parseColor("#68F1F4");
|
||||
if (bean.isAnchor()) {
|
||||
color = Color.parseColor("#FBEABF");
|
||||
} else {
|
||||
color = Color.parseColor("#68F1F4");
|
||||
}
|
||||
switch (bean.getType()) {
|
||||
case LiveChatBean.GIFT:
|
||||
builder = renderGift(color, builder, bean);
|
||||
break;
|
||||
default:
|
||||
builder = renderChat(color, builder, bean);
|
||||
break;
|
||||
}
|
||||
textView.setText(builder);
|
||||
|
||||
createPrefix(drawable, bean, new CreatePrefixCallback() {
|
||||
@Override
|
||||
public void onPrefixCallback(SpannableStringBuilder builder) {
|
||||
int color = Color.parseColor("#68F1F4");
|
||||
if (bean.isAnchor()) {
|
||||
color = Color.parseColor("#FBEABF");
|
||||
} else {
|
||||
color = Color.parseColor("#68F1F4");
|
||||
}
|
||||
switch (bean.getType()) {
|
||||
case LiveChatBean.GIFT:
|
||||
builder = renderGift(color, builder, bean);
|
||||
break;
|
||||
default:
|
||||
builder = renderChat(color, builder, bean);
|
||||
break;
|
||||
}
|
||||
textView.setText(builder);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
SpannableStringBuilder builder = createPrefix(null, bean);
|
||||
int color = 0;
|
||||
if (bean.isAnchor()) {
|
||||
color = 0xffffdd00;
|
||||
} else {
|
||||
color = Color.parseColor("#68F1F4");
|
||||
}
|
||||
switch (bean.getType()) {
|
||||
case LiveChatBean.GIFT:
|
||||
builder = renderGift(color, builder, bean);
|
||||
break;
|
||||
default:
|
||||
builder = renderChat(color, builder, bean);
|
||||
break;
|
||||
}
|
||||
textView.setText(builder);
|
||||
createPrefix(null, bean, new CreatePrefixCallback() {
|
||||
@Override
|
||||
public void onPrefixCallback(SpannableStringBuilder builder) {
|
||||
int color = 0;
|
||||
if (bean.isAnchor()) {
|
||||
color = 0xffffdd00;
|
||||
} else {
|
||||
color = Color.parseColor("#68F1F4");
|
||||
}
|
||||
switch (bean.getType()) {
|
||||
case LiveChatBean.GIFT:
|
||||
builder = renderGift(color, builder, bean);
|
||||
break;
|
||||
default:
|
||||
builder = renderChat(color, builder, bean);
|
||||
break;
|
||||
}
|
||||
textView.setText(builder);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@ -771,23 +887,33 @@ public class LiveTextRender {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
if (textView != null) {
|
||||
SpannableStringBuilder builder = createPrefix(drawable, bean);
|
||||
int start = builder.length();
|
||||
String name = bean.getUserNiceName() + " ";
|
||||
builder.append(name);
|
||||
builder.append(bean.getContent());
|
||||
textView.setText(builder);
|
||||
createPrefix(drawable, bean, new CreatePrefixCallback() {
|
||||
@Override
|
||||
public void onPrefixCallback(SpannableStringBuilder builder) {
|
||||
int start = builder.length();
|
||||
String name = bean.getUserNiceName() + " ";
|
||||
builder.append(name);
|
||||
builder.append(bean.getContent());
|
||||
textView.setText(builder);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
if (textView != null) {
|
||||
SpannableStringBuilder builder = createPrefix(null, bean);
|
||||
int start = builder.length();
|
||||
String name = bean.getUserNiceName() + " ";
|
||||
builder.append(name);
|
||||
textView.setText(builder);
|
||||
createPrefix(null, bean, new CreatePrefixCallback() {
|
||||
@Override
|
||||
public void onPrefixCallback(SpannableStringBuilder builder) {
|
||||
int start = builder.length();
|
||||
String name = bean.getUserNiceName() + " ";
|
||||
builder.append(name);
|
||||
textView.setText(builder);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,9 @@ import static com.yunbao.live.event.LiveAudienceEvent.LiveAudienceType.WISH_LIST
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
@ -886,16 +889,43 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
* 点击开始直播按钮
|
||||
*/
|
||||
private void startLiveInit() {
|
||||
boolean startPreview = ((LiveRyAnchorActivity) mContext).isStartPreview();
|
||||
if (isWifiProxy(mContext) || checkVPN((ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE))) {
|
||||
ToastUtil.show(WordUtil.isNewZh()?"檢測開啓了VPN或者代理,請先關閉VPN或者代理再開播。":
|
||||
"It is detected that VPN or proxy is turned on. Please turn off VPN or proxy before starting the broadcast.");
|
||||
} else {
|
||||
boolean startPreview = ((LiveRyAnchorActivity) mContext).isStartPreview();
|
||||
// if (!startPreview) {
|
||||
// ToastUtil.show(R.string.please_wait);
|
||||
// return;
|
||||
// }
|
||||
if (mLiveClassID == 0) {
|
||||
ToastUtil.show(WordUtil.getNewString(R.string.live_choose_live_class));
|
||||
return;
|
||||
if (mLiveClassID == 0) {
|
||||
ToastUtil.show(WordUtil.getNewString(R.string.live_choose_live_class));
|
||||
return;
|
||||
}
|
||||
createRoom();
|
||||
}
|
||||
createRoom();
|
||||
}
|
||||
|
||||
private boolean isWifiProxy(Context context) {
|
||||
final boolean IS_ICS_OR_LATER = Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH;
|
||||
String proxyAddress;
|
||||
int proxyPort;
|
||||
if (IS_ICS_OR_LATER) {
|
||||
proxyAddress = System.getProperty("http.proxyHost");
|
||||
String portStr = System.getProperty("http.proxyPort");
|
||||
proxyPort = Integer.parseInt((portStr != null ? portStr : "-1"));
|
||||
} else {
|
||||
proxyAddress = android.net.Proxy.getHost(context);
|
||||
proxyPort = android.net.Proxy.getPort(context);
|
||||
}
|
||||
return (!TextUtils.isEmpty(proxyAddress)) && (proxyPort != -1);
|
||||
}
|
||||
|
||||
private boolean checkVPN(ConnectivityManager connMgr) {
|
||||
//don't know why always returns null:
|
||||
NetworkInfo networkInfo = connMgr.getNetworkInfo(ConnectivityManager.TYPE_VPN);
|
||||
boolean isVpnConn = networkInfo == null ? false : networkInfo.isConnected();
|
||||
return isVpnConn;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -99,6 +99,7 @@ import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.bean.WishModel;
|
||||
import com.yunbao.common.bean.XydCompleteModel;
|
||||
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||
import com.yunbao.common.event.AllServerNotifyFFGGGDJANEvent;
|
||||
import com.yunbao.common.event.AnchorInfoEvent;
|
||||
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
||||
import com.yunbao.common.event.LiveRoomChangeEvent;
|
||||
@ -393,6 +394,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
private LinearLayout combo_layout;
|
||||
private TextView combo_number;
|
||||
private View quick_gift_reminder;
|
||||
private int guardType = 0;
|
||||
|
||||
public LiveRoomViewHolder setGuardType(int guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onUpdata(String str) {
|
||||
@ -622,11 +629,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
|
||||
public void guardSpecialEffect(LiveReceiveGiftBean liveReceiveGiftBean) {
|
||||
LiveChatBean chatBean = new LiveChatBean();
|
||||
chatBean.setContent(
|
||||
(WordUtil.isNewZh() ? liveReceiveGiftBean.getMsg() : liveReceiveGiftBean.getMsg_en()));
|
||||
chatBean.setType(LiveChatBean.SYSTEM);
|
||||
mLiveChatAdapter.insertItem(chatBean);
|
||||
// LiveChatBean chatBean = new LiveChatBean();
|
||||
// chatBean.setContent(
|
||||
// (WordUtil.isNewZh() ? liveReceiveGiftBean.getMsg() : liveReceiveGiftBean.getMsg_en()));
|
||||
// chatBean.setType(LiveChatBean.SYSTEM);
|
||||
// mLiveChatAdapter.insertItem(chatBean);
|
||||
Log.e("guardSpecialEffect", "msg" + liveReceiveGiftBean.getMsg() + "msg-en" + liveReceiveGiftBean.getMsg_en() + "guard_type" + liveReceiveGiftBean.getGuard_type());
|
||||
if (mLiveGiftAnimPresenter == null) {
|
||||
mLiveGiftAnimPresenter = new LiveGiftAnimPresenter(mContext, mContentView, mGifImageView, mSVGAImageView, mLiveGiftPrizePoolContainer, windowManager);
|
||||
@ -1679,6 +1686,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||
} if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
dragonImmediateParticipationTime.setLayoutParams(layoutParams);
|
||||
}
|
||||
anchorTimeHandler.removeCallbacks(anchorTimeRunnable);
|
||||
LiveNetManager.get(mContext).
|
||||
@ -1711,6 +1722,20 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
layoutParams.topMargin = DpUtil.dp2px(190);
|
||||
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||
}
|
||||
if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE&&mContext instanceof LiveRyAnchorActivity) {
|
||||
RelativeLayout.LayoutParams layoutParamsredPacket = (RelativeLayout.LayoutParams) redPacket.getLayoutParams();
|
||||
layoutParamsredPacket.topMargin = DpUtil.dp2px(110);
|
||||
redPacket.setLayoutParams(layoutParamsredPacket);
|
||||
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipationTime.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(190);
|
||||
dragonImmediateParticipationTime.setLayoutParams(layoutParams);
|
||||
}
|
||||
if (dragonImmediateParticipationTime.getVisibility() == View.GONE&&mContext instanceof LiveRyAnchorActivity){
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) redPacket.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
redPacket.setLayoutParams(layoutParams);
|
||||
}
|
||||
if (redPacketModel.getCountdown() > 180) {
|
||||
redPacketQueue.setVisibility(View.GONE);
|
||||
redPacketCountdown.setVisibility(View.VISIBLE);
|
||||
@ -1787,6 +1812,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||
}
|
||||
if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipationTime.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
dragonImmediateParticipationTime.setLayoutParams(layoutParams);
|
||||
}
|
||||
}
|
||||
|
||||
public void setRedPacketInfoModel(RedPacketInfoModel redPacket) {
|
||||
@ -3189,16 +3219,25 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
sendMoneyTime = Long.parseLong(sendMoneyLongModel.getCountdown());
|
||||
participation_time.removeCallbacks(sendMoneyRunnable);
|
||||
dragonImmediateParticipationTime.setVisibility(View.VISIBLE);
|
||||
if (redPacket.getVisibility() == View.VISIBLE) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(190);
|
||||
dragonImmediateParticipationTime.setLayoutParams(layoutParams);
|
||||
} else {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
dragonImmediateParticipationTime.setLayoutParams(layoutParams);
|
||||
}
|
||||
String s1 = StringUtil.getDurationText(sendMoneyTime * 1000);
|
||||
participation_time.setText(s1);
|
||||
participation_time.post(sendMoneyRunnable);
|
||||
} else {
|
||||
dragonImmediateParticipation.setVisibility(View.VISIBLE);
|
||||
if (redPacket.getVisibility()==View.VISIBLE){
|
||||
if (redPacket.getVisibility() == View.VISIBLE) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(190);
|
||||
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||
}else {
|
||||
} else {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||
@ -3210,6 +3249,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
public void onSendMoneyLongEndEvent(SendMoneyLongEndEvent moneyLongEndEvent) {
|
||||
if (mLiveUid.contains(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()))) {
|
||||
dragonImmediateParticipationTime.setVisibility(View.GONE);
|
||||
if (redPacket.getVisibility() == View.VISIBLE) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(190);
|
||||
dragonImmediateParticipationTime.setLayoutParams(layoutParams);
|
||||
} else {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
dragonImmediateParticipationTime.setLayoutParams(layoutParams);
|
||||
}
|
||||
} else {
|
||||
dragonImmediateParticipation.setVisibility(View.GONE);
|
||||
|
||||
@ -3246,11 +3294,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
public void onSendMoneyLong() {
|
||||
dragonImmediateParticipation.setVisibility(View.VISIBLE);
|
||||
if (redPacket.getVisibility()==View.VISIBLE){
|
||||
if (redPacket.getVisibility() == View.VISIBLE) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(190);
|
||||
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||
}else {
|
||||
} else {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||
@ -3965,6 +4013,14 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
}
|
||||
|
||||
public void showAllServerNotifyFFGGGD(AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent,boolean showB) {
|
||||
if (mLiveGiftAnimPresenter == null) {
|
||||
mLiveGiftAnimPresenter = new LiveGiftAnimPresenter(mContext, mContentView, mGifImageView, mSVGAImageView, mLiveGiftPrizePoolContainer, windowManager);
|
||||
}
|
||||
mLiveGiftAnimPresenter.setLiveUidStream(mLiveUid, mStream);
|
||||
mLiveGiftAnimPresenter.showAllServerNotifyFFGGGD(notifyFFGGGDJANEvent,showB);
|
||||
}
|
||||
|
||||
//全服通知 购买坐骑
|
||||
public void showBuyZuojiMessage(LiveReceiveGiftBean bean) {
|
||||
if (mLiveGiftAnimPresenter == null) {
|
||||
|
@ -128,6 +128,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
btn_start_dr_pk.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (pk_nub <= 0) return;
|
||||
//開始多人PK
|
||||
HttpClient.getInstance().post("live.startDRPK", "live.startDRPK")
|
||||
.params("roomid", CommonAppConfig.getInstance().getUid())
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.yunbao.live.views;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
@ -52,7 +53,35 @@ public class NewGuardViewHolder extends RecyclerView.ViewHolder {
|
||||
user_nicename.setText(guardUserModel.getUserNicename());
|
||||
userSex.setImageResource(CommonIconUtil.getSexIcon(guardUserModel.getSex()));
|
||||
guardLevel.setText(String.valueOf(guardUserModel.getGuardLevel()));
|
||||
ImgLoader.display(itemView.getContext(), guardUserModel.getGuardImg(), tagKing);
|
||||
|
||||
contribution.setText(guardUserModel.getContribute());
|
||||
|
||||
if (TextUtils.equals(guardUserModel.getGuardLevelCard(), "0")) {
|
||||
switch (guardUserModel.getGuardType()) {
|
||||
case 1:
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.tag_start_hui, tagKing);
|
||||
break;
|
||||
case 2:
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.tag_king_hui, tagKing);
|
||||
break;
|
||||
case 3:
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.tag_god_hui, tagKing);
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
switch (guardUserModel.getGuardType()) {
|
||||
case 1:
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.tag_start, tagKing);
|
||||
break;
|
||||
case 2:
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.tag_king, tagKing);
|
||||
break;
|
||||
case 3:
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.tag_god, tagKing);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ import com.yunbao.common.bean.WishModel;
|
||||
import com.yunbao.common.bean.XydCompleteModel;
|
||||
import com.yunbao.common.custom.MyViewPager;
|
||||
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||
import com.yunbao.common.event.AllServerNotifyFFGGGDJANEvent;
|
||||
import com.yunbao.common.event.FollowEvent;
|
||||
import com.yunbao.common.event.HideShowEvent;
|
||||
import com.yunbao.common.event.LiveFloatEvent;
|
||||
@ -696,6 +697,17 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
|
||||
upDataPkScore(pkInfo.getJSONArray("userlist"), pkInfo.getIntValue("drpk_time"));
|
||||
}
|
||||
if (data.getEnterRoomInfo().getGuard() != null) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
if (TextUtils.isEmpty(data.getEnterRoomInfo().getGuard().getGuardType())) {
|
||||
IMLoginManager.get(mContext).setGuardType(0);
|
||||
} else {
|
||||
int guardType = Integer.parseInt(data.getEnterRoomInfo().getGuard().getGuardType());
|
||||
IMLoginManager.get(mContext).setGuardType(guardType);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
// mLivePlayViewHolder.setLayoutInterface(new LivePlayRyViewHolder.PlayViewLayoutInterface() {
|
||||
// @Override
|
||||
// public void playViewLayout(int width, int height) {
|
||||
@ -1298,6 +1310,12 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
}
|
||||
}
|
||||
|
||||
public void showAllServerNotifyFFGGGD(AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.showAllServerNotifyFFGGGD(notifyFFGGGDJANEvent,true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBuyZuoji(LiveReceiveGiftBean bean) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
@ -2228,8 +2246,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
mLiveRoomViewHolder.onSendMoneyLongEndEvent(moneyLongEndEvent);
|
||||
}
|
||||
}
|
||||
public void onGuardRed(){
|
||||
if (mLiveAudienceViewHolder!=null){
|
||||
|
||||
public void onGuardRed() {
|
||||
if (mLiveAudienceViewHolder != null) {
|
||||
mLiveAudienceViewHolder.onGuardRed();
|
||||
}
|
||||
}
|
||||
|
@ -75,6 +75,7 @@
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tas_guardian_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
|
@ -9,7 +9,7 @@
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitCenter"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/dialog_live_buy_guard_bg" />
|
||||
|
||||
<LinearLayout
|
||||
|
@ -11,20 +11,21 @@
|
||||
android:layout_marginBottom="71dp"
|
||||
android:background="@drawable/background_live_guard">
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="50dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/dsadada"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_nickname"
|
||||
@ -49,9 +50,9 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tag_king"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/icon_tag_king" />
|
||||
|
||||
<TextView
|
||||
@ -70,12 +71,14 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/week_contribution"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/dsadada"
|
||||
android:text="本周貢獻值"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/guardian_task"
|
||||
@ -208,9 +211,9 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="center"
|
||||
android:gravity="start"
|
||||
android:text="@string/guardian_for_your_favorite_anchor"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
@ -220,10 +223,10 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="center"
|
||||
android:gravity="start"
|
||||
android:text="@string/guardian_for_your_favorite_anchor"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp" />
|
||||
|
@ -113,7 +113,7 @@
|
||||
android:id="@+id/guardian_privilege"
|
||||
android:layout_width="220dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:gravity="center"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
|
@ -1180,8 +1180,8 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:paddingStart="100dp"
|
||||
android:paddingEnd="6dp"
|
||||
@ -1197,9 +1197,9 @@
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@mipmap/btn_king_guard_onlookers"
|
||||
android:clickable="true"
|
||||
android:gravity="center"
|
||||
android:text="@string/onlookers"
|
||||
android:clickable="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
@ -1207,6 +1207,76 @@
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/full_service_notice_new"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="51dp"
|
||||
android:translationX="500dp"
|
||||
android:visibility="invisible">
|
||||
<ImageView
|
||||
android:id="@+id/full_service_notice_new_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="13dp"
|
||||
android:layout_marginEnd="7dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/background_full_service_notice_new" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="9dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginRight="9dp"
|
||||
android:gravity="center|left"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<com.yunbao.common.views.weight.MarqueeTextView
|
||||
android:id="@+id/full_service_notice_new_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="67dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_weight="1"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:text="字文文字文字文字文字fdsfsdfdsfdsfsdfdsfsdf文字文字"
|
||||
android:textColor="#fff"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/iv_look_full_service_notice_new3"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_look_full_service_notice_new2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/iv_look_full_service_notice_new"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clickable="true"
|
||||
android:gravity="center"
|
||||
android:textSize="12sp" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/gif_gift_tip_group_buy_zuoji"
|
||||
android:layout_width="wrap_content"
|
||||
|
After Width: | Height: | Size: 144 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/tag_god.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/tag_god_hui.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/tag_king.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/tag_king_hui.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/tag_start.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/tag_start_hui.png
Normal file
After Width: | Height: | Size: 7.3 KiB |
@ -40,7 +40,9 @@ import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.SVGAViewUtils;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.share.ui.InvitePopDialog;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@ -72,7 +74,14 @@ public class CustomerServiceWebViewActivity extends AbsActivity {
|
||||
super.main();
|
||||
Bus.getOn(this);
|
||||
String url = getIntent().getStringExtra(Constants.URL);
|
||||
L.e("H5-------->" + url);
|
||||
if (StringUtil.isEmpty(url)) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
if (!url.contains("isZh")) {
|
||||
url += "&isZh=" + (WordUtil.isNewZh() ? 1 : 0);
|
||||
}
|
||||
L.e("客服H5-------->" + url);
|
||||
mProgressBar = (ProgressBar) findViewById(R.id.progressbar);
|
||||
rootView = findViewById(R.id.webView_root);
|
||||
mWebView = findViewById(R.id.webView);
|
||||
@ -82,7 +91,7 @@ public class CustomerServiceWebViewActivity extends AbsActivity {
|
||||
params.bottomMargin = getNavigationBarHeight(mContext);
|
||||
}*/
|
||||
//mWebView.setLayoutParams(params);
|
||||
// mWebView.setOverScrollMode(View.OVER_SCROLL_IF_CONTENT_SCROLLS);
|
||||
// mWebView.setOverScrollMode(View.OVER_SCROLL_IF_CONTENT_SCROLLS);
|
||||
mWebView.setWebViewClient(new WebViewClient() {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
@ -233,7 +242,7 @@ public class CustomerServiceWebViewActivity extends AbsActivity {
|
||||
}
|
||||
|
||||
protected boolean canGoBack() {
|
||||
if (!isKefu(mWebView.getUrl()==null?"":mWebView.getUrl())) {
|
||||
if (!isKefu(mWebView.getUrl() == null ? "" : mWebView.getUrl())) {
|
||||
mWebView.loadUrl("javascript:userBackShowPraise()");
|
||||
return false;
|
||||
}
|
||||
@ -244,7 +253,7 @@ public class CustomerServiceWebViewActivity extends AbsActivity {
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (!isKefu(mWebView.getUrl()==null?"":mWebView.getUrl())) {
|
||||
if (!isKefu(mWebView.getUrl() == null ? "" : mWebView.getUrl())) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
@ -13,6 +13,8 @@ import android.app.PendingIntent;
|
||||
import android.content.ClipData;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
@ -795,15 +797,19 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
}
|
||||
|
||||
private void showStartDialog() {
|
||||
if (isReady == true) {
|
||||
MainStartDialogFragment dialogFragment = new MainStartDialogFragment();
|
||||
dialogFragment.setMainStartChooseCallback(true, this);
|
||||
dialogFragment.show(getSupportFragmentManager(), "MainStartDialogFragment");
|
||||
} else {
|
||||
ToastUtil.show("正在初始化,請稍等....");
|
||||
}
|
||||
|
||||
if (isReady == true) {
|
||||
MainStartDialogFragment dialogFragment = new MainStartDialogFragment();
|
||||
dialogFragment.setMainStartChooseCallback(true, this);
|
||||
dialogFragment.show(getSupportFragmentManager(), "MainStartDialogFragment");
|
||||
} else {
|
||||
ToastUtil.show("正在初始化,請稍等....");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 检查版本更新
|
||||
*/
|
||||
|
@ -9,6 +9,7 @@ import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.lzf.easyfloat.EasyFloat;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.bean.AnchorStartLiveBean;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
@ -54,6 +55,7 @@ public class MainHomeCommunityActivity extends AbsActivity {
|
||||
}
|
||||
APPEasyFloat.getInstance().dismiss(mContext);
|
||||
|
||||
MobclickAgent.onEvent(mContext, "short_drama_entrance", "短剧");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -7,11 +7,13 @@ import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.main.utils.MainIconUtil;
|
||||
@ -64,6 +66,7 @@ public class MainHomeFollowAdapter extends RefreshAdapter<LiveBean> {
|
||||
TextView mTitle;
|
||||
TextView mNum;
|
||||
ImageView mType;
|
||||
private View redPacket, dragon_money;
|
||||
|
||||
public Vh(View itemView) {
|
||||
super(itemView);
|
||||
@ -73,6 +76,8 @@ public class MainHomeFollowAdapter extends RefreshAdapter<LiveBean> {
|
||||
mTitle = (TextView) itemView.findViewById(R.id.title);
|
||||
mNum = (TextView) itemView.findViewById(R.id.num);
|
||||
mType = (ImageView) itemView.findViewById(R.id.type);
|
||||
redPacket = itemView.findViewById(R.id.red_packet);
|
||||
dragon_money = itemView.findViewById(R.id.dragon_money);
|
||||
itemView.setOnClickListener(mOnClickListener);
|
||||
}
|
||||
|
||||
@ -101,6 +106,21 @@ public class MainHomeFollowAdapter extends RefreshAdapter<LiveBean> {
|
||||
mType.setImageResource(MainIconUtil.getLiveTypeIcon(Constants.LIVE_TYPE_RESTING));
|
||||
}
|
||||
// mType.setImageResource(MainIconUtil.getLiveTypeIcon(bean.getType()));
|
||||
RelativeLayout.LayoutParams dragon_moneyLayoutParams = (RelativeLayout.LayoutParams) dragon_money.getLayoutParams();
|
||||
if (bean.getRedPacketStatus() == 1) {
|
||||
dragon_moneyLayoutParams.topMargin = DpUtil.dp2px(55);
|
||||
redPacket.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
dragon_moneyLayoutParams.topMargin = DpUtil.dp2px(25);
|
||||
redPacket.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
if (bean.getSendMoneyLongStatus() == 1) {
|
||||
dragon_money.setLayoutParams(dragon_moneyLayoutParams);
|
||||
dragon_money.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
dragon_money.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@ -19,6 +20,7 @@ import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.formatBigNum;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.utils.MainIconUtil;
|
||||
@ -79,11 +81,12 @@ public class MainHomeRemFollLiveAdapter extends RefreshAdapter<LiveBean> {
|
||||
ImageView dr_pk_ico;
|
||||
View views;
|
||||
ImageView bgs;
|
||||
private View redPacket;
|
||||
private View redPacket, dragon_money;
|
||||
|
||||
public Vh(View itemView) {
|
||||
super(itemView);
|
||||
redPacket = itemView.findViewById(R.id.red_packet);
|
||||
dragon_money = itemView.findViewById(R.id.dragon_money);
|
||||
live_info_view = (LinearLayout) itemView.findViewById(R.id.live_info_view);
|
||||
mCover = (ImageView) itemView.findViewById(R.id.cover);
|
||||
mName = (TextView) itemView.findViewById(R.id.name);
|
||||
@ -222,10 +225,20 @@ public class MainHomeRemFollLiveAdapter extends RefreshAdapter<LiveBean> {
|
||||
if (bean.getIs_week() != null && bean.getIs_week().equals("1")) {
|
||||
views.setVisibility(View.GONE);
|
||||
}
|
||||
RelativeLayout.LayoutParams dragon_moneyLayoutParams = (RelativeLayout.LayoutParams) dragon_money.getLayoutParams();
|
||||
if (bean.getRedPacketStatus() == 1) {
|
||||
dragon_moneyLayoutParams.topMargin = DpUtil.dp2px(55);
|
||||
redPacket.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
dragon_moneyLayoutParams.topMargin = DpUtil.dp2px(25);
|
||||
redPacket.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
if (bean.getSendMoneyLongStatus() == 1) {
|
||||
dragon_money.setLayoutParams(dragon_moneyLayoutParams);
|
||||
dragon_money.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
dragon_money.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,10 +5,14 @@ import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
@ -25,6 +29,7 @@ import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.PluginManager;
|
||||
@ -35,7 +40,6 @@ import com.yunbao.live.LiveConfig;
|
||||
import com.yunbao.live.activity.LiveAnchorActivity;
|
||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||
import com.yunbao.live.bean.LiveKsyConfigBean;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.activity.MyWebViewActivity;
|
||||
import com.yunbao.main.interfaces.MainStartChooseCallback;
|
||||
@ -165,13 +169,13 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O
|
||||
if (isAnchor) {
|
||||
String[] permissions;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
permissions=new String[]{
|
||||
permissions = new String[]{
|
||||
Manifest.permission.READ_MEDIA_IMAGES,
|
||||
Manifest.permission.CAMERA,
|
||||
Manifest.permission.RECORD_AUDIO
|
||||
};
|
||||
}else{
|
||||
permissions=new String[]{
|
||||
} else {
|
||||
permissions = new String[]{
|
||||
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||
Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||
Manifest.permission.CAMERA,
|
||||
@ -191,13 +195,13 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O
|
||||
if (isAnchor) {
|
||||
String[] permissions;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
permissions=new String[]{
|
||||
permissions = new String[]{
|
||||
Manifest.permission.READ_MEDIA_IMAGES,
|
||||
Manifest.permission.CAMERA,
|
||||
Manifest.permission.RECORD_AUDIO
|
||||
};
|
||||
}else{
|
||||
permissions=new String[]{
|
||||
} else {
|
||||
permissions = new String[]{
|
||||
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||
Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||
Manifest.permission.CAMERA,
|
||||
@ -244,9 +248,9 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O
|
||||
LiveHttpUtil.getLiveSdk(mGetLiveSdkCallback);
|
||||
});
|
||||
} else {
|
||||
String tips="需要下載開播插件,是否下載";
|
||||
if(!WordUtil.isNewZh()){
|
||||
tips="You need to download the plug-in, whether to download";
|
||||
String tips = "需要下載開播插件,是否下載";
|
||||
if (!WordUtil.isNewZh()) {
|
||||
tips = "You need to download the plug-in, whether to download";
|
||||
}
|
||||
DialogUitl.showSimpleDialog(mContext, tips, new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
@ -274,12 +278,12 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O
|
||||
if ("2".equals(mBeautySdkType)) {
|
||||
Constants.myIntoIndex = 2;
|
||||
Intent intent = new Intent(mContext, MyWebViewActivity.class);
|
||||
intent.putExtra(Constants.URL, CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ/release" + "?token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&isRelease=1"+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
|
||||
intent.putExtra(Constants.URL, CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ/release" + "?token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&isRelease=1" + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
|
||||
CommonAppContext.getTopActivity().startActivity(intent);
|
||||
} else {
|
||||
Constants.myIntoIndex = 2;
|
||||
Intent intent = new Intent(mContext, MyWebViewActivity.class);
|
||||
intent.putExtra(Constants.URL, CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ/release" + "?token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&isRelease=1"+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
|
||||
intent.putExtra(Constants.URL, CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ/release" + "?token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&isRelease=1" + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
|
||||
CommonAppContext.getTopActivity().startActivity(intent);
|
||||
}
|
||||
}
|
||||
@ -294,9 +298,14 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O
|
||||
int i = v.getId();
|
||||
if (i == R.id.btn_close) {
|
||||
} else if (i == R.id.btn_live) {
|
||||
if (mCallback != null) {
|
||||
MobclickAgent.onEvent(mContext, "home_page_broadcast", "点击开播按钮");
|
||||
mCallback.onLiveClick();
|
||||
if (isWifiProxy(mContext) || checkVPN((ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE))) {
|
||||
ToastUtil.show(WordUtil.isNewZh()?"檢測開啓了VPN或者代理,請先關閉VPN或者代理再開播。":
|
||||
"It is detected that VPN or proxy is turned on. Please turn off VPN or proxy before starting the broadcast.");
|
||||
} else {
|
||||
if (mCallback != null) {
|
||||
MobclickAgent.onEvent(mContext, "home_page_broadcast", "点击开播按钮");
|
||||
mCallback.onLiveClick();
|
||||
}
|
||||
}
|
||||
} else if (i == R.id.btn_video) {
|
||||
if (mCallback != null) {
|
||||
@ -305,7 +314,27 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O
|
||||
}
|
||||
}
|
||||
}
|
||||
private boolean isWifiProxy(Context context) {
|
||||
final boolean IS_ICS_OR_LATER = Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH;
|
||||
String proxyAddress;
|
||||
int proxyPort;
|
||||
if (IS_ICS_OR_LATER) {
|
||||
proxyAddress = System.getProperty("http.proxyHost");
|
||||
String portStr = System.getProperty("http.proxyPort");
|
||||
proxyPort = Integer.parseInt((portStr != null ? portStr : "-1"));
|
||||
} else {
|
||||
proxyAddress = android.net.Proxy.getHost(context);
|
||||
proxyPort = android.net.Proxy.getPort(context);
|
||||
}
|
||||
return (!TextUtils.isEmpty(proxyAddress)) && (proxyPort != -1);
|
||||
}
|
||||
|
||||
private boolean checkVPN(ConnectivityManager connMgr) {
|
||||
//don't know why always returns null:
|
||||
NetworkInfo networkInfo = connMgr.getNetworkInfo(ConnectivityManager.TYPE_VPN);
|
||||
boolean isVpnConn = networkInfo == null ? false : networkInfo.isConnected();
|
||||
return isVpnConn;
|
||||
}
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
@ -33,6 +33,7 @@ import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.CoolConfig;
|
||||
import com.yunbao.common.bean.NativeCallbackModel;
|
||||
import com.yunbao.common.dialog.CinemaTicketPopupWindow;
|
||||
import com.yunbao.common.dialog.SkitCheckInWasSuccessfulPopup;
|
||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||
import com.yunbao.common.fragment.BaseFragment;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
@ -226,6 +227,17 @@ public class MainHomeCommunityVideoFragment extends BaseFragment {
|
||||
System.out.println("code = " + code + ", msg = " + msg + ", info = " + Arrays.toString(info));
|
||||
if (code == 0) {
|
||||
mWebView.loadUrl(JSONObject.parseObject(info[0]).getString("url"));
|
||||
String sign_ok = JSONObject.parseObject(info[0]).getString("sign_ok");
|
||||
if (TextUtils.equals(sign_ok,"1")){
|
||||
new XPopup.Builder(mContext)
|
||||
.dismissOnTouchOutside(false) // 点击外部是否关闭弹窗,默认为true
|
||||
.asCustom(new SkitCheckInWasSuccessfulPopup(mContext))
|
||||
.show();
|
||||
}
|
||||
// new XPopup.Builder(mContext)
|
||||
// .dismissOnTouchOutside(false) // 点击外部是否关闭弹窗,默认为true
|
||||
// .asCustom(new SkitCheckInWasSuccessfulPopup(mContext))
|
||||
// .show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -51,6 +51,7 @@ public class MainHttpUtil {
|
||||
.params("pushid", "")
|
||||
.params("lastlogindevice", "Android")
|
||||
.params("uuid_Device", uuid)
|
||||
.params("langue", WordUtil.isNewZh()?"chinese":"english")
|
||||
.execute(callback);
|
||||
|
||||
}
|
||||
|
@ -199,7 +199,6 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl
|
||||
public void onClick(View v) {
|
||||
if (viewPager != null) {
|
||||
if (index == 1) {
|
||||
MobclickAgent.onEvent(mContext, "short_drama_entrance", "短剧");
|
||||
RouteUtil.forwardCommunityActivity();
|
||||
} else {
|
||||
viewPager.setCurrentItem(index);
|
||||
|
@ -4,12 +4,17 @@ import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.HorizontalScrollView;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.dialog.SkitCheckInWasSuccessfulPopup;
|
||||
import com.yunbao.common.event.FloatWarOrderEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.live.dialog.LiveBuyGuardDialog;
|
||||
import com.yunbao.live.dialog.LiveGuardDialog;
|
||||
import com.yunbao.main.R;
|
||||
@ -29,6 +34,7 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
private final String mPageName = "home_page";
|
||||
private ImageView img_trophy;
|
||||
private boolean floatWarOrder;
|
||||
private TextView tvPlay;
|
||||
|
||||
public boolean isFloatWarOrder() {
|
||||
return floatWarOrder;
|
||||
@ -54,11 +60,19 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
// img_trophy.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
// @Override
|
||||
// public boolean onLongClick(View view) {
|
||||
//
|
||||
// new XPopup.Builder(mContext)
|
||||
// .asCustom(new SkitCheckInWasSuccessfulPopup(mContext))
|
||||
// .show();
|
||||
// return true;
|
||||
// }
|
||||
// });
|
||||
|
||||
findViewById(R.id.tvPlay).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
MobclickAgent.onEvent(mContext, "home_page_short_drama", "首页短剧按钮");
|
||||
RouteUtil.forwardCommunityActivity();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void setCurPosition(int position) {
|
||||
@ -143,12 +157,7 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
|
||||
@Override
|
||||
protected String[] getTitles() {
|
||||
return new String[]{
|
||||
mContext.getString(R.string.follow),
|
||||
mContext.getString(R.string.hot),
|
||||
mContext.getString(R.string.recomment),
|
||||
mContext.getString(R.string.main_tabs_red_packet),
|
||||
};
|
||||
return new String[]{mContext.getString(R.string.follow), mContext.getString(R.string.hot), mContext.getString(R.string.recomment), mContext.getString(R.string.main_tabs_red_packet),};
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,19 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.yunbao.common.custom.MyRelativeLayout5
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.yunbao.common.custom.MyRelativeLayout5 xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="5dp"
|
||||
>
|
||||
android:layout_marginTop="5dp">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_corner_radius="5dp"
|
||||
/>
|
||||
app:riv_corner_radius="5dp" />
|
||||
|
||||
<com.yunbao.common.custom.RatioRoundImageView
|
||||
android:layout_width="match_parent"
|
||||
@ -22,30 +20,28 @@
|
||||
android:src="@mipmap/bg_main_item_bottom"
|
||||
app:ri_ratio="0.5"
|
||||
app:riv_corner_radius_bottom_left="5dp"
|
||||
app:riv_corner_radius_bottom_right="5dp"
|
||||
/>
|
||||
app:riv_corner_radius_bottom_right="5dp" />
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_oval="true"
|
||||
/>
|
||||
app:riv_oval="true" />
|
||||
|
||||
<com.yunbao.common.custom.DrawableTextView
|
||||
android:id="@+id/num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignTop="@id/avatar"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
@ -53,8 +49,7 @@
|
||||
android:textSize="13sp"
|
||||
app:dt_left_drawable="@mipmap/icon_main_live_num"
|
||||
app:dt_left_height="14dp"
|
||||
app:dt_left_width="14dp"
|
||||
/>
|
||||
app:dt_left_width="14dp" />
|
||||
|
||||
|
||||
<TextView
|
||||
@ -62,15 +57,14 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/avatar"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_toLeftOf="@id/num"
|
||||
android:layout_toRightOf="@id/avatar"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textColor="#fff"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
@ -78,15 +72,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/avatar"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="2"
|
||||
android:textColor="#fff"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/type"
|
||||
@ -94,7 +87,29 @@
|
||||
android:layout_height="16dp"
|
||||
android:layout_above="@id/title"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:scaleType="fitXY"
|
||||
/>
|
||||
android:scaleType="fitXY" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dragon_money"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginTop="55dp"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@mipmap/icon_live_dragon_money"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/red_packet"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@mipmap/icon_red_packet"
|
||||
tools:visibility="visible" />
|
||||
</com.yunbao.common.custom.MyRelativeLayout5>
|
@ -1,10 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white">
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBarLayout"
|
||||
@ -18,52 +19,73 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="37dp"
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_search"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="45dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:contentDescription="TODO"
|
||||
android:onClick="mainClick"
|
||||
android:padding="9dp"
|
||||
android:src="@mipmap/icon_main_search" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_trophy"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:contentDescription="TODO"
|
||||
android:onClick="mainClick"
|
||||
android:padding="6dp" />
|
||||
|
||||
<FrameLayout
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/view_horizontal"
|
||||
android:layout_toStartOf="@id/ijiasdw"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="37dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_toLeftOf="@id/btn_search">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:scrollbars="none">
|
||||
|
||||
|
||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||
android:id="@+id/indicator"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||
android:id="@+id/indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</FrameLayout>
|
||||
<TextView
|
||||
android:id="@+id/tvPlay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="center"
|
||||
android:paddingTop="1dp"
|
||||
android:text="@string/main_type_theater"
|
||||
android:textColor="#B1B1B1"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:textSize="17dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
</HorizontalScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ijiasdw"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_search"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:contentDescription="TODO"
|
||||
android:onClick="mainClick"
|
||||
android:padding="9dp"
|
||||
android:src="@mipmap/icon_main_search" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_trophy"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:contentDescription="TODO"
|
||||
android:onClick="mainClick"
|
||||
android:padding="6dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|