add 新增红包专区
add 新增红包专区进去是只有发放红包的直播间 add 新增首页红包浮窗 add 新增红包记录
This commit is contained in:
parent
6a6696f355
commit
da7ebb2663
@ -17,6 +17,8 @@ public class AnchorRecommendModel extends BaseModel {
|
|||||||
//是否展示0=不展示1=展示
|
//是否展示0=不展示1=展示
|
||||||
@SerializedName("list_show")
|
@SerializedName("list_show")
|
||||||
private int listShow = 0;
|
private int listShow = 0;
|
||||||
|
@SerializedName("red_packet_show")
|
||||||
|
private int showRedPacket = 0;//是否显示首页红包浮窗
|
||||||
//是否支持换一批0=不支持 1=支持
|
//是否支持换一批0=不支持 1=支持
|
||||||
@SerializedName("up_show")
|
@SerializedName("up_show")
|
||||||
private int upShow = 0;
|
private int upShow = 0;
|
||||||
@ -24,6 +26,10 @@ public class AnchorRecommendModel extends BaseModel {
|
|||||||
private List<AnchorRecommendItemModel> list = new ArrayList<>();
|
private List<AnchorRecommendItemModel> list = new ArrayList<>();
|
||||||
@SerializedName("slide")
|
@SerializedName("slide")
|
||||||
private List<SlideInfoModel> slide = new ArrayList<>();
|
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() {
|
public List<SlideInfoModel> getSlide() {
|
||||||
return slide;
|
return slide;
|
||||||
@ -52,6 +58,30 @@ public class AnchorRecommendModel extends BaseModel {
|
|||||||
return this;
|
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() {
|
public List<AnchorRecommendItemModel> getList() {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@ -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.alibaba.fastjson.JSONObject;
|
||||||
import com.yunbao.common.bean.ActiveModel;
|
import com.yunbao.common.bean.ActiveModel;
|
||||||
|
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||||
import com.yunbao.common.bean.BaseModel;
|
import com.yunbao.common.bean.BaseModel;
|
||||||
import com.yunbao.common.bean.BlindBoxInfoModel;
|
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.LiveAiRobotBean;
|
||||||
import com.yunbao.common.bean.LiveAnchorCallMeModel;
|
import com.yunbao.common.bean.LiveAnchorCallMeModel;
|
||||||
import com.yunbao.common.bean.LiveAnchorSayModel;
|
import com.yunbao.common.bean.LiveAnchorSayModel;
|
||||||
|
import com.yunbao.common.bean.LiveBean;
|
||||||
import com.yunbao.common.bean.LiveDataInfoModel;
|
import com.yunbao.common.bean.LiveDataInfoModel;
|
||||||
import com.yunbao.common.bean.LiveInfoModel;
|
import com.yunbao.common.bean.LiveInfoModel;
|
||||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
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.PrankHttpTurntableBean;
|
||||||
import com.yunbao.common.bean.RandomPkUserBean;
|
import com.yunbao.common.bean.RandomPkUserBean;
|
||||||
import com.yunbao.common.bean.RankPkInfoBean;
|
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.SearchModel;
|
||||||
import com.yunbao.common.bean.SetAttentsModel;
|
import com.yunbao.common.bean.SetAttentsModel;
|
||||||
import com.yunbao.common.bean.SlideInBannerModel;
|
import com.yunbao.common.bean.SlideInBannerModel;
|
||||||
@ -730,4 +734,23 @@ public interface PDLiveApi {
|
|||||||
*/
|
*/
|
||||||
@GET("/api/public/?service=Live.getBlindBoxInfo")
|
@GET("/api/public/?service=Live.getBlindBoxInfo")
|
||||||
Observable<ResponseModel<List<BlindBoxInfoModel>>> 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.PrankHttpTurntableBean;
|
||||||
import com.yunbao.common.bean.RandomPkUserBean;
|
import com.yunbao.common.bean.RandomPkUserBean;
|
||||||
import com.yunbao.common.bean.RankPkInfoBean;
|
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.SetAttentsModel;
|
||||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||||
import com.yunbao.common.bean.UserAreaBean;
|
import com.yunbao.common.bean.UserAreaBean;
|
||||||
@ -1550,7 +1552,54 @@ public class LiveNetManager {
|
|||||||
}
|
}
|
||||||
}).isDisposed();
|
}).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 android.app.Activity;
|
||||||
|
|
||||||
|
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||||
import com.yunbao.common.bean.BaseModel;
|
|
||||||
import com.yunbao.common.bean.FaceBookUpModel;
|
import com.yunbao.common.bean.FaceBookUpModel;
|
||||||
import com.yunbao.common.bean.IMLoginModel;
|
import com.yunbao.common.bean.IMLoginModel;
|
||||||
import com.yunbao.common.bean.MsgSwitchDetailModel;
|
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.ResponseData;
|
||||||
import com.yunbao.common.http.ResponseModel;
|
import com.yunbao.common.http.ResponseModel;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -207,13 +206,14 @@ public class MainNetManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取推送关注的设置和关注列表
|
* 获取推送关注的设置和关注列表
|
||||||
|
*
|
||||||
* @param callback
|
* @param callback
|
||||||
*/
|
*/
|
||||||
public void getMsgSwitchDetail(HttpCallback<MsgSwitchDetailModel> callback) {
|
public void getMsgSwitchDetail(HttpCallback<MsgSwitchDetailModel> callback) {
|
||||||
API.get().pdLiveApi(mContext).getMsgSwitchDetail()
|
API.get().pdLiveApi(mContext).getMsgSwitchDetail()
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(msgSwitchDetailModelResponseModel -> {
|
.subscribe(msgSwitchDetailModelResponseModel -> {
|
||||||
if (callback != null) {
|
if (callback != null) {
|
||||||
MsgSwitchDetailModel msgSwitchDetailModel = msgSwitchDetailModelResponseModel.getData().getInfo();
|
MsgSwitchDetailModel msgSwitchDetailModel = msgSwitchDetailModelResponseModel.getData().getInfo();
|
||||||
callback.onSuccess(msgSwitchDetailModel);
|
callback.onSuccess(msgSwitchDetailModel);
|
||||||
@ -227,13 +227,14 @@ public class MainNetManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 推送开关设置
|
* 推送开关设置
|
||||||
|
*
|
||||||
* @param callback
|
* @param callback
|
||||||
*/
|
*/
|
||||||
public void setMsgMasterSwitch(String status,String type,HttpCallback<ResponseData> callback) {
|
public void setMsgMasterSwitch(String status, String type, HttpCallback<ResponseData> callback) {
|
||||||
API.get().pdLiveApi(mContext).setMsgMasterSwitch(status,type)
|
API.get().pdLiveApi(mContext).setMsgMasterSwitch(status, type)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(BaseModel -> {
|
.subscribe(BaseModel -> {
|
||||||
if (callback != null) {
|
if (callback != null) {
|
||||||
ResponseData responseData = BaseModel.getData();
|
ResponseData responseData = BaseModel.getData();
|
||||||
callback.onSuccess(responseData);
|
callback.onSuccess(responseData);
|
||||||
@ -247,13 +248,14 @@ public class MainNetManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 主播开播推送开关设置
|
* 主播开播推送开关设置
|
||||||
|
*
|
||||||
* @param callback
|
* @param callback
|
||||||
*/
|
*/
|
||||||
public void setBeginShowMsgSwitch(String status,String isAll,String liveuid,HttpCallback<ResponseData> callback) {
|
public void setBeginShowMsgSwitch(String status, String isAll, String liveuid, HttpCallback<ResponseData> callback) {
|
||||||
API.get().pdLiveApi(mContext).setBeginShowMsgSwitch(status,isAll,liveuid)
|
API.get().pdLiveApi(mContext).setBeginShowMsgSwitch(status, isAll, liveuid)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(BaseModel -> {
|
.subscribe(BaseModel -> {
|
||||||
if (callback != null) {
|
if (callback != null) {
|
||||||
ResponseData responseData = BaseModel.getData();
|
ResponseData responseData = BaseModel.getData();
|
||||||
callback.onSuccess(responseData);
|
callback.onSuccess(responseData);
|
||||||
@ -264,5 +266,22 @@ public class MainNetManager {
|
|||||||
}
|
}
|
||||||
}).isDisposed();
|
}).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.Constants;
|
||||||
import com.yunbao.common.HtmlConfig;
|
import com.yunbao.common.HtmlConfig;
|
||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
|
import com.yunbao.common.bean.RedPacketListBean;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
@ -39,6 +40,9 @@ public class RouteUtil {
|
|||||||
public static final String PATH_MYWEBVIEWACTIVTITY2 = "/main/MyWebViewActivity2";
|
public static final String PATH_MYWEBVIEWACTIVTITY2 = "/main/MyWebViewActivity2";
|
||||||
public static final String PATH_LOGIN = "/main/LoginActivity";
|
public static final String PATH_LOGIN = "/main/LoginActivity";
|
||||||
public static final String PATH_CS = "/main/CustomerServiceWebViewActivity";
|
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) {
|
public static void forwardFansActivity(String uid) {
|
||||||
ARouter.getInstance().build(PATH_FANSACTIVITY)
|
ARouter.getInstance().build(PATH_FANSACTIVITY)
|
||||||
@ -80,6 +84,7 @@ public class RouteUtil {
|
|||||||
.withBoolean("forwardEntry", true)
|
.withBoolean("forwardEntry", true)
|
||||||
.navigation();
|
.navigation();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 只回到登录页,不提示东西
|
* 只回到登录页,不提示东西
|
||||||
*/
|
*/
|
||||||
@ -188,6 +193,7 @@ public class RouteUtil {
|
|||||||
ARouter.getInstance().build(PATH_EDITPROFILE)
|
ARouter.getInstance().build(PATH_EDITPROFILE)
|
||||||
.navigation();
|
.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)
|
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();
|
.navigation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:layout_marginStart="21dp"
|
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
@ -27,7 +26,7 @@
|
|||||||
app:layout_constraintEnd_toStartOf="@+id/money"
|
app:layout_constraintEnd_toStartOf="@+id/money"
|
||||||
android:layout_marginEnd="2dp"
|
android:layout_marginEnd="2dp"
|
||||||
app:layout_constraintTop_toTopOf="@+id/money"
|
app:layout_constraintTop_toTopOf="@+id/money"
|
||||||
app:srcCompat="@mipmap/diamond" />
|
app:srcCompat="@mipmap/gold_coin" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/linearLayout"
|
android:id="@+id/linearLayout"
|
||||||
@ -62,7 +61,6 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:layout_marginEnd="26dp"
|
|
||||||
android:text="TextView"
|
android:text="TextView"
|
||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<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_width="match_parent"
|
||||||
android:layout_height="72dp"
|
android:layout_height="72dp"
|
||||||
android:background="@color/white"
|
android:background="@color/white"
|
||||||
@ -44,13 +46,25 @@
|
|||||||
android:id="@+id/rView"
|
android:id="@+id/rView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_toLeftOf="@+id/redPacketMain"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="@color/textColor"
|
android:textColor="@color/textColor"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
android:layout_marginRight="25dp"
|
android:textStyle="bold"
|
||||||
android:text="@string/not_received"
|
android:text="@string/not_received"
|
||||||
android:visibility="gone"
|
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>
|
</RelativeLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:onClick="backClick"
|
android:onClick="backClick"
|
||||||
android:padding="9dp"
|
android:padding="9dp"
|
||||||
android:src="@mipmap/icon_dialog_charge_close"
|
android:src="@mipmap/icon_back"
|
||||||
android:tint="@color/textColor" />
|
android:tint="@color/textColor" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
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 |
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="rebot_config_auto_say_max">Over the maximum value</string>
|
||||||
<string name="insufficient_balance">Insufficient balance, continue to recharge</string>
|
<string name="insufficient_balance">Insufficient balance, continue to recharge</string>
|
||||||
<string name="live_setting_gap_3">Time limit gag</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>
|
</resources>
|
||||||
|
@ -1191,4 +1191,20 @@
|
|||||||
<string name="rebot_config_auto_say_max">超过最大值</string>
|
<string name="rebot_config_auto_say_max">超过最大值</string>
|
||||||
<string name="insufficient_balance">餘額不足,繼續充值</string>
|
<string name="insufficient_balance">餘額不足,繼續充值</string>
|
||||||
<string name="live_setting_gap_3">期限禁言</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>
|
</resources>
|
||||||
|
@ -1190,4 +1190,20 @@
|
|||||||
<string name="rebot_config_auto_say_max">超过最大值</string>
|
<string name="rebot_config_auto_say_max">超过最大值</string>
|
||||||
<string name="insufficient_balance">餘額不足,繼續充值</string>
|
<string name="insufficient_balance">餘額不足,繼續充值</string>
|
||||||
<string name="live_setting_gap_3">期限禁言</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>
|
</resources>
|
||||||
|
@ -1191,4 +1191,20 @@
|
|||||||
<string name="rebot_config_auto_say_max">超过最大值</string>
|
<string name="rebot_config_auto_say_max">超过最大值</string>
|
||||||
<string name="insufficient_balance">餘額不足,繼續充值</string>
|
<string name="insufficient_balance">餘額不足,繼續充值</string>
|
||||||
<string name="live_setting_gap_3">期限禁言</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>
|
</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="rebot_config_auto_say_max">Over the maximum value</string>
|
||||||
<string name="insufficient_balance">Insufficient balance, continue to recharge</string>
|
<string name="insufficient_balance">Insufficient balance, continue to recharge</string>
|
||||||
<string name="live_setting_gap_3">Time limit gag</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>
|
</resources>
|
||||||
|
@ -5,7 +5,7 @@ ext {
|
|||||||
minSdkVersion : 21,
|
minSdkVersion : 21,
|
||||||
targetSdkVersion : 31,
|
targetSdkVersion : 31,
|
||||||
versionCode : 430,
|
versionCode : 430,
|
||||||
versionName : "6.5.2"
|
versionName : "6.5.3"
|
||||||
]
|
]
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
//正式、
|
//正式、
|
||||||
@ -24,7 +24,7 @@ ext {
|
|||||||
baiduAppKey : "zgCgFhUKEOV7I3ZXDFpTfnRB",
|
baiduAppKey : "zgCgFhUKEOV7I3ZXDFpTfnRB",
|
||||||
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
|
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
|
||||||
// true表示谷歌支付 false
|
// true表示谷歌支付 false
|
||||||
isGooglePlay : false,
|
isGooglePlay : true,
|
||||||
//是否上报异常日志
|
//是否上报异常日志
|
||||||
isUploadLog : true,
|
isUploadLog : true,
|
||||||
//是否打包成插件包模式
|
//是否打包成插件包模式
|
||||||
|
@ -159,6 +159,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
private View titleLine;
|
private View titleLine;
|
||||||
private boolean liveIndex = true;
|
private boolean liveIndex = true;
|
||||||
private boolean isPk = false;
|
private boolean isPk = false;
|
||||||
|
private boolean isRadPacetModle = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends View> T findViewById(@IdRes int id) {
|
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 ? "金山云" : "腾讯云"));
|
L.e(TAG, "直播sdk----->" + (mLiveSDK == Constants.LIVE_SDK_KSY ? "金山云" : "腾讯云"));
|
||||||
mLiveType = intent.getIntExtra(Constants.LIVE_TYPE, Constants.LIVE_TYPE_NORMAL);
|
mLiveType = intent.getIntExtra(Constants.LIVE_TYPE, Constants.LIVE_TYPE_NORMAL);
|
||||||
mLiveTypeVal = intent.getIntExtra(Constants.LIVE_TYPE_VAL, 0);
|
mLiveTypeVal = intent.getIntExtra(Constants.LIVE_TYPE_VAL, 0);
|
||||||
|
isRadPacetModle = !StringUtil.isEmpty(intent.getStringExtra("redPacket")) && intent.getStringExtra("redPacket").equals("true");
|
||||||
initView();
|
initView();
|
||||||
setVolumeControlStream(AudioManager.STREAM_MUSIC);
|
setVolumeControlStream(AudioManager.STREAM_MUSIC);
|
||||||
manager = new PortraitLiveManager(this, intent);
|
manager = new PortraitLiveManager(this, intent);
|
||||||
@ -267,21 +269,40 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
manager.resetLight();
|
manager.resetLight();
|
||||||
Log.e(TAG, "mCurrentItem:" + mCurrentItem);
|
Log.e(TAG, "mCurrentItem:" + mCurrentItem);
|
||||||
if (mCurrentItem == itemModelList.size() - 1) {
|
if (mCurrentItem == itemModelList.size() - 1) {
|
||||||
MainNetManager.get(mContext)
|
if (isRadPacetModle) {//从红包专区进去的走红包专区列表
|
||||||
.anchorRecommendType("30", new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
|
MainNetManager.get(mContext)
|
||||||
@Override
|
.getRedPacket(new com.yunbao.common.http.base.HttpCallback<List<AnchorRecommendItemModel>>() {
|
||||||
public void onSuccess(AnchorRecommendModel data) {
|
@Override
|
||||||
if (TextUtils.equals(data.getList().get(0).getUid(), mLiveBean.getUid())) {
|
public void onSuccess(List<AnchorRecommendItemModel> data) {
|
||||||
data.getList().remove(0);
|
if (TextUtils.equals(data.get(0).getUid(), mLiveBean.getUid())) {
|
||||||
|
data.remove(0);
|
||||||
|
}
|
||||||
|
itemModelList.addAll(data);
|
||||||
|
mPagerAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
itemModelList.addAll(data.getList());
|
|
||||||
mPagerAdapter.notifyDataSetChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
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")) {
|
if (TextUtils.equals(htmlUrl, "recharge")) {
|
||||||
RouteUtil.forwardMyCoin(mContext);
|
RouteUtil.forwardMyCoin(mContext);
|
||||||
} else if (TextUtils.equals(htmlUrl, "to_me_information")) {
|
} else if (TextUtils.equals(htmlUrl, "to_me_information")) {
|
||||||
RouteUtil.forwardEditProfileActivity();
|
RouteUtil.forwardEditProfileActivity();
|
||||||
} else {
|
} else {
|
||||||
if (!screen) {
|
if (!screen) {
|
||||||
ZhuangBanActivity.forward(mContext, htmlUrl, false);
|
ZhuangBanActivity.forward(mContext, htmlUrl, false);
|
||||||
|
@ -26,6 +26,7 @@ import android.view.Window;
|
|||||||
import android.view.animation.DecelerateInterpolator;
|
import android.view.animation.DecelerateInterpolator;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
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.SpUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.VersionUtil;
|
import com.yunbao.common.utils.VersionUtil;
|
||||||
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.common.views.APKUpdateCustomPopup;
|
import com.yunbao.common.views.APKUpdateCustomPopup;
|
||||||
import com.yunbao.common.views.AbsMainViewHolder;
|
import com.yunbao.common.views.AbsMainViewHolder;
|
||||||
import com.yunbao.common.views.floatingview.APPEasyFloat;
|
import com.yunbao.common.views.floatingview.APPEasyFloat;
|
||||||
@ -191,6 +193,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
private FloatBannerView floatBanner;
|
private FloatBannerView floatBanner;
|
||||||
private boolean isfloatBannernet = true, isFirst = true;
|
private boolean isfloatBannernet = true, isFirst = true;
|
||||||
|
|
||||||
|
private View floatRedPacket;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
@ -236,6 +240,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
rt_main_tab = (RelativeLayout) findViewById(R.id.rt_main_tab);
|
rt_main_tab = (RelativeLayout) findViewById(R.id.rt_main_tab);
|
||||||
v_table_redpoint = findViewById(R.id.v_table_redpoint);
|
v_table_redpoint = findViewById(R.id.v_table_redpoint);
|
||||||
v_table_redpoint_me = (View) findViewById(R.id.v_table_redpoint_me);
|
v_table_redpoint_me = (View) findViewById(R.id.v_table_redpoint_me);
|
||||||
|
floatRedPacket = findViewById(R.id.red_packet);
|
||||||
|
initRedPacket();
|
||||||
|
|
||||||
Display mDisplay = getWindowManager().getDefaultDisplay();
|
Display mDisplay = getWindowManager().getDefaultDisplay();
|
||||||
Height = mDisplay.getHeight();
|
Height = mDisplay.getHeight();
|
||||||
@ -485,12 +491,14 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
initAnchorRecommendBanner();
|
initAnchorRecommendBanner();
|
||||||
} else if (index == 2) {
|
} else if (index == 2) {
|
||||||
floatBanner.setVisibility(View.GONE);
|
floatBanner.setVisibility(View.GONE);
|
||||||
|
floatRedPacket.setVisibility(View.GONE);
|
||||||
findViewById(R.id.banner_click).setVisibility(View.GONE);
|
findViewById(R.id.banner_click).setVisibility(View.GONE);
|
||||||
isfloatBannernet = false;
|
isfloatBannernet = false;
|
||||||
if (mainMessageViewHolder != null)
|
if (mainMessageViewHolder != null)
|
||||||
mainMessageViewHolder.onResume();
|
mainMessageViewHolder.onResume();
|
||||||
} else {
|
} else {
|
||||||
floatBanner.setVisibility(View.GONE);
|
floatBanner.setVisibility(View.GONE);
|
||||||
|
floatRedPacket.setVisibility(View.GONE);
|
||||||
findViewById(R.id.banner_click).setVisibility(View.GONE);
|
findViewById(R.id.banner_click).setVisibility(View.GONE);
|
||||||
isfloatBannernet = false;
|
isfloatBannernet = false;
|
||||||
}
|
}
|
||||||
@ -561,6 +569,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
if (!isfloatBannernet) return;
|
if (!isfloatBannernet) return;
|
||||||
MainNetManager.get(mContext)
|
MainNetManager.get(mContext)
|
||||||
.anchorRecommend("10", new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
|
.anchorRecommend("10", new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(AnchorRecommendModel data) {
|
public void onSuccess(AnchorRecommendModel data) {
|
||||||
if (isFinishing()) return;
|
if (isFinishing()) return;
|
||||||
@ -572,6 +581,14 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
floatBanner.setVisibility(View.GONE);
|
floatBanner.setVisibility(View.GONE);
|
||||||
findViewById(R.id.banner_click).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).getNoviceInstructor();
|
||||||
NoviceInstructorManager.get(mContext).checktHomeZdyPop();
|
NoviceInstructorManager.get(mContext).checktHomeZdyPop();
|
||||||
if (!isFirst) {
|
initAnchorRecommendBanner();
|
||||||
initAnchorRecommendBanner();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1232,6 +1247,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
} else {
|
} else {
|
||||||
isfloatBannernet = false;
|
isfloatBannernet = false;
|
||||||
floatBanner.setVisibility(View.GONE);
|
floatBanner.setVisibility(View.GONE);
|
||||||
|
floatRedPacket.setVisibility(View.GONE);
|
||||||
findViewById(R.id.banner_click).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);
|
GoogleBillingUtilNew.getInstance().initGooglePay(mContext);
|
||||||
vp_content = (ViewPager) findViewById(R.id.vp_content);
|
vp_content = (ViewPager) findViewById(R.id.vp_content);
|
||||||
TextView rView = (TextView) findViewById(R.id.rView);
|
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 -> {
|
rView.setOnClickListener(v -> {
|
||||||
LoadingDialog loadingDialog = new LoadingDialog();
|
LoadingDialog loadingDialog = new LoadingDialog();
|
||||||
loadingDialog.show(getSupportFragmentManager(), "LoadingDialog");
|
loadingDialog.show(getSupportFragmentManager(), "LoadingDialog");
|
||||||
|
@ -1,29 +1,82 @@
|
|||||||
package com.yunbao.main.activity;
|
package com.yunbao.main.activity;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.yunbao.common.activity.AbsActivity;
|
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;
|
import com.yunbao.main.R;
|
||||||
|
|
||||||
public class RedPacketInfoActivity extends AbsActivity implements View.OnClickListener{
|
@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
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
return R.layout.activity_red_packet_info;
|
return R.layout.activity_red_packet_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
@Override
|
@Override
|
||||||
protected void main() {
|
protected void main() {
|
||||||
super.main();
|
super.main();
|
||||||
findViewById(R.id.red_packet_info).setOnClickListener(this);
|
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
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
int id=v.getId();
|
int id = v.getId();
|
||||||
if(id==R.id.red_packet_info){
|
if (id == R.id.red_packet_info) {
|
||||||
startActivity(new Intent(this, RedPacketUsersActivity.class));
|
RouteUtil.forwardRedPacketUser(bean.getId());
|
||||||
|
} else if (id == R.id.btn_back) {
|
||||||
|
finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,14 +5,18 @@ import android.widget.TextView;
|
|||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.yunbao.common.activity.AbsActivity;
|
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.R;
|
||||||
import com.yunbao.main.adapter.RedPacketListRecyclerAdapter;
|
import com.yunbao.main.adapter.RedPacketListRecyclerAdapter;
|
||||||
import com.yunbao.main.bean.RedPacketListBean;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@Route(path = RouteUtil.PATH_RED_PACKET_LIST)
|
||||||
public class RedPacketListActivity extends AbsActivity {
|
public class RedPacketListActivity extends AbsActivity {
|
||||||
private RecyclerView recyclerView;
|
private RecyclerView recyclerView;
|
||||||
private RedPacketListRecyclerAdapter adapter;
|
private RedPacketListRecyclerAdapter adapter;
|
||||||
@ -25,7 +29,7 @@ public class RedPacketListActivity extends AbsActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void main() {
|
public void main() {
|
||||||
super.main();
|
super.main();
|
||||||
((TextView) findViewById(R.id.titleView)).setText("紅包記錄");
|
((TextView) findViewById(R.id.titleView)).setText(mContext.getString(R.string.red_packet_list_title));
|
||||||
recyclerView = findViewById(R.id.recyclerView);
|
recyclerView = findViewById(R.id.recyclerView);
|
||||||
|
|
||||||
adapter = new RedPacketListRecyclerAdapter(this);
|
adapter = new RedPacketListRecyclerAdapter(this);
|
||||||
@ -35,15 +39,17 @@ public class RedPacketListActivity extends AbsActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initData() {
|
private void initData() {
|
||||||
List<RedPacketListBean> list = new ArrayList<>();
|
LiveNetManager.get(mContext)
|
||||||
for (int i = 1; i <= 5; i++) {
|
.getRedPacketList(new HttpCallback<List<RedPacketListBean>>() {
|
||||||
RedPacketListBean bean = new RedPacketListBean();
|
@Override
|
||||||
bean.setTitle("攢人氣紅包" + i);
|
public void onSuccess(List<RedPacketListBean> data) {
|
||||||
bean.setTimer("X月X日 " + i);
|
adapter.setList(data);
|
||||||
bean.setMoney(i * 1000 + "");
|
}
|
||||||
list.add(bean);
|
|
||||||
}
|
|
||||||
adapter.setList(list);
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,36 @@
|
|||||||
package com.yunbao.main.activity;
|
package com.yunbao.main.activity;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
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.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.R;
|
||||||
import com.yunbao.main.adapter.RedPacketUserRecyclerAdapter;
|
import com.yunbao.main.adapter.RedPacketUserRecyclerAdapter;
|
||||||
import com.yunbao.main.bean.RedPacketListBean;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
@Route(path = RouteUtil.PATH_RED_PACKET_USER)
|
||||||
public class RedPacketUsersActivity extends AbsActivity implements View.OnClickListener{
|
public class RedPacketUsersActivity extends AbsActivity implements View.OnClickListener{
|
||||||
private RecyclerView recyclerView;
|
private RecyclerView recyclerView;
|
||||||
private RedPacketUserRecyclerAdapter adapter;
|
private RedPacketUserRecyclerAdapter adapter;
|
||||||
|
private int redPacketId;
|
||||||
|
|
||||||
|
private RoundedImageView avatar;
|
||||||
|
private TextView title;
|
||||||
|
private TextView money;
|
||||||
|
private ImageView icon;
|
||||||
|
private TextView open;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
@ -25,8 +40,14 @@ public class RedPacketUsersActivity extends AbsActivity implements View.OnClickL
|
|||||||
@Override
|
@Override
|
||||||
protected void main() {
|
protected void main() {
|
||||||
super.main();
|
super.main();
|
||||||
|
findViewById(R.id.btn_back).setOnClickListener(this);
|
||||||
recyclerView = findViewById(R.id.recyclerView);
|
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);
|
adapter = new RedPacketUserRecyclerAdapter(this);
|
||||||
recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
|
recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
|
||||||
recyclerView.setAdapter(adapter);
|
recyclerView.setAdapter(adapter);
|
||||||
@ -36,17 +57,32 @@ public class RedPacketUsersActivity extends AbsActivity implements View.OnClickL
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
int id=v.getId();
|
int id=v.getId();
|
||||||
|
if(id==R.id.btn_back){
|
||||||
|
finish();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private void initData() {
|
private void initData() {
|
||||||
List<RedPacketListBean> list = new ArrayList<>();
|
LiveNetManager.get(mContext)
|
||||||
for (int i = 1; i <= 5; i++) {
|
.getRedPacketUserList(redPacketId, new HttpCallback<RedPacketDetailsBean>() {
|
||||||
RedPacketListBean bean = new RedPacketListBean();
|
@Override
|
||||||
bean.setTitle("攢人氣紅包 - 主播昵稱的直播間" + i);
|
public void onSuccess(RedPacketDetailsBean data) {
|
||||||
bean.setTimer("X月X日 " + i);
|
setData(data);
|
||||||
bean.setMoney(i * 1000 + "");
|
adapter.setList(data.getDetails());
|
||||||
list.add(bean);
|
}
|
||||||
}
|
|
||||||
adapter.setList(list);
|
@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());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
package com.yunbao.main.adapter;
|
package com.yunbao.main.adapter;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.graphics.Color;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -11,10 +12,11 @@ import android.widget.TextView;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.bean.RedPacketListBean;
|
||||||
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.main.R;
|
import com.yunbao.main.R;
|
||||||
import com.yunbao.main.activity.RedPacketInfoActivity;
|
|
||||||
import com.yunbao.main.bean.RedPacketListBean;
|
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class RedPacketListRecyclerAdapter extends RecyclerView.Adapter<RedPacketListRecyclerAdapter.ItemViewHolder> {
|
public class RedPacketListRecyclerAdapter extends RecyclerView.Adapter<RedPacketListRecyclerAdapter.ItemViewHolder> {
|
||||||
@ -23,6 +25,7 @@ public class RedPacketListRecyclerAdapter extends RecyclerView.Adapter<RedPacket
|
|||||||
|
|
||||||
public RedPacketListRecyclerAdapter(Context mContext) {
|
public RedPacketListRecyclerAdapter(Context mContext) {
|
||||||
this.mContext = mContext;
|
this.mContext = mContext;
|
||||||
|
this.list=new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setList(List<RedPacketListBean> list) {
|
public void setList(List<RedPacketListBean> list) {
|
||||||
@ -56,13 +59,18 @@ public class RedPacketListRecyclerAdapter extends RecyclerView.Adapter<RedPacket
|
|||||||
timer = itemView.findViewById(R.id.time);
|
timer = itemView.findViewById(R.id.time);
|
||||||
money = itemView.findViewById(R.id.money);
|
money = itemView.findViewById(R.id.money);
|
||||||
icon = itemView.findViewById(R.id.icon);
|
icon = itemView.findViewById(R.id.icon);
|
||||||
itemView.setOnClickListener(v -> mContext.startActivity(new Intent(mContext, RedPacketInfoActivity.class)));
|
itemView.setOnClickListener(v -> {
|
||||||
|
RouteUtil.forwardRedPacketInfo((RedPacketListBean) itemView.getTag());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
private void setData(RedPacketListBean bean) {
|
private void setData(RedPacketListBean bean) {
|
||||||
title.setText(bean.getTitle());
|
title.setText(bean.getLiveNicename()+"|"+bean.getId());
|
||||||
timer.setText(bean.getTimer());
|
timer.setText(bean.getCreateTime());
|
||||||
money.setText(bean.getMoney());
|
money.setText("-" + bean.getAmountDiamond());
|
||||||
|
money.setTextColor(Color.parseColor("#000000"));
|
||||||
|
icon.setImageResource(R.mipmap.diamond);
|
||||||
itemView.setTag(bean);
|
itemView.setTag(bean);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,32 +1,36 @@
|
|||||||
package com.yunbao.main.adapter;
|
package com.yunbao.main.adapter;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
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 com.yunbao.main.R;
|
||||||
import com.yunbao.main.activity.RedPacketInfoActivity;
|
|
||||||
import com.yunbao.main.bean.RedPacketListBean;
|
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class RedPacketUserRecyclerAdapter extends RecyclerView.Adapter<RedPacketUserRecyclerAdapter.ItemViewHolder> {
|
public class RedPacketUserRecyclerAdapter extends RecyclerView.Adapter<RedPacketUserRecyclerAdapter.ItemViewHolder> {
|
||||||
private List<RedPacketListBean> list;
|
private List<RedPacketDetailsBean.Detail> list;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
|
||||||
public RedPacketUserRecyclerAdapter(Context mContext) {
|
public RedPacketUserRecyclerAdapter(Context mContext) {
|
||||||
this.mContext = mContext;
|
this.mContext = mContext;
|
||||||
|
list = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setList(List<RedPacketListBean> list) {
|
public void setList(List<RedPacketDetailsBean.Detail> list) {
|
||||||
this.list = list;
|
if (list != null) {
|
||||||
|
this.list = list;
|
||||||
|
}
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,21 +52,22 @@ public class RedPacketUserRecyclerAdapter extends RecyclerView.Adapter<RedPacket
|
|||||||
|
|
||||||
public class ItemViewHolder extends RecyclerView.ViewHolder {
|
public class ItemViewHolder extends RecyclerView.ViewHolder {
|
||||||
private TextView title, timer, money;
|
private TextView title, timer, money;
|
||||||
private ImageView icon;
|
private RoundedImageView icon;
|
||||||
|
|
||||||
public ItemViewHolder(@NonNull View itemView) {
|
public ItemViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
title = itemView.findViewById(R.id.title);
|
title = itemView.findViewById(R.id.title);
|
||||||
timer = itemView.findViewById(R.id.time);
|
timer = itemView.findViewById(R.id.time);
|
||||||
money = itemView.findViewById(R.id.money);
|
money = itemView.findViewById(R.id.money);
|
||||||
icon = itemView.findViewById(R.id.icon);
|
icon = itemView.findViewById(R.id.avatar);
|
||||||
itemView.setOnClickListener(v -> mContext.startActivity(new Intent(mContext, RedPacketInfoActivity.class)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setData(RedPacketListBean bean) {
|
@SuppressLint("SetTextI18n")
|
||||||
title.setText(bean.getTitle());
|
private void setData(RedPacketDetailsBean.Detail bean) {
|
||||||
timer.setText(bean.getTimer());
|
title.setText(bean.getNiceName());
|
||||||
money.setText(bean.getMoney());
|
timer.setText(bean.getTime());
|
||||||
|
money.setText(bean.getMoney()+"");
|
||||||
|
ImgLoader.display(mContext,bean.getAvatarThumb(),icon);
|
||||||
itemView.setTag(bean);
|
itemView.setTag(bean);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
package com.yunbao.main.bean;
|
|
||||||
|
|
||||||
import com.yunbao.common.bean.BaseModel;
|
|
||||||
|
|
||||||
public class RedPacketListBean extends BaseModel {
|
|
||||||
private String title;
|
|
||||||
private String timer;
|
|
||||||
private String money;
|
|
||||||
|
|
||||||
public String getTitle() {
|
|
||||||
return title;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTitle(String title) {
|
|
||||||
this.title = title;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTimer() {
|
|
||||||
return timer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTimer(String timer) {
|
|
||||||
this.timer = timer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMoney() {
|
|
||||||
return money;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMoney(String money) {
|
|
||||||
this.money = money;
|
|
||||||
}
|
|
||||||
}
|
|
@ -28,7 +28,9 @@ import org.greenrobot.eventbus.Subscribe;
|
|||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页红包专区
|
* 首页红包专区
|
||||||
@ -134,6 +136,12 @@ public class MainHomeRedPacketLiveViewHolder extends AbsMainHomeChildViewHolder
|
|||||||
@Override
|
@Override
|
||||||
public void onItemClick(LiveBean bean, int position) {
|
public void onItemClick(LiveBean bean, int position) {
|
||||||
if ("1".equals(bean.getIslive())) {
|
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);
|
watchLive(bean, Constants.LIVE_HOME, position);
|
||||||
}else if(bean.getIs_week()!=null&&bean.getIs_week().equals("1")){
|
}else if(bean.getIs_week()!=null&&bean.getIs_week().equals("1")){
|
||||||
String url = CommonAppConfig.HOST + bean.getUrl()+"?a=1";
|
String url = CommonAppConfig.HOST + bean.getUrl()+"?a=1";
|
||||||
|
@ -41,14 +41,11 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
|||||||
|
|
||||||
ImgLoader.display(mContext, "https://downs.yaoulive.com/gif_trophy.gif", img_trophy);
|
ImgLoader.display(mContext, "https://downs.yaoulive.com/gif_trophy.gif", img_trophy);
|
||||||
|
|
||||||
img_trophy.setOnLongClickListener(new View.OnLongClickListener() {
|
|
||||||
@Override
|
|
||||||
public boolean onLongClick(View v) {
|
|
||||||
mContext.startActivity(new Intent(mContext, RedPacketListActivity.class));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
public void setCurPosition(int position){
|
||||||
|
mViewPager.setCurrentItem(position);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -73,9 +70,9 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
|||||||
} else if (position == 2) {
|
} else if (position == 2) {
|
||||||
mainHomeRecomLiveViewHolder = new MainHomeRecomLiveViewHolder(mContext, parent);
|
mainHomeRecomLiveViewHolder = new MainHomeRecomLiveViewHolder(mContext, parent);
|
||||||
vh = mainHomeRecomLiveViewHolder;
|
vh = mainHomeRecomLiveViewHolder;
|
||||||
}else if(position==3){
|
} else if (position == 3) {
|
||||||
mainHomeRedPacketLiveViewHolder=new MainHomeRedPacketLiveViewHolder(mContext,parent);
|
mainHomeRedPacketLiveViewHolder = new MainHomeRedPacketLiveViewHolder(mContext, parent);
|
||||||
vh=mainHomeRedPacketLiveViewHolder;
|
vh = mainHomeRedPacketLiveViewHolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vh == null) {
|
if (vh == null) {
|
||||||
@ -102,7 +99,7 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
|||||||
mContext.getString(R.string.follow),
|
mContext.getString(R.string.follow),
|
||||||
mContext.getString(R.string.hot),
|
mContext.getString(R.string.hot),
|
||||||
mContext.getString(R.string.recomment),
|
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>
|
@ -19,7 +19,7 @@
|
|||||||
android:paddingStart="15dp"
|
android:paddingStart="15dp"
|
||||||
android:paddingEnd="0dp"
|
android:paddingEnd="0dp"
|
||||||
android:background="#F5F5F5"
|
android:background="#F5F5F5"
|
||||||
android:text="近30天記錄 (截至到昨天)"
|
android:text="@string/red_packet_list_tips"
|
||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/include3" />
|
app:layout_constraintTop_toBottomOf="@+id/include3" />
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:onClick="backClick"
|
android:onClick="backClick"
|
||||||
android:padding="9dp"
|
android:padding="9dp"
|
||||||
android:src="@mipmap/icon_dialog_charge_close"
|
android:src="@mipmap/icon_back"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:tint="@color/textColor" />
|
app:tint="@color/textColor" />
|
||||||
@ -54,6 +54,15 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/title" />
|
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
|
<View
|
||||||
android:id="@+id/line"
|
android:id="@+id/line"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@ -64,89 +73,86 @@
|
|||||||
android:background="?android:attr/listDivider"
|
android:background="?android:attr/listDivider"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/money" />
|
app:layout_constraintTop_toBottomOf="@+id/Popularity" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/status"
|
android:id="@+id/status"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="48dp"
|
android:layout_marginStart="32dp"
|
||||||
|
android:layout_marginEnd="32dp"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/line">
|
app:layout_constraintTop_toBottomOf="@+id/line">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="160dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:text="@string/red_packet_info_status"
|
||||||
android:text="當前狀態"
|
|
||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/red_packet_status"
|
android:id="@+id/red_packet_status"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="30dp"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="紅包已過期"
|
android:text="@string/red_packet_info_status_timeout"
|
||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/info"
|
android:id="@+id/info"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="48dp"
|
android:layout_marginStart="32dp"
|
||||||
|
android:layout_marginEnd="32dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/status">
|
app:layout_constraintTop_toBottomOf="@+id/status">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="160dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:text="@string/red_packet_info_details"
|
||||||
android:text="紅包詳情"
|
|
||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/red_packet_info"
|
android:id="@+id/red_packet_info"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="30dp"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="查看"
|
android:text="@string/red_packet_info_details_check"
|
||||||
android:textColor="#1E73D7"
|
android:textColor="#1E73D7"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/timer"
|
android:id="@+id/timer"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="48dp"
|
android:layout_marginStart="32dp"
|
||||||
|
android:layout_marginEnd="32dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/info">
|
app:layout_constraintTop_toBottomOf="@+id/info">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="160dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:text="@string/red_packet_info_pay_time"
|
||||||
android:text="支付時間"
|
|
||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/red_packet_timer"
|
android:id="@+id/red_packet_timer"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="30dp"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="2023年6月6日 13:50:52"
|
android:text="2023年6月6日 13:50:52"
|
||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
@ -155,30 +161,71 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/play_model"
|
android:id="@+id/play_model"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="48dp"
|
android:layout_marginStart="32dp"
|
||||||
|
android:layout_marginEnd="32dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/timer">
|
app:layout_constraintTop_toBottomOf="@+id/timer">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="160dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:text="@string/red_packet_info_mode"
|
||||||
android:text="支付方式"
|
|
||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/red_packet_model"
|
android:id="@+id/red_packet_model"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="30dp"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="鉆石餘額"
|
android:text="@string/red_packet_info_mode_diamond"
|
||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</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>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -14,7 +14,7 @@
|
|||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:onClick="backClick"
|
android:onClick="backClick"
|
||||||
android:padding="9dp"
|
android:padding="9dp"
|
||||||
android:src="@mipmap/icon_dialog_charge_close"
|
android:src="@mipmap/icon_back"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:tint="@color/textColor" />
|
app:tint="@color/textColor" />
|
||||||
@ -65,7 +65,7 @@
|
|||||||
android:layout_marginEnd="6dp"
|
android:layout_marginEnd="6dp"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/money"
|
app:layout_constraintEnd_toStartOf="@+id/money"
|
||||||
app:layout_constraintTop_toTopOf="@+id/money"
|
app:layout_constraintTop_toTopOf="@+id/money"
|
||||||
app:srcCompat="@mipmap/diamond" />
|
app:srcCompat="@mipmap/gold_coin" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/open_packet"
|
android:id="@+id/open_packet"
|
||||||
@ -83,7 +83,7 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_marginStart="32dp"
|
android:layout_marginStart="32dp"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="55dp"
|
||||||
android:layout_marginEnd="32dp"
|
android:layout_marginEnd="32dp"
|
||||||
android:background="?android:attr/listDivider"
|
android:background="?android:attr/listDivider"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
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"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/rootView"
|
android:id="@+id/rootView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@ -154,19 +155,31 @@
|
|||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/banner_click"
|
android:id="@+id/banner_click"
|
||||||
android:layout_width="123dp"
|
android:layout_width="123dp"
|
||||||
android:layout_height="35.33dp"
|
android:layout_height="35.33dp"
|
||||||
android:layout_above="@id/rt_main_tab"
|
android:layout_above="@id/red_packet"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="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
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Loading…
Reference in New Issue
Block a user