Merge branch 'dev_6.5.3_红包' into 6.5.3
This commit is contained in:
commit
710cddd3a7
@ -17,6 +17,8 @@ public class AnchorRecommendModel extends BaseModel {
|
||||
//是否展示0=不展示1=展示
|
||||
@SerializedName("list_show")
|
||||
private int listShow = 0;
|
||||
@SerializedName("red_packet_show")
|
||||
private int showRedPacket = 0;//是否显示首页红包浮窗
|
||||
//是否支持换一批0=不支持 1=支持
|
||||
@SerializedName("up_show")
|
||||
private int upShow = 0;
|
||||
@ -24,6 +26,10 @@ public class AnchorRecommendModel extends BaseModel {
|
||||
private List<AnchorRecommendItemModel> list = new ArrayList<>();
|
||||
@SerializedName("slide")
|
||||
private List<SlideInfoModel> slide = new ArrayList<>();
|
||||
@SerializedName("red_packet_total")
|
||||
private int redPacketTotal = 100;
|
||||
@SerializedName("red_packet_day_create_num")
|
||||
private int redPacketNum = 0;
|
||||
|
||||
public List<SlideInfoModel> getSlide() {
|
||||
return slide;
|
||||
@ -52,6 +58,30 @@ public class AnchorRecommendModel extends BaseModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getShowRedPacket() {
|
||||
return showRedPacket;
|
||||
}
|
||||
|
||||
public void setShowRedPacket(int showRedPacket) {
|
||||
this.showRedPacket = showRedPacket;
|
||||
}
|
||||
|
||||
public int getRedPacketTotal() {
|
||||
return redPacketTotal;
|
||||
}
|
||||
|
||||
public void setRedPacketTotal(int redPacketTotal) {
|
||||
this.redPacketTotal = redPacketTotal;
|
||||
}
|
||||
|
||||
public int getRedPacketNum() {
|
||||
return redPacketNum;
|
||||
}
|
||||
|
||||
public void setRedPacketNum(int redPacketNum) {
|
||||
this.redPacketNum = redPacketNum;
|
||||
}
|
||||
|
||||
public List<AnchorRecommendItemModel> getList() {
|
||||
return list;
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -51,6 +52,8 @@ public class LiveBean implements Parcelable {
|
||||
private String recommendCardtype = "";
|
||||
private String recommendCardIconSizeTwo = "";
|
||||
private String recommendCardIconSizeThree = "";
|
||||
@SerializedName("red_packet_status")
|
||||
private int redPacketStatus;
|
||||
|
||||
private Map<String,String> params;//用于跳转Activity时扩展参数,例:从首页Banner跳转到直播间时需要根据携带参数判断是否弹出新人特惠对话框
|
||||
|
||||
@ -382,6 +385,14 @@ public class LiveBean implements Parcelable {
|
||||
this.islive = islive;
|
||||
}
|
||||
|
||||
public int getRedPacketStatus() {
|
||||
return redPacketStatus;
|
||||
}
|
||||
|
||||
public void setRedPacketStatus(int redPacketStatus) {
|
||||
this.redPacketStatus = redPacketStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示靓号
|
||||
*/
|
||||
@ -529,6 +540,7 @@ public class LiveBean implements Parcelable {
|
||||
", recommendCardtype='" + recommendCardtype + '\'' +
|
||||
", recommendCardIconSizeTwo='" + recommendCardIconSizeTwo + '\'' +
|
||||
", recommendCardIconSizeThree='" + recommendCardIconSizeThree + '\'' +
|
||||
", redPacketStatus=" + redPacketStatus +
|
||||
", params=" + params +
|
||||
", mWeekList=" + mWeekList +
|
||||
'}';
|
||||
|
@ -68,7 +68,7 @@ public class LiveTaskModel extends BaseModel {
|
||||
'}';
|
||||
}
|
||||
|
||||
public static class NewUser {
|
||||
public static class NewUser implements Serializable{
|
||||
@SerializedName("isNew")
|
||||
private int isNew;
|
||||
@SerializedName("endTime")
|
||||
|
@ -0,0 +1,165 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RedPacketDetailsBean extends BaseModel {
|
||||
@SerializedName("u_nicename")
|
||||
private String niceName;
|
||||
@SerializedName("avatar_thumb")
|
||||
private String avatarThumb;
|
||||
@SerializedName("avatar")
|
||||
private String avatar;
|
||||
@SerializedName("red_packet_money")
|
||||
private long money;// 红包金豆总数量
|
||||
@SerializedName("red_packet_quantity")
|
||||
private int quantity; // 领取的红包总数量
|
||||
@SerializedName("red_packet_quantity_already")
|
||||
private int already; // 领取的红包总数量
|
||||
@SerializedName("red_packet_record_details")
|
||||
private List<Detail> details;
|
||||
|
||||
public String getNiceName() {
|
||||
return niceName;
|
||||
}
|
||||
|
||||
public void setNiceName(String niceName) {
|
||||
this.niceName=niceName;
|
||||
}
|
||||
|
||||
public String getAvatarThumb() {
|
||||
avatarThumb=avatarThumb.replace("\\","");
|
||||
if(!avatarThumb.startsWith("http")){
|
||||
avatarThumb= CommonAppConfig.HOST+"/"+avatarThumb;
|
||||
}
|
||||
return avatarThumb;
|
||||
}
|
||||
|
||||
public void setAvatarThumb(String avatarThumb) {
|
||||
this.avatarThumb = avatarThumb;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public long getMoney() {
|
||||
return money;
|
||||
}
|
||||
|
||||
public void setMoney(long money) {
|
||||
this.money = money;
|
||||
}
|
||||
|
||||
public int getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(int quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public int getAlready() {
|
||||
return already;
|
||||
}
|
||||
|
||||
public void setAlready(int already) {
|
||||
this.already = already;
|
||||
}
|
||||
|
||||
public List<Detail> getDetails() {
|
||||
return details;
|
||||
}
|
||||
|
||||
public void setDetails(List<Detail> details) {
|
||||
this.details = details;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RedPacketDetailsBean{" +
|
||||
"niceName='" + niceName + '\'' +
|
||||
", avatarThumb='" + avatarThumb + '\'' +
|
||||
", avatar='" + avatar + '\'' +
|
||||
", money=" + money +
|
||||
", quantity=" + quantity +
|
||||
", already=" + already +
|
||||
", details=" + details +
|
||||
'}';
|
||||
}
|
||||
|
||||
public static class Detail extends BaseModel {
|
||||
@SerializedName("receive_money")
|
||||
private long money;
|
||||
@SerializedName("user_nicename")
|
||||
private String niceName;
|
||||
@SerializedName("receive_time")
|
||||
private String time;
|
||||
@SerializedName("avatar_thumb")
|
||||
private String avatarThumb;
|
||||
@SerializedName("avatar")
|
||||
private String avatar;
|
||||
|
||||
|
||||
public long getMoney() {
|
||||
return money;
|
||||
}
|
||||
|
||||
public void setMoney(long money) {
|
||||
this.money = money;
|
||||
}
|
||||
|
||||
public String getNiceName() {
|
||||
return niceName;
|
||||
}
|
||||
|
||||
public void setNiceName(String niceName) {
|
||||
this.niceName=niceName;
|
||||
}
|
||||
|
||||
public String getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(String time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public String getAvatarThumb() {
|
||||
avatarThumb=avatarThumb.replace("\\","");
|
||||
if(!avatarThumb.startsWith("http")){
|
||||
avatarThumb= CommonAppConfig.HOST+"/"+avatarThumb;
|
||||
}
|
||||
return avatarThumb;
|
||||
}
|
||||
|
||||
public void setAvatarThumb(String avatarThumb) {
|
||||
this.avatarThumb = avatarThumb;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Detail{" +
|
||||
"money=" + money +
|
||||
", niceName='" + niceName + '\'' +
|
||||
", time='" + time + '\'' +
|
||||
", avatarThumb='" + avatarThumb + '\'' +
|
||||
", avatar='" + avatar + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class RedPacketListBean extends BaseModel {
|
||||
public static final int RED_PACKET_STATUS_SUCCESS=1;//红包消费
|
||||
public static final int RED_PACKET_STATUS_BACK=2;//红包退回
|
||||
public static final int RED_PACKET_CURRENT_STATUS_SUCCESS=1;//红包已生效
|
||||
public static final int RED_PACKET_CURRENT_STATUS_TIMEOUT=2;//红包已过期
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("live_nicename")
|
||||
private String liveNicename;
|
||||
@SerializedName("create_time")
|
||||
private String createTime;
|
||||
@SerializedName("red_packet_money")
|
||||
private long redPacketMoney;
|
||||
@SerializedName("red_packet_status")
|
||||
private int redPacketStatus;
|
||||
@SerializedName("current_status")
|
||||
private int currentStatus;
|
||||
@SerializedName("uid")
|
||||
private long uid;
|
||||
|
||||
@SerializedName("amount_diamond")
|
||||
private long amountDiamond;
|
||||
@SerializedName("amount_refund")
|
||||
private long amountRefund;
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getLiveNicename() {
|
||||
return liveNicename;
|
||||
}
|
||||
|
||||
public void setLiveNicename(String liveNicename) {
|
||||
this.liveNicename = liveNicename;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public long getRedPacketMoney() {
|
||||
return redPacketMoney;
|
||||
}
|
||||
|
||||
public void setRedPacketMoney(long redPacketMoney) {
|
||||
this.redPacketMoney = redPacketMoney;
|
||||
}
|
||||
|
||||
public int getRedPacketStatus() {
|
||||
return redPacketStatus;
|
||||
}
|
||||
|
||||
public void setRedPacketStatus(int redPacketStatus) {
|
||||
this.redPacketStatus = redPacketStatus;
|
||||
}
|
||||
|
||||
public long getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(long uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public int getCurrentStatus() {
|
||||
return currentStatus;
|
||||
}
|
||||
|
||||
public void setCurrentStatus(int currentStatus) {
|
||||
this.currentStatus = currentStatus;
|
||||
}
|
||||
|
||||
public long getAmountDiamond() {
|
||||
return amountDiamond;
|
||||
}
|
||||
|
||||
public void setAmountDiamond(long amountDiamond) {
|
||||
this.amountDiamond = amountDiamond;
|
||||
}
|
||||
|
||||
public long getAmountRefund() {
|
||||
return amountRefund;
|
||||
}
|
||||
|
||||
public void setAmountRefund(long amountRefund) {
|
||||
this.amountRefund = amountRefund;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RedPacketListBean{" +
|
||||
"id=" + id +
|
||||
", liveNicename='" + liveNicename + '\'' +
|
||||
", createTime='" + createTime + '\'' +
|
||||
", redPacketMoney=" + redPacketMoney +
|
||||
", redPacketStatus=" + redPacketStatus +
|
||||
", currentStatus=" + currentStatus +
|
||||
", uid=" + uid +
|
||||
", amountDiamond=" + amountDiamond +
|
||||
", amountRefund=" + amountRefund +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -2,6 +2,7 @@ package com.yunbao.common.http;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.yunbao.common.bean.ActiveModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.BlindBoxInfoModel;
|
||||
@ -19,6 +20,7 @@ import com.yunbao.common.bean.ListInfoMessageModel;
|
||||
import com.yunbao.common.bean.LiveAiRobotBean;
|
||||
import com.yunbao.common.bean.LiveAnchorCallMeModel;
|
||||
import com.yunbao.common.bean.LiveAnchorSayModel;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.bean.LiveDataInfoModel;
|
||||
import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
@ -35,6 +37,8 @@ import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||||
import com.yunbao.common.bean.RandomPkUserBean;
|
||||
import com.yunbao.common.bean.RankPkInfoBean;
|
||||
import com.yunbao.common.bean.RedPacketDetailsBean;
|
||||
import com.yunbao.common.bean.RedPacketListBean;
|
||||
import com.yunbao.common.bean.SearchModel;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.SlideInBannerModel;
|
||||
@ -730,4 +734,23 @@ public interface PDLiveApi {
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getBlindBoxInfo")
|
||||
Observable<ResponseModel<List<BlindBoxInfoModel>>> getBlindBoxInfo();
|
||||
|
||||
/**
|
||||
* 获取红包记录列表
|
||||
*/
|
||||
@GET("/api/public/?service=Live.redPacketRecord")
|
||||
Observable<ResponseModel<List<RedPacketListBean>>> getRedPacketList();
|
||||
|
||||
/**
|
||||
* 获取红包詳情
|
||||
*/
|
||||
@GET("/api/public/?service=Live.redPacketRecordDetails")
|
||||
Observable<ResponseModel<RedPacketDetailsBean>> getRedPacketDetails(@Query("red_packet_id") int id);
|
||||
|
||||
/**
|
||||
* 获取直播间上下滑动红包集合
|
||||
*/
|
||||
@GET("/api/public/?service=Home.getRedPacket")
|
||||
Observable<ResponseModel<List<AnchorRecommendItemModel>>> getRedPacket();
|
||||
|
||||
}
|
||||
|
@ -34,6 +34,8 @@ import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||||
import com.yunbao.common.bean.RandomPkUserBean;
|
||||
import com.yunbao.common.bean.RankPkInfoBean;
|
||||
import com.yunbao.common.bean.RedPacketDetailsBean;
|
||||
import com.yunbao.common.bean.RedPacketListBean;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.UserAreaBean;
|
||||
@ -1550,7 +1552,54 @@ public class LiveNetManager {
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取红包记录列表
|
||||
*/
|
||||
public void getRedPacketList(HttpCallback<List<RedPacketListBean>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRedPacketList()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<RedPacketListBean>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<RedPacketListBean>> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
/**
|
||||
* 获取红包记录列表
|
||||
*/
|
||||
public void getRedPacketUserList(int id,HttpCallback<RedPacketDetailsBean> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRedPacketDetails(id)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<RedPacketDetailsBean>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<RedPacketDetailsBean> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
*/
|
||||
|
@ -2,8 +2,8 @@ package com.yunbao.common.http.main;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.FaceBookUpModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.MsgSwitchDetailModel;
|
||||
@ -13,7 +13,6 @@ 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.ToastUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -207,13 +206,14 @@ public class MainNetManager {
|
||||
|
||||
/**
|
||||
* 获取推送关注的设置和关注列表
|
||||
*
|
||||
* @param callback
|
||||
*/
|
||||
public void getMsgSwitchDetail(HttpCallback<MsgSwitchDetailModel> callback) {
|
||||
API.get().pdLiveApi(mContext).getMsgSwitchDetail()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(msgSwitchDetailModelResponseModel -> {
|
||||
.subscribe(msgSwitchDetailModelResponseModel -> {
|
||||
if (callback != null) {
|
||||
MsgSwitchDetailModel msgSwitchDetailModel = msgSwitchDetailModelResponseModel.getData().getInfo();
|
||||
callback.onSuccess(msgSwitchDetailModel);
|
||||
@ -227,13 +227,14 @@ public class MainNetManager {
|
||||
|
||||
/**
|
||||
* 推送开关设置
|
||||
*
|
||||
* @param callback
|
||||
*/
|
||||
public void setMsgMasterSwitch(String status,String type,HttpCallback<ResponseData> callback) {
|
||||
API.get().pdLiveApi(mContext).setMsgMasterSwitch(status,type)
|
||||
public void setMsgMasterSwitch(String status, String type, HttpCallback<ResponseData> callback) {
|
||||
API.get().pdLiveApi(mContext).setMsgMasterSwitch(status, type)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(BaseModel -> {
|
||||
.subscribe(BaseModel -> {
|
||||
if (callback != null) {
|
||||
ResponseData responseData = BaseModel.getData();
|
||||
callback.onSuccess(responseData);
|
||||
@ -247,13 +248,14 @@ public class MainNetManager {
|
||||
|
||||
/**
|
||||
* 主播开播推送开关设置
|
||||
*
|
||||
* @param callback
|
||||
*/
|
||||
public void setBeginShowMsgSwitch(String status,String isAll,String liveuid,HttpCallback<ResponseData> callback) {
|
||||
API.get().pdLiveApi(mContext).setBeginShowMsgSwitch(status,isAll,liveuid)
|
||||
public void setBeginShowMsgSwitch(String status, String isAll, String liveuid, HttpCallback<ResponseData> callback) {
|
||||
API.get().pdLiveApi(mContext).setBeginShowMsgSwitch(status, isAll, liveuid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(BaseModel -> {
|
||||
.subscribe(BaseModel -> {
|
||||
if (callback != null) {
|
||||
ResponseData responseData = BaseModel.getData();
|
||||
callback.onSuccess(responseData);
|
||||
@ -264,5 +266,22 @@ public class MainNetManager {
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
/**
|
||||
* 获取直播间上下滑动红包集合
|
||||
*/
|
||||
public void getRedPacket(HttpCallback<List<AnchorRecommendItemModel>> callback) {
|
||||
API.get().pdLiveApi(mContext).getRedPacket()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(msgSwitchDetailModelResponseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(msgSwitchDetailModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}, throwable -> {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
|
||||
}).isDisposed();
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.bean.RedPacketListBean;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
|
||||
import java.util.Locale;
|
||||
@ -39,6 +40,9 @@ public class RouteUtil {
|
||||
public static final String PATH_MYWEBVIEWACTIVTITY2 = "/main/MyWebViewActivity2";
|
||||
public static final String PATH_LOGIN = "/main/LoginActivity";
|
||||
public static final String PATH_CS = "/main/CustomerServiceWebViewActivity";
|
||||
public static final String PATH_RED_PACKET_LIST = "/main/RedPacketListActivity";
|
||||
public static final String PATH_RED_PACKET_INFO = "/main/RedPacketInfoActivity";
|
||||
public static final String PATH_RED_PACKET_USER = "/main/RedPacketUsersActivity";
|
||||
|
||||
public static void forwardFansActivity(String uid) {
|
||||
ARouter.getInstance().build(PATH_FANSACTIVITY)
|
||||
@ -80,6 +84,7 @@ public class RouteUtil {
|
||||
.withBoolean("forwardEntry", true)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 只回到登录页,不提示东西
|
||||
*/
|
||||
@ -188,6 +193,7 @@ public class RouteUtil {
|
||||
ARouter.getInstance().build(PATH_EDITPROFILE)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改个人资料
|
||||
*/
|
||||
@ -256,9 +262,36 @@ public class RouteUtil {
|
||||
/**
|
||||
* 客服页面
|
||||
*/
|
||||
public static void forwardCustomerService(String url){
|
||||
public static void forwardCustomerService(String url) {
|
||||
ARouter.getInstance().build(PATH_CS)
|
||||
.withString(Constants.URL,url)
|
||||
.withString(Constants.URL, url)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 红包记录列表
|
||||
*/
|
||||
public static void forwardRedPacketList() {
|
||||
ARouter.getInstance().build(PATH_RED_PACKET_LIST)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 红包详情
|
||||
*/
|
||||
public static void forwardRedPacketInfo(RedPacketListBean bean) {
|
||||
ARouter.getInstance().build(PATH_RED_PACKET_INFO)
|
||||
.withSerializable("bean", bean)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 红包发放情况
|
||||
* @param id 发放者uid
|
||||
*/
|
||||
public static void forwardRedPacketUser(int id) {
|
||||
ARouter.getInstance().build(PATH_RED_PACKET_USER)
|
||||
.withInt("id", id)
|
||||
.navigation();
|
||||
}
|
||||
}
|
||||
|
66
common/src/main/res/layout/item_red_packet.xml
Normal file
66
common/src/main/res/layout/item_red_packet.xml
Normal file
@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="21dp"
|
||||
android:layout_marginTop="13dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/diamond" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginBottom="-5dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/icon"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon"
|
||||
app:layout_constraintTop_toTopOf="@+id/icon">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TextView"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TextView"
|
||||
android:textColor="#90000000"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/money"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="26dp"
|
||||
android:text="TextView"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:background="?android:attr/listDivider"
|
||||
android:layout_marginTop="5dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/linearLayout" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
80
common/src/main/res/layout/item_user_red_packet.xml
Normal file
80
common/src/main/res/layout/item_user_red_packet.xml
Normal file
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_marginTop="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_border_color="#FFFFFF"
|
||||
app:riv_border_width="2dp"
|
||||
app:riv_oval="true" />
|
||||
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon2"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/money"
|
||||
android:layout_marginEnd="2dp"
|
||||
app:layout_constraintTop_toTopOf="@+id/money"
|
||||
app:srcCompat="@mipmap/gold_coin" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginBottom="-5dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/avatar"
|
||||
app:layout_constraintStart_toEndOf="@+id/avatar"
|
||||
app:layout_constraintTop_toTopOf="@+id/avatar">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TextView"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TextView"
|
||||
android:textColor="#90000000"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/money"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="TextView"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:visibility="gone"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:background="?android:attr/listDivider"
|
||||
android:layout_marginTop="5dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/linearLayout" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout 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="72dp"
|
||||
android:background="@color/white"
|
||||
@ -44,13 +46,25 @@
|
||||
android:id="@+id/rView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_toLeftOf="@+id/redPacketMain"
|
||||
android:layout_marginRight="10dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/not_received"
|
||||
android:visibility="gone"
|
||||
android:textStyle="bold" />
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/redPacketMain"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:visibility="invisible"
|
||||
app:srcCompat="@mipmap/ic_red_packet_record"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
||||
|
56
common/src/main/res/layout/view_title2.xml
Normal file
56
common/src/main/res/layout/view_title2.xml
Normal file
@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
android:background="#F5F5F5"
|
||||
android:paddingTop="24dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_back"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:onClick="backClick"
|
||||
android:padding="9dp"
|
||||
android:src="@mipmap/icon_back"
|
||||
android:tint="@color/textColor" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_more"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:padding="9dp"
|
||||
android:src="@mipmap/btn_more_black"
|
||||
android:tint="@color/textColor"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:text="@string/not_received"
|
||||
android:visibility="gone"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
BIN
common/src/main/res/mipmap-mdpi/ic_red_packet_record.png
Normal file
BIN
common/src/main/res/mipmap-mdpi/ic_red_packet_record.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 746 B |
BIN
common/src/main/res/mipmap-xxhdpi/bg_float_red_packet.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/bg_float_red_packet.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_diamond2.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/icon_diamond2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
@ -1196,4 +1196,20 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="rebot_config_auto_say_max">Over the maximum value</string>
|
||||
<string name="insufficient_balance">Insufficient balance, continue to recharge</string>
|
||||
<string name="live_setting_gap_3">Time limit gag</string>
|
||||
<string name="red_packet_list_title">Red packet record</string>
|
||||
<string name="red_packet_list_tips">Last 30 days record (as of yesterday)</string>
|
||||
<string name="red_packet_info_status">Current status</string>
|
||||
<string name="red_packet_info_status_success">Red packet Took effect</string>
|
||||
<string name="red_packet_info_status_timeout">Red packet Expired</string>
|
||||
<string name="red_packet_info_details">Red Packet Details</string>
|
||||
<string name="red_packet_info_details_check">Check</string>
|
||||
<string name="red_packet_info_pay_time">Pay Time</string>
|
||||
<string name="red_packet_info_mode">Mode of Pay</string>
|
||||
<string name="red_packet_info_mode_diamond">diamond</string>
|
||||
<string name="red_packet_user_tips">opened</string>
|
||||
<string name="red_packet_info_residue">Residual return</string>
|
||||
<string name="red_packet_info_residue_none">None</string>
|
||||
<string name="red_packet_info_residue_back">Return to account</string>
|
||||
<string name="red_packet_user_tips2">Popularity Red packet</string>
|
||||
<string name="main_tabs_red_packet">Red packets</string>
|
||||
</resources>
|
||||
|
@ -1191,4 +1191,20 @@
|
||||
<string name="rebot_config_auto_say_max">超过最大值</string>
|
||||
<string name="insufficient_balance">餘額不足,繼續充值</string>
|
||||
<string name="live_setting_gap_3">期限禁言</string>
|
||||
<string name="red_packet_list_title">紅包記錄</string>
|
||||
<string name="red_packet_list_tips">近30天記錄(截至到昨天)</string>
|
||||
<string name="red_packet_info_status">當前狀態</string>
|
||||
<string name="red_packet_info_status_success">紅包已生效</string>
|
||||
<string name="red_packet_info_status_timeout">紅包已過期</string>
|
||||
<string name="red_packet_info_details">紅包詳情</string>
|
||||
<string name="red_packet_info_details_check">查看</string>
|
||||
<string name="red_packet_info_pay_time">支付時間</string>
|
||||
<string name="red_packet_info_mode">支付方式</string>
|
||||
<string name="red_packet_info_mode_diamond">鉆石餘額</string>
|
||||
<string name="red_packet_user_tips">已打開</string>
|
||||
<string name="red_packet_info_residue">剩餘退回</string>
|
||||
<string name="red_packet_info_residue_none">無</string>
|
||||
<string name="red_packet_info_residue_back">退回賬戶</string>
|
||||
<string name="red_packet_user_tips2">攢人氣紅包</string>
|
||||
<string name="main_tabs_red_packet">紅包專區</string>
|
||||
</resources>
|
||||
|
@ -1190,4 +1190,20 @@
|
||||
<string name="rebot_config_auto_say_max">超过最大值</string>
|
||||
<string name="insufficient_balance">餘額不足,繼續充值</string>
|
||||
<string name="live_setting_gap_3">期限禁言</string>
|
||||
<string name="red_packet_list_title">紅包記錄</string>
|
||||
<string name="red_packet_list_tips">近30天記錄(截至到昨天)</string>
|
||||
<string name="red_packet_info_status">當前狀態</string>
|
||||
<string name="red_packet_info_status_success">紅包已生效</string>
|
||||
<string name="red_packet_info_status_timeout">紅包已過期</string>
|
||||
<string name="red_packet_info_details">紅包詳情</string>
|
||||
<string name="red_packet_info_details_check">查看</string>
|
||||
<string name="red_packet_info_pay_time">支付時間</string>
|
||||
<string name="red_packet_info_mode">支付方式</string>
|
||||
<string name="red_packet_info_mode_diamond">鉆石餘額</string>
|
||||
<string name="red_packet_user_tips">已打開</string>
|
||||
<string name="red_packet_info_residue">剩餘退回</string>
|
||||
<string name="red_packet_info_residue_none">無</string>
|
||||
<string name="red_packet_info_residue_back">退回賬戶</string>
|
||||
<string name="red_packet_user_tips2">攢人氣紅包</string>
|
||||
<string name="main_tabs_red_packet">紅包專區</string>
|
||||
</resources>
|
||||
|
@ -1191,4 +1191,20 @@
|
||||
<string name="rebot_config_auto_say_max">超过最大值</string>
|
||||
<string name="insufficient_balance">餘額不足,繼續充值</string>
|
||||
<string name="live_setting_gap_3">期限禁言</string>
|
||||
<string name="red_packet_list_title">紅包記錄</string>
|
||||
<string name="red_packet_list_tips">近30天記錄(截至到昨天)</string>
|
||||
<string name="red_packet_info_status">當前狀態</string>
|
||||
<string name="red_packet_info_status_success">紅包已生效</string>
|
||||
<string name="red_packet_info_status_timeout">紅包已過期</string>
|
||||
<string name="red_packet_info_details">紅包詳情</string>
|
||||
<string name="red_packet_info_details_check">查看</string>
|
||||
<string name="red_packet_info_pay_time">支付時間</string>
|
||||
<string name="red_packet_info_mode">支付方式</string>
|
||||
<string name="red_packet_info_mode_diamond">鉆石餘額</string>
|
||||
<string name="red_packet_user_tips">已打開</string>
|
||||
<string name="red_packet_info_residue">剩餘退回</string>
|
||||
<string name="red_packet_info_residue_none">無</string>
|
||||
<string name="red_packet_info_residue_back">退回賬戶</string>
|
||||
<string name="red_packet_user_tips2">攢人氣紅包</string>
|
||||
<string name="main_tabs_red_packet">紅包專區</string>
|
||||
</resources>
|
||||
|
@ -1197,4 +1197,20 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="rebot_config_auto_say_max">Over the maximum value</string>
|
||||
<string name="insufficient_balance">Insufficient balance, continue to recharge</string>
|
||||
<string name="live_setting_gap_3">Time limit gag</string>
|
||||
<string name="red_packet_list_title">Red packet record</string>
|
||||
<string name="red_packet_list_tips">Last 30 days record (as of yesterday)</string>
|
||||
<string name="red_packet_info_status">Current status</string>
|
||||
<string name="red_packet_info_status_success">Red packet Took effect</string>
|
||||
<string name="red_packet_info_status_timeout">Red packet Expired</string>
|
||||
<string name="red_packet_info_details">Red Packet Details</string>
|
||||
<string name="red_packet_info_details_check">Check</string>
|
||||
<string name="red_packet_info_pay_time">Pay Time</string>
|
||||
<string name="red_packet_info_mode">Mode of Pay</string>
|
||||
<string name="red_packet_info_mode_diamond">diamond</string>
|
||||
<string name="red_packet_user_tips">opened</string>
|
||||
<string name="red_packet_info_residue">Residual return</string>
|
||||
<string name="red_packet_info_residue_none">None</string>
|
||||
<string name="red_packet_info_residue_back">Return to account</string>
|
||||
<string name="red_packet_user_tips2">Popularity Red packet</string>
|
||||
<string name="main_tabs_red_packet">Red packets</string>
|
||||
</resources>
|
||||
|
@ -5,7 +5,7 @@ ext {
|
||||
minSdkVersion : 21,
|
||||
targetSdkVersion : 31,
|
||||
versionCode : 430,
|
||||
versionName : "6.5.2"
|
||||
versionName : "6.5.3"
|
||||
]
|
||||
manifestPlaceholders = [
|
||||
//正式、
|
||||
@ -24,7 +24,7 @@ ext {
|
||||
baiduAppKey : "zgCgFhUKEOV7I3ZXDFpTfnRB",
|
||||
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
|
||||
// true表示谷歌支付 false
|
||||
isGooglePlay : false,
|
||||
isGooglePlay : true,
|
||||
//是否上报异常日志
|
||||
isUploadLog : true,
|
||||
//是否打包成插件包模式
|
||||
|
@ -159,6 +159,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
private View titleLine;
|
||||
private boolean liveIndex = true;
|
||||
private boolean isPk = false;
|
||||
private boolean isRadPacetModle = false;
|
||||
|
||||
@Override
|
||||
public <T extends View> T findViewById(@IdRes int id) {
|
||||
@ -183,6 +184,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
L.e(TAG, "直播sdk----->" + (mLiveSDK == Constants.LIVE_SDK_KSY ? "金山云" : "腾讯云"));
|
||||
mLiveType = intent.getIntExtra(Constants.LIVE_TYPE, Constants.LIVE_TYPE_NORMAL);
|
||||
mLiveTypeVal = intent.getIntExtra(Constants.LIVE_TYPE_VAL, 0);
|
||||
isRadPacetModle = !StringUtil.isEmpty(intent.getStringExtra("redPacket")) && intent.getStringExtra("redPacket").equals("true");
|
||||
initView();
|
||||
setVolumeControlStream(AudioManager.STREAM_MUSIC);
|
||||
manager = new PortraitLiveManager(this, intent);
|
||||
@ -267,21 +269,40 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
manager.resetLight();
|
||||
Log.e(TAG, "mCurrentItem:" + mCurrentItem);
|
||||
if (mCurrentItem == itemModelList.size() - 1) {
|
||||
MainNetManager.get(mContext)
|
||||
.anchorRecommendType("30", new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
|
||||
@Override
|
||||
public void onSuccess(AnchorRecommendModel data) {
|
||||
if (TextUtils.equals(data.getList().get(0).getUid(), mLiveBean.getUid())) {
|
||||
data.getList().remove(0);
|
||||
if (isRadPacetModle) {//从红包专区进去的走红包专区列表
|
||||
MainNetManager.get(mContext)
|
||||
.getRedPacket(new com.yunbao.common.http.base.HttpCallback<List<AnchorRecommendItemModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<AnchorRecommendItemModel> data) {
|
||||
if (TextUtils.equals(data.get(0).getUid(), mLiveBean.getUid())) {
|
||||
data.remove(0);
|
||||
}
|
||||
itemModelList.addAll(data);
|
||||
mPagerAdapter.notifyDataSetChanged();
|
||||
}
|
||||
itemModelList.addAll(data.getList());
|
||||
mPagerAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
MainNetManager.get(mContext)
|
||||
.anchorRecommendType("30", new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
|
||||
@Override
|
||||
public void onSuccess(AnchorRecommendModel data) {
|
||||
if (TextUtils.equals(data.getList().get(0).getUid(), mLiveBean.getUid())) {
|
||||
data.getList().remove(0);
|
||||
}
|
||||
itemModelList.addAll(data.getList());
|
||||
mPagerAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -861,7 +882,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
if (TextUtils.equals(htmlUrl, "recharge")) {
|
||||
RouteUtil.forwardMyCoin(mContext);
|
||||
} else if (TextUtils.equals(htmlUrl, "to_me_information")) {
|
||||
RouteUtil.forwardEditProfileActivity();
|
||||
RouteUtil.forwardEditProfileActivity();
|
||||
} else {
|
||||
if (!screen) {
|
||||
ZhuangBanActivity.forward(mContext, htmlUrl, false);
|
||||
|
@ -825,7 +825,7 @@ public class SocketRyClient {
|
||||
chatBean.setContentColor(map.getString("contentColor"));//文字内容颜色
|
||||
chatBean.setAtUserName(map.getString("atUserName"));//@名字
|
||||
chatBean.setAtUserID(map.getString("atUserID"));//@ID
|
||||
if (!map.getString("guard_type").equals("undefined")) {
|
||||
if (map.containsKey("guard_type")&&!map.getString("guard_type").equals("undefined")) {
|
||||
chatBean.setGuardType(map.getIntValue("guard_type"));
|
||||
}
|
||||
try {
|
||||
|
@ -257,7 +257,14 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
public void run() {
|
||||
loading.setVisibility(View.GONE);
|
||||
enterRoomLeaveHandler.post(enterRoomLeaveRunnable);
|
||||
ToastUtil.show(mContext.getString(R.string.net_error) + " :500" );//异常下播,等待加载时间过了后弹出
|
||||
}
|
||||
};
|
||||
final Runnable loadTimeoutRunnableGone = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
loading.setVisibility(View.GONE);
|
||||
enterRoomLeaveHandler.post(enterRoomLeaveRunnable);
|
||||
ToastUtil.show(mContext.getString(R.string.net_error) + " :500");//异常下播,等待加载时间过了后弹出
|
||||
}
|
||||
};
|
||||
|
||||
@ -297,6 +304,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
AnimationDrawable frameAnimation = (AnimationDrawable) ivLoading.getBackground();
|
||||
frameAnimation.start();
|
||||
liveHandler.removeCallbacks(loadRunnableGone);
|
||||
liveHandler.removeCallbacks(loadTimeoutRunnableGone);
|
||||
if (mLivePlayViewHolder == null) {
|
||||
mLivePlayViewHolder = new LivePlayRyViewHolder(mContext, playContainer, 1);
|
||||
mLiveRoomViewHolder = new LiveRoomViewHolder(false, 1, mContext, mContainer, mSecondPage.findViewById(R.id.gift_gif), mSecondPage.findViewById(R.id.gift_svga), mContainerWrap, mContext.getWindowManager());
|
||||
@ -310,6 +318,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
@Override
|
||||
public void onPlayer() {
|
||||
liveHandler.postDelayed(loadRunnableGone, 350);
|
||||
liveHandler.removeCallbacks(loadTimeoutRunnableGone);
|
||||
}
|
||||
});
|
||||
mLiveRoomViewHolder.subscribeActivityLifeCycle();
|
||||
@ -595,7 +604,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
} else if (!pkInfo.getString("end_pk_time").equals("0")) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.pkHandler = true;
|
||||
mLiveRoomViewHolder.pkUid=pkUid;
|
||||
mLiveRoomViewHolder.pkUid = pkUid;
|
||||
mLiveRoomViewHolder.initPkRank(null);
|
||||
}
|
||||
if (mLivePlayViewHolder != null) {
|
||||
@ -660,7 +669,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
mLiveRoomViewHolder.showPrizePoolLevel(String.valueOf(giftPrizePoolLevel));
|
||||
}
|
||||
}
|
||||
liveHandler.postDelayed(loadRunnableGone, 15_000);
|
||||
liveHandler.postDelayed(loadTimeoutRunnableGone, 15_000);
|
||||
if (TextUtils.equals(data.getEnterRoomInfo().getIsconnection(), "1")) {
|
||||
//通知心愿单位置换地方
|
||||
EventBus.getDefault().post(new LiveAudienceEvent()
|
||||
|
@ -147,6 +147,15 @@
|
||||
<activity
|
||||
android:name=".activity.CustomerServiceWebViewActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activity.RedPacketListActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activity.RedPacketInfoActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activity.RedPacketUsersActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -26,6 +26,7 @@ import android.view.Window;
|
||||
import android.view.animation.DecelerateInterpolator;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
@ -93,6 +94,7 @@ import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.VersionUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.APKUpdateCustomPopup;
|
||||
import com.yunbao.common.views.AbsMainViewHolder;
|
||||
import com.yunbao.common.views.floatingview.APPEasyFloat;
|
||||
@ -191,6 +193,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
private FloatBannerView floatBanner;
|
||||
private boolean isfloatBannernet = true, isFirst = true;
|
||||
|
||||
private View floatRedPacket;
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@ -236,6 +240,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
rt_main_tab = (RelativeLayout) findViewById(R.id.rt_main_tab);
|
||||
v_table_redpoint = findViewById(R.id.v_table_redpoint);
|
||||
v_table_redpoint_me = (View) findViewById(R.id.v_table_redpoint_me);
|
||||
floatRedPacket = findViewById(R.id.red_packet);
|
||||
initRedPacket();
|
||||
|
||||
Display mDisplay = getWindowManager().getDefaultDisplay();
|
||||
Height = mDisplay.getHeight();
|
||||
@ -485,12 +491,14 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
initAnchorRecommendBanner();
|
||||
} else if (index == 2) {
|
||||
floatBanner.setVisibility(View.GONE);
|
||||
floatRedPacket.setVisibility(View.GONE);
|
||||
findViewById(R.id.banner_click).setVisibility(View.GONE);
|
||||
isfloatBannernet = false;
|
||||
if (mainMessageViewHolder != null)
|
||||
mainMessageViewHolder.onResume();
|
||||
} else {
|
||||
floatBanner.setVisibility(View.GONE);
|
||||
floatRedPacket.setVisibility(View.GONE);
|
||||
findViewById(R.id.banner_click).setVisibility(View.GONE);
|
||||
isfloatBannernet = false;
|
||||
}
|
||||
@ -561,6 +569,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
if (!isfloatBannernet) return;
|
||||
MainNetManager.get(mContext)
|
||||
.anchorRecommend("10", new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
public void onSuccess(AnchorRecommendModel data) {
|
||||
if (isFinishing()) return;
|
||||
@ -572,6 +581,14 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
floatBanner.setVisibility(View.GONE);
|
||||
findViewById(R.id.banner_click).setVisibility(View.GONE);
|
||||
}
|
||||
if (data.getShowRedPacket() == 0) {
|
||||
floatRedPacket.setVisibility(View.GONE);
|
||||
} else {
|
||||
floatRedPacket.setVisibility(View.VISIBLE);
|
||||
((ProgressBar) floatRedPacket.findViewById(R.id.progress)).setMax(data.getRedPacketTotal());
|
||||
((ProgressBar) floatRedPacket.findViewById(R.id.progress)).setProgress(data.getRedPacketNum());
|
||||
((TextView) floatRedPacket.findViewById(R.id.progressText)).setText(data.getRedPacketNum() + "/" + data.getRedPacketTotal());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -832,9 +849,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
//获取指导员引导逻辑
|
||||
NoviceInstructorManager.get(mContext).getNoviceInstructor();
|
||||
NoviceInstructorManager.get(mContext).checktHomeZdyPop();
|
||||
if (!isFirst) {
|
||||
initAnchorRecommendBanner();
|
||||
}
|
||||
initAnchorRecommendBanner();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1232,6 +1247,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
} else {
|
||||
isfloatBannernet = false;
|
||||
floatBanner.setVisibility(View.GONE);
|
||||
floatRedPacket.setVisibility(View.GONE);
|
||||
findViewById(R.id.banner_click).setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
@ -1374,4 +1390,15 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
}
|
||||
}
|
||||
|
||||
private void initRedPacket() {
|
||||
ImageView title = floatRedPacket.findViewById(R.id.title);
|
||||
if (WordUtil.isNewZh()) {
|
||||
title.setImageResource(R.mipmap.icon_red_packet_float_text_zh);
|
||||
} else {
|
||||
title.setImageResource(R.mipmap.icon_red_packet_float_text_en);
|
||||
}
|
||||
floatRedPacket.setOnClickListener(v -> {
|
||||
mainHomeViewHolder.setCurPosition(3);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -65,6 +65,10 @@ public class MyWalletActivity extends AbsActivity {
|
||||
GoogleBillingUtilNew.getInstance().initGooglePay(mContext);
|
||||
vp_content = (ViewPager) findViewById(R.id.vp_content);
|
||||
TextView rView = (TextView) findViewById(R.id.rView);
|
||||
findViewById(R.id.redPacketMain).setVisibility(View.VISIBLE);
|
||||
findViewById(R.id.redPacketMain).setOnClickListener(v -> {
|
||||
RouteUtil.forwardRedPacketList();
|
||||
});
|
||||
rView.setOnClickListener(v -> {
|
||||
LoadingDialog loadingDialog = new LoadingDialog();
|
||||
loadingDialog.show(getSupportFragmentManager(), "LoadingDialog");
|
||||
|
@ -0,0 +1,82 @@
|
||||
package com.yunbao.main.activity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.bean.RedPacketListBean;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.main.R;
|
||||
|
||||
@Route(path = RouteUtil.PATH_RED_PACKET_INFO)
|
||||
public class RedPacketInfoActivity extends AbsActivity implements View.OnClickListener {
|
||||
private RedPacketListBean bean;
|
||||
private ImageView icon;
|
||||
private ImageView gold;
|
||||
private TextView title;
|
||||
private TextView money;
|
||||
private TextView status;
|
||||
private TextView info;
|
||||
private TextView time;
|
||||
private TextView model;
|
||||
private TextView backAccountText;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_red_packet_info;
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
protected void main() {
|
||||
super.main();
|
||||
bean = (RedPacketListBean) getIntent().getSerializableExtra("bean");
|
||||
icon = findViewById(R.id.icon);
|
||||
title = findViewById(R.id.title);
|
||||
money = findViewById(R.id.money);
|
||||
status = findViewById(R.id.red_packet_status);
|
||||
info = findViewById(R.id.red_packet_info);
|
||||
time = findViewById(R.id.red_packet_timer);
|
||||
model = findViewById(R.id.red_packet_model);
|
||||
gold = findViewById(R.id.gold_icon);
|
||||
backAccountText = findViewById(R.id.backAccountText);
|
||||
findViewById(R.id.btn_back).setOnClickListener(this);
|
||||
info.setOnClickListener(this);
|
||||
|
||||
title.setText(bean.getLiveNicename());
|
||||
time.setText(bean.getCreateTime());
|
||||
|
||||
money.setText("-" + bean.getAmountDiamond());
|
||||
money.setTextColor(Color.parseColor("#000000"));
|
||||
icon.setImageResource(R.mipmap.diamond);
|
||||
|
||||
if (bean.getCurrentStatus() == RedPacketListBean.RED_PACKET_CURRENT_STATUS_SUCCESS) {
|
||||
status.setText(R.string.red_packet_info_status_success);
|
||||
} else {
|
||||
status.setText(R.string.red_packet_info_status_timeout);
|
||||
}
|
||||
if (bean.getAmountRefund() == 0) {
|
||||
gold.setVisibility(View.GONE);
|
||||
backAccountText.setText(R.string.red_packet_info_residue_none);
|
||||
} else {
|
||||
gold.setVisibility(View.VISIBLE);
|
||||
backAccountText.setText(mContext.getString(R.string.red_packet_info_residue_back) + " +" + bean.getAmountRefund());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int id = v.getId();
|
||||
if (id == R.id.red_packet_info) {
|
||||
RouteUtil.forwardRedPacketUser(bean.getId());
|
||||
} else if (id == R.id.btn_back) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.yunbao.main.activity;
|
||||
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.bean.RedPacketListBean;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.adapter.RedPacketListRecyclerAdapter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Route(path = RouteUtil.PATH_RED_PACKET_LIST)
|
||||
public class RedPacketListActivity extends AbsActivity {
|
||||
private RecyclerView recyclerView;
|
||||
private RedPacketListRecyclerAdapter adapter;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_red_packet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void main() {
|
||||
super.main();
|
||||
((TextView) findViewById(R.id.titleView)).setText(mContext.getString(R.string.red_packet_list_title));
|
||||
recyclerView = findViewById(R.id.recyclerView);
|
||||
|
||||
adapter = new RedPacketListRecyclerAdapter(this);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
|
||||
recyclerView.setAdapter(adapter);
|
||||
initData();
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
LiveNetManager.get(mContext)
|
||||
.getRedPacketList(new HttpCallback<List<RedPacketListBean>>() {
|
||||
@Override
|
||||
public void onSuccess(List<RedPacketListBean> data) {
|
||||
adapter.setList(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
package com.yunbao.main.activity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.bean.RedPacketDetailsBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.adapter.RedPacketUserRecyclerAdapter;
|
||||
|
||||
@Route(path = RouteUtil.PATH_RED_PACKET_USER)
|
||||
public class RedPacketUsersActivity extends AbsActivity implements View.OnClickListener{
|
||||
private RecyclerView recyclerView;
|
||||
private RedPacketUserRecyclerAdapter adapter;
|
||||
private int redPacketId;
|
||||
|
||||
private RoundedImageView avatar;
|
||||
private TextView title;
|
||||
private TextView money;
|
||||
private ImageView icon;
|
||||
private TextView open;
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_red_packet_users;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
super.main();
|
||||
findViewById(R.id.btn_back).setOnClickListener(this);
|
||||
recyclerView = findViewById(R.id.recyclerView);
|
||||
avatar = findViewById(R.id.avatar);
|
||||
title = findViewById(R.id.title);
|
||||
money = findViewById(R.id.money);
|
||||
icon = findViewById(R.id.avatar);
|
||||
open = findViewById(R.id.open_packet);
|
||||
redPacketId=getIntent().getIntExtra("id",0);
|
||||
adapter = new RedPacketUserRecyclerAdapter(this);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
|
||||
recyclerView.setAdapter(adapter);
|
||||
initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int id=v.getId();
|
||||
if(id==R.id.btn_back){
|
||||
finish();
|
||||
}
|
||||
}
|
||||
private void initData() {
|
||||
LiveNetManager.get(mContext)
|
||||
.getRedPacketUserList(redPacketId, new HttpCallback<RedPacketDetailsBean>() {
|
||||
@Override
|
||||
public void onSuccess(RedPacketDetailsBean data) {
|
||||
setData(data);
|
||||
adapter.setList(data.getDetails());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
@SuppressLint("SetTextI18n")
|
||||
private void setData(RedPacketDetailsBean bean){
|
||||
ImgLoader.display(mContext,bean.getAvatarThumb(),avatar);
|
||||
title.setText(bean.getNiceName());
|
||||
money.setText(bean.getMoney()+"");
|
||||
open.setText(mContext.getString(R.string.red_packet_user_tips)+" "+bean.getAlready()+"/"+bean.getQuantity());
|
||||
|
||||
}
|
||||
}
|
@ -79,9 +79,11 @@ public class MainHomeRemFollLiveAdapter extends RefreshAdapter<LiveBean> {
|
||||
ImageView dr_pk_ico;
|
||||
View views;
|
||||
ImageView bgs;
|
||||
private View redPacket;
|
||||
|
||||
public Vh(View itemView) {
|
||||
super(itemView);
|
||||
redPacket = itemView.findViewById(R.id.red_packet);
|
||||
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);
|
||||
@ -220,6 +222,11 @@ public class MainHomeRemFollLiveAdapter extends RefreshAdapter<LiveBean> {
|
||||
if (bean.getIs_week() != null && bean.getIs_week().equals("1")) {
|
||||
views.setVisibility(View.GONE);
|
||||
}
|
||||
if (bean.getRedPacketStatus() == 1) {
|
||||
redPacket.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
redPacket.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,77 @@
|
||||
package com.yunbao.main.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.bean.RedPacketListBean;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.main.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class RedPacketListRecyclerAdapter extends RecyclerView.Adapter<RedPacketListRecyclerAdapter.ItemViewHolder> {
|
||||
private List<RedPacketListBean> list;
|
||||
private Context mContext;
|
||||
|
||||
public RedPacketListRecyclerAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
this.list=new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setList(List<RedPacketListBean> list) {
|
||||
this.list = list;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ItemViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new ItemViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_red_packet, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ItemViewHolder holder, int position) {
|
||||
holder.setData(list.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public class ItemViewHolder extends RecyclerView.ViewHolder {
|
||||
private TextView title, timer, money;
|
||||
private ImageView icon;
|
||||
|
||||
public ItemViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
title = itemView.findViewById(R.id.title);
|
||||
timer = itemView.findViewById(R.id.time);
|
||||
money = itemView.findViewById(R.id.money);
|
||||
icon = itemView.findViewById(R.id.icon);
|
||||
itemView.setOnClickListener(v -> {
|
||||
RouteUtil.forwardRedPacketInfo((RedPacketListBean) itemView.getTag());
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private void setData(RedPacketListBean bean) {
|
||||
title.setText(bean.getLiveNicename()+"|"+bean.getId());
|
||||
timer.setText(bean.getCreateTime());
|
||||
money.setText("-" + bean.getAmountDiamond());
|
||||
money.setTextColor(Color.parseColor("#000000"));
|
||||
icon.setImageResource(R.mipmap.diamond);
|
||||
itemView.setTag(bean);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package com.yunbao.main.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.yunbao.common.bean.RedPacketDetailsBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.main.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class RedPacketUserRecyclerAdapter extends RecyclerView.Adapter<RedPacketUserRecyclerAdapter.ItemViewHolder> {
|
||||
private List<RedPacketDetailsBean.Detail> list;
|
||||
private Context mContext;
|
||||
|
||||
public RedPacketUserRecyclerAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
list = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setList(List<RedPacketDetailsBean.Detail> list) {
|
||||
if (list != null) {
|
||||
this.list = list;
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ItemViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new ItemViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_user_red_packet, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ItemViewHolder holder, int position) {
|
||||
holder.setData(list.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public class ItemViewHolder extends RecyclerView.ViewHolder {
|
||||
private TextView title, timer, money;
|
||||
private RoundedImageView icon;
|
||||
|
||||
public ItemViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
title = itemView.findViewById(R.id.title);
|
||||
timer = itemView.findViewById(R.id.time);
|
||||
money = itemView.findViewById(R.id.money);
|
||||
icon = itemView.findViewById(R.id.avatar);
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private void setData(RedPacketDetailsBean.Detail bean) {
|
||||
title.setText(bean.getNiceName());
|
||||
timer.setText(bean.getTime());
|
||||
money.setText(bean.getMoney()+"");
|
||||
ImgLoader.display(mContext,bean.getAvatarThumb(),icon);
|
||||
itemView.setTag(bean);
|
||||
}
|
||||
}
|
||||
}
|
@ -159,6 +159,13 @@ public class MainHttpUtil {
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页红包专区
|
||||
*/
|
||||
public static void getRedPacket(int p, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Home.getRedPacket", MainHttpConsts.GET_RANDOM)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页
|
||||
|
@ -32,6 +32,7 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
||||
private ImageView mCover, liveType, mLiveIco, mType, pkico, drPkIco, pkAvatar, viewBg;
|
||||
private ImageView bgs;
|
||||
private View views;
|
||||
private View redPacket;
|
||||
private TextView mLiveState, mTitle, mName, mNum;
|
||||
|
||||
public MainHomeLiveItemViewHolder(@NonNull View itemView) {
|
||||
@ -40,6 +41,7 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
||||
itemView.findViewById(R.id.live_info_view).setVisibility(View.VISIBLE);
|
||||
itemView.findViewById(R.id.lt_week_list).setVisibility(View.GONE);
|
||||
mCover = itemView.findViewById(R.id.cover);
|
||||
redPacket = itemView.findViewById(R.id.red_packet);
|
||||
bgs = itemView.findViewById(R.id.bgs);
|
||||
liveType = itemView.findViewById(R.id.live_type);
|
||||
views = itemView.findViewById(R.id.views);
|
||||
@ -147,6 +149,11 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
||||
} else {
|
||||
viewBg.setVisibility(View.GONE);
|
||||
}
|
||||
if (bean.getRedPacketStatus() == 1) {
|
||||
redPacket.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
redPacket.setVisibility(View.GONE);
|
||||
}
|
||||
RxView.clicks(itemView)
|
||||
.throttleFirst(2, TimeUnit.SECONDS) // 才发送 2s内第1次点击按钮的事件
|
||||
.subscribe(new Observer<Unit>() {
|
||||
|
@ -46,6 +46,7 @@ public class MainHomeLiveWeekItemViewHolder<T> extends RecyclerView.ViewHolder {
|
||||
private List<WeekListBean> weekList = new ArrayList<>();
|
||||
//轮询周星榜的下标
|
||||
private int index = 0;
|
||||
private View redPacket;
|
||||
|
||||
public MainHomeLiveWeekItemViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
@ -53,6 +54,7 @@ public class MainHomeLiveWeekItemViewHolder<T> extends RecyclerView.ViewHolder {
|
||||
itemView.findViewById(R.id.live_info_view).setVisibility(View.GONE);
|
||||
itemView.findViewById(R.id.lt_week_list).setVisibility(View.VISIBLE);
|
||||
imgWeekHead = itemView.findViewById(R.id.img_week_head);
|
||||
redPacket=itemView.findViewById(R.id.red_packet);
|
||||
weekSvga = (SVGAImageView) itemView.findViewById(R.id.week_svga);
|
||||
viewflipperBanner = itemView.findViewById(R.id.viewflipper_banner);
|
||||
imgWeekHead.setVisibility(View.GONE);
|
||||
@ -119,6 +121,11 @@ public class MainHomeLiveWeekItemViewHolder<T> extends RecyclerView.ViewHolder {
|
||||
}
|
||||
bannerHandler.removeCallbacks(mFlipRunnable);
|
||||
bannerHandler.postDelayed(mFlipRunnable, delayMillis);
|
||||
if (bean.getRedPacketStatus() == 1) {
|
||||
redPacket.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
redPacket.setVisibility(View.GONE);
|
||||
}
|
||||
RxView.clicks(itemView)
|
||||
.throttleFirst(2, TimeUnit.SECONDS) // 才发送 2s内第1次点击按钮的事件
|
||||
.subscribe(new Observer<Unit>() {
|
||||
|
@ -0,0 +1,178 @@
|
||||
package com.yunbao.main.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.custom.CommonRefreshView;
|
||||
import com.yunbao.common.custom.ItemDecoration;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.activity.MainActivity;
|
||||
import com.yunbao.main.activity.WeekWebViewActivity;
|
||||
import com.yunbao.main.adapter.MainHomeRemFollLiveAdapter;
|
||||
import com.yunbao.main.http.MainHttpConsts;
|
||||
import com.yunbao.main.http.MainHttpUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 首页红包专区
|
||||
*/
|
||||
public class MainHomeRedPacketLiveViewHolder extends AbsMainHomeChildViewHolder implements OnItemClickListener<LiveBean> {
|
||||
private CommonRefreshView mRefreshView;
|
||||
private MainHomeRemFollLiveAdapter mAdapter;
|
||||
|
||||
public MainHomeRedPacketLiveViewHolder(Context context, ViewGroup parentView) {
|
||||
super(context, parentView);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.view_main_home_live_recom;
|
||||
}
|
||||
|
||||
public static int pp;
|
||||
|
||||
//显示顶部商城tab时,显示底部tabGroup
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onUpdata(String str) {
|
||||
if ("Updata".equals(str)) {
|
||||
if (mRefreshView != null) {
|
||||
mRefreshView.showRefreshBar();
|
||||
mRefreshView.mRecyclerView.scrollToPosition(0);
|
||||
}
|
||||
}else if ("blacklist".equals(str)) {
|
||||
if (mRefreshView != null) {
|
||||
mRefreshView.showRefreshBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
|
||||
mRefreshView = (CommonRefreshView) findViewById(R.id.refreshView);
|
||||
mRefreshView.setEmptyLayoutId(R.layout.view_no_data_live);
|
||||
EventBus.getDefault().register(this);
|
||||
GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 2, GridLayoutManager.VERTICAL, false);
|
||||
mRefreshView.setLayoutManager(gridLayoutManager);
|
||||
ItemDecoration decoration = new ItemDecoration(mContext, 0x00000000, 5, 0);
|
||||
decoration.setOnlySetItemOffsetsButNoDraw(true);
|
||||
mRefreshView.setItemDecoration(decoration);
|
||||
mRefreshView.setRecyclerViewAdapter(mAdapter);
|
||||
mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<LiveBean>() {
|
||||
@Override
|
||||
public RefreshAdapter<LiveBean> getAdapter() {
|
||||
if (mAdapter == null) {
|
||||
mAdapter = new MainHomeRemFollLiveAdapter(mContext, MainActivity.Height);
|
||||
mAdapter.setOnItemClickListener(MainHomeRedPacketLiveViewHolder.this);
|
||||
}
|
||||
return mAdapter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadData(int p, HttpCallback callback) {
|
||||
pp = p;
|
||||
MainHttpUtil.getRedPacket(p, callback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LiveBean> processData(String[] info) {
|
||||
if(pp == 1){
|
||||
return JSON.parseArray(Arrays.toString(info), LiveBean.class);
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshSuccess(List<LiveBean> list, int count) {
|
||||
EventBus.getDefault().post(new AnchorRecommendModel());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshFailure() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMoreSuccess(List<LiveBean> loadItemList, int loadItemCount) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMoreFailure() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
mRefreshView.initData();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onItemClick(LiveBean bean, int position) {
|
||||
if ("1".equals(bean.getIslive())) {
|
||||
Map<String, String> map = bean.getParams();
|
||||
if(map==null){
|
||||
map=new HashMap<>();
|
||||
}
|
||||
map.put("redPacket","true");
|
||||
bean.setParams(map);
|
||||
watchLive(bean, Constants.LIVE_HOME, position);
|
||||
}else if(bean.getIs_week()!=null&&bean.getIs_week().equals("1")){
|
||||
String url = CommonAppConfig.HOST + bean.getUrl()+"?a=1";
|
||||
WeekWebViewActivity.forward(mContext, url, true);
|
||||
} else {
|
||||
RouteUtil.forwardUserHome(mContext, bean.getUid(),0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadData() {
|
||||
// if (mRefreshView != null) {
|
||||
// mRefreshView.initData();
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release() {
|
||||
MainHttpUtil.cancel(MainHttpConsts.GET_RANDOM);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
release();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
}
|
||||
}
|
@ -1,13 +1,15 @@
|
||||
package com.yunbao.main.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.activity.RedPacketListActivity;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/9/22.
|
||||
@ -18,6 +20,7 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
private MainHomeFollLiveViewHolder mainHomeFollLiveViewHolder;
|
||||
private MainHomeLiveViewHolder mainHomeLiveViewHolder;
|
||||
private MainHomeRecomLiveViewHolder mainHomeRecomLiveViewHolder;
|
||||
private MainHomeRedPacketLiveViewHolder mainHomeRedPacketLiveViewHolder;
|
||||
|
||||
private ImageView img_trophy;
|
||||
|
||||
@ -40,6 +43,9 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
|
||||
|
||||
|
||||
}
|
||||
public void setCurPosition(int position){
|
||||
mViewPager.setCurrentItem(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -64,6 +70,9 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
} else if (position == 2) {
|
||||
mainHomeRecomLiveViewHolder = new MainHomeRecomLiveViewHolder(mContext, parent);
|
||||
vh = mainHomeRecomLiveViewHolder;
|
||||
} else if (position == 3) {
|
||||
mainHomeRedPacketLiveViewHolder = new MainHomeRedPacketLiveViewHolder(mContext, parent);
|
||||
vh = mainHomeRedPacketLiveViewHolder;
|
||||
}
|
||||
|
||||
if (vh == null) {
|
||||
@ -81,7 +90,7 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
|
||||
@Override
|
||||
protected int getPageCount() {
|
||||
return 3;
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -90,6 +99,7 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
mContext.getString(R.string.follow),
|
||||
mContext.getString(R.string.hot),
|
||||
mContext.getString(R.string.recomment),
|
||||
mContext.getString(R.string.main_tabs_red_packet),
|
||||
};
|
||||
}
|
||||
|
||||
|
35
main/src/main/res/drawable/bg_float_red_packet.xml
Normal file
35
main/src/main/res/drawable/bg_float_red_packet.xml
Normal file
@ -0,0 +1,35 @@
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!--背景色从左到右色值,渐变-->
|
||||
<item android:id="@android:id/background">
|
||||
|
||||
<shape>
|
||||
<corners android:radius="5dp" />
|
||||
<gradient
|
||||
android:angle="0"
|
||||
android:endColor="#FFF"
|
||||
android:startColor="#FFF" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!--进度条从左到右色值,渐变-->
|
||||
<item android:id="@android:id/progress">
|
||||
<clip
|
||||
>
|
||||
<scale android:scaleWidth="100%">
|
||||
<shape>
|
||||
<corners
|
||||
android:bottomLeftRadius="5dp"
|
||||
android:radius="5dp"
|
||||
android:topLeftRadius="5dp" />
|
||||
|
||||
<gradient
|
||||
android:angle="0"
|
||||
android:endColor="#E11111"
|
||||
android:startColor="#E11111" />
|
||||
</shape>
|
||||
</scale>
|
||||
</clip>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
38
main/src/main/res/layout/activity_red_packet.xml
Normal file
38
main/src/main/res/layout/activity_red_packet.xml
Normal file
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<include
|
||||
android:id="@+id/include3"
|
||||
layout="@layout/view_title2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView12"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="28dp"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:background="#F5F5F5"
|
||||
android:text="@string/red_packet_list_tips"
|
||||
android:textColor="#000000"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/include3" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/white"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:listitem="@layout/item_red_packet"
|
||||
tools:itemCount="10"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView12" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
231
main/src/main/res/layout/activity_red_packet_info.xml
Normal file
231
main/src/main/res/layout/activity_red_packet_info.xml
Normal file
@ -0,0 +1,231 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_back"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:onClick="backClick"
|
||||
android:padding="9dp"
|
||||
android:src="@mipmap/icon_back"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="@color/textColor" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="74dp"
|
||||
android:layout_height="74dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btn_back"
|
||||
app:srcCompat="@mipmap/icon_diamond2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:text="TextView"
|
||||
android:textColor="#000000"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/money"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="TextView"
|
||||
android:textColor="#000000"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/Popularity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/red_packet_user_tips2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/money" />
|
||||
|
||||
<View
|
||||
android:id="@+id/line"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:background="?android:attr/listDivider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/Popularity" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/line">
|
||||
|
||||
<TextView
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/red_packet_info_status"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/red_packet_status"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/red_packet_info_status_timeout"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/status">
|
||||
|
||||
<TextView
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/red_packet_info_details"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/red_packet_info"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/red_packet_info_details_check"
|
||||
android:textColor="#1E73D7"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/timer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/info">
|
||||
|
||||
<TextView
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/red_packet_info_pay_time"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/red_packet_timer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="2023年6月6日 13:50:52"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/play_model"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/timer">
|
||||
|
||||
<TextView
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/red_packet_info_mode"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/red_packet_model"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/red_packet_info_mode_diamond"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/backAccount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/play_model">
|
||||
|
||||
<TextView
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/red_packet_info_residue"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/gold_icon"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
app:srcCompat="@mipmap/gold_coin" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/backAccountText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/red_packet_info_residue_none"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
105
main/src/main/res/layout/activity_red_packet_users.xml
Normal file
105
main/src/main/res/layout/activity_red_packet_users.xml
Normal file
@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_back"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:onClick="backClick"
|
||||
android:padding="9dp"
|
||||
android:src="@mipmap/icon_back"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="@color/textColor" />
|
||||
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btn_back"
|
||||
app:riv_border_color="#FFFFFF"
|
||||
app:riv_border_width="2dp"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:text="TextView"
|
||||
android:textColor="#000000"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/avatar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/money"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="TextView"
|
||||
android:textColor="#000000"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/money"
|
||||
app:layout_constraintTop_toTopOf="@+id/money"
|
||||
app:srcCompat="@mipmap/gold_coin" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/open_packet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:text="已打開 11/20"
|
||||
android:textColor="#000000"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/line"
|
||||
app:layout_constraintStart_toStartOf="@+id/line" />
|
||||
|
||||
<View
|
||||
android:id="@+id/line"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="55dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:background="?android:attr/listDivider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/money" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
tools:listitem="@layout/item_user_red_packet"
|
||||
tools:itemCount="10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/line"
|
||||
app:layout_constraintStart_toStartOf="@+id/line"
|
||||
app:layout_constraintTop_toBottomOf="@+id/line" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,6 +1,7 @@
|
||||
<?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="wrap_content"
|
||||
android:gravity="center"
|
||||
@ -11,277 +12,291 @@
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/live_info_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<com.yunbao.common.custom.MyRelativeLayout5
|
||||
<LinearLayout
|
||||
android:id="@+id/live_info_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="9dp"
|
||||
android:paddingLeft="5dp">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/cover"
|
||||
<com.yunbao.common.custom.MyRelativeLayout5
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_corner_radius="10dp" />
|
||||
android:layout_marginBottom="9dp"
|
||||
android:paddingLeft="5dp">
|
||||
|
||||
<com.yunbao.common.custom.RatioRoundImageView
|
||||
android:id="@+id/bgs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:src="@mipmap/bg_main_item_bottom"
|
||||
app:ri_ratio="0.5"
|
||||
app:riv_corner_radius="10dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/live_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/views"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:background="@mipmap/live_zt">
|
||||
<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="10dp" />
|
||||
|
||||
<com.yunbao.common.custom.RatioRoundImageView
|
||||
android:id="@+id/bgs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:src="@mipmap/bg_main_item_bottom"
|
||||
app:ri_ratio="0.5"
|
||||
app:riv_corner_radius="10dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tv_live_ico"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="5dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="5dp"
|
||||
android:src="@mipmap/icon_main_rest_work" />
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_live_state"
|
||||
<ImageView
|
||||
android:id="@+id/live_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingLeft="8dp"
|
||||
android:text="休息"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="10sp" />
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center" />
|
||||
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/views"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:background="@mipmap/live_zt">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:id="@+id/tv_live_ico"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="5dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="5dp"
|
||||
android:src="@mipmap/icon_main_rest_work" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_live_state"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingLeft="8dp"
|
||||
android:text="休息"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="10sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/type"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="16dp"
|
||||
android:scaleType="fitXY" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="#fff"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<com.yunbao.common.custom.DrawableTextView
|
||||
android:id="@+id/num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="#B3ffffff"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
app:dt_left_drawable="@mipmap/icon_main_live_num"
|
||||
app:dt_left_height="14dp"
|
||||
app:dt_left_width="14dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/pk_avatar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_border_color="@color/color_white"
|
||||
app:riv_border_width="0.8dp"
|
||||
app:riv_corner_radius="2dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/type"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="16dp"
|
||||
android:scaleType="fitXY" />
|
||||
android:id="@+id/pk_ico"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="33dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:src="@mipmap/live_pk" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="#fff"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<com.yunbao.common.custom.DrawableTextView
|
||||
android:id="@+id/num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="#B3ffffff"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
app:dt_left_drawable="@mipmap/icon_main_live_num"
|
||||
app:dt_left_height="14dp"
|
||||
app:dt_left_width="14dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/pk_avatar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_border_color="@color/color_white"
|
||||
app:riv_border_width="0.8dp"
|
||||
app:riv_corner_radius="2dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pk_ico"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="33dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:src="@mipmap/live_pk" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dr_pk_ico"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:src="@mipmap/multiplayerpk" />
|
||||
<ImageView
|
||||
android:id="@+id/dr_pk_ico"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:src="@mipmap/multiplayerpk" />
|
||||
|
||||
|
||||
</com.yunbao.common.custom.MyRelativeLayout5>
|
||||
</com.yunbao.common.custom.MyRelativeLayout5>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lt_week_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.yunbao.common.custom.MyRelativeLayout5
|
||||
<LinearLayout
|
||||
android:id="@+id/lt_week_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="9dp"
|
||||
android:paddingLeft="5dp">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<ViewFlipper
|
||||
android:id="@+id/viewflipper_banner"
|
||||
<com.yunbao.common.custom.MyRelativeLayout5
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:flipInterval="1000"
|
||||
android:visibility="gone"
|
||||
android:layout_margin="3dp"
|
||||
android:inAnimation="@anim/vice_screen_come_in"
|
||||
android:outAnimation="@anim/vice_screen_come_out" />
|
||||
android:layout_marginBottom="9dp"
|
||||
android:paddingLeft="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_week_head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="3dp"
|
||||
android:background="@color/transparent"
|
||||
android:src="@mipmap/chat_head_mo"
|
||||
android:visibility="visible" />
|
||||
<ViewFlipper
|
||||
android:id="@+id/viewflipper_banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="3dp"
|
||||
android:flipInterval="1000"
|
||||
android:inAnimation="@anim/vice_screen_come_in"
|
||||
android:outAnimation="@anim/vice_screen_come_out"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_week_head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="3dp"
|
||||
android:background="@color/transparent"
|
||||
android:src="@mipmap/chat_head_mo"
|
||||
android:visibility="visible" />
|
||||
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/week_svga"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
app:autoPlay="true" />
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/week_svga"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
app:autoPlay="true" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginBottom="12dp">
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name2"
|
||||
android:layout_width="wrap_content"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginBottom="12dp">
|
||||
|
||||
<com.yunbao.common.custom.DrawableTextView
|
||||
android:id="@+id/num2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="#B3ffffff"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
app:dt_left_drawable="@mipmap/icon_main_live_num"
|
||||
app:dt_left_height="14dp"
|
||||
app:dt_left_width="14dp" />
|
||||
<TextView
|
||||
android:id="@+id/name2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</com.yunbao.common.custom.MyRelativeLayout5>
|
||||
<com.yunbao.common.custom.DrawableTextView
|
||||
android:id="@+id/num2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="#B3ffffff"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
app:dt_left_drawable="@mipmap/icon_main_live_num"
|
||||
app:dt_left_height="14dp"
|
||||
app:dt_left_width="14dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</com.yunbao.common.custom.MyRelativeLayout5>
|
||||
|
||||
<com.xj.marqueeview.MarqueeView
|
||||
android:id="@+id/rv_ranking_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginBottom="9dp"
|
||||
android:background="@drawable/border_f1f1f1"
|
||||
android:visibility="gone"
|
||||
app:mvDirection="bottom_to_top"
|
||||
app:mvInterval="3000" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.xj.marqueeview.MarqueeView
|
||||
android:id="@+id/rv_ranking_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginBottom="9dp"
|
||||
android:background="@drawable/border_f1f1f1"
|
||||
android:visibility="gone"
|
||||
app:mvDirection="bottom_to_top"
|
||||
app:mvInterval="3000">
|
||||
|
||||
</com.xj.marqueeview.MarqueeView>
|
||||
|
||||
<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" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
62
main/src/main/res/layout/view_float_red_packet.xml
Normal file
62
main/src/main/res/layout/view_float_red_packet.xml
Normal file
@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout4"
|
||||
android:layout_width="122dp"
|
||||
android:layout_height="41dp"
|
||||
android:layout_marginStart="9dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:background="@mipmap/bg_float_red_packet"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="7dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:max="100"
|
||||
android:progress="60"
|
||||
android:progressDrawable="@drawable/bg_float_red_packet"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/progressText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:text="68/100"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView9"
|
||||
android:layout_width="31dp"
|
||||
android:layout_height="40dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/icon_red_packet" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="76dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginBottom="-10dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/constraintLayout4"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@mipmap/icon_red_packet_float_text_zh" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,5 +1,6 @@
|
||||
<RelativeLayout 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:id="@+id/rootView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -154,19 +155,31 @@
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<View
|
||||
android:id="@+id/banner_click"
|
||||
android:layout_width="123dp"
|
||||
android:layout_height="35.33dp"
|
||||
android:layout_above="@id/rt_main_tab"
|
||||
android:layout_above="@id/red_packet"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<include
|
||||
android:id="@+id/red_packet"
|
||||
layout="@layout/view_float_red_packet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/rt_main_tab"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="12dp"
|
||||
android:layout_marginBottom="10dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
Loading…
Reference in New Issue
Block a user