1:红包发布和打开
2:抢最标准的红包
This commit is contained in:
@@ -97,7 +97,7 @@ android {
|
|||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled false
|
minifyEnabled true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
|
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ public class RoomMessageEvent {
|
|||||||
|
|
||||||
private String gift_num;
|
private String gift_num;
|
||||||
|
|
||||||
|
private RedPacketInfo redpacketInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
|||||||
@@ -104,6 +104,8 @@ public class EMMessageInfo implements MultiItemEntity {
|
|||||||
public static final int QXRoomMessageTypezailx = 1058;
|
public static final int QXRoomMessageTypezailx = 1058;
|
||||||
///清除个人魅力值
|
///清除个人魅力值
|
||||||
public static final int QXRoomMessageTypeQingGRMl = 1059;
|
public static final int QXRoomMessageTypeQingGRMl = 1059;
|
||||||
|
//有红包列表
|
||||||
|
public static final int QXRoomMessageTypeQXRoomMessageRed = 1060;
|
||||||
|
|
||||||
///房间内换麦
|
///房间内换麦
|
||||||
public static final int QXRoomMessageTypehm = 1039;
|
public static final int QXRoomMessageTypehm = 1039;
|
||||||
|
|||||||
@@ -474,6 +474,22 @@ public interface ApiServer {
|
|||||||
@GET(Constants.GET_WALLET)
|
@GET(Constants.GET_WALLET)
|
||||||
Call<BaseModel<WalletBean>> wallet();
|
Call<BaseModel<WalletBean>> wallet();
|
||||||
|
|
||||||
|
@FormUrlEncoded
|
||||||
|
@POST(Constants.REDPACKET_CREATE)
|
||||||
|
Call<ResponseBody> redPacketCreate(@Field("type") int type, @Field("password") String password, @Field("coin_type") int coin_type, @Field("total_amount") String total_amount,
|
||||||
|
@Field("total_count")String total_count, @Field("conditions") String conditions, @Field("countdown") String countdown, @Field("room_id") String room_id,
|
||||||
|
@Field("remark") String remark);
|
||||||
|
|
||||||
|
@GET(Constants.ROOM_REDPACKET)
|
||||||
|
Call<BaseModel<List<RedPacketInfo>>> roomRedPackets(@Query("room_id") String roomId);
|
||||||
|
|
||||||
|
@GET(Constants.GET_REDPACKET_DETAIL)
|
||||||
|
Call<BaseModel<RedpacketDetail>> redPacketDetail(@Query("redpacket_id") String redpacket_id);
|
||||||
|
|
||||||
|
@FormUrlEncoded
|
||||||
|
@POST(Constants.POST_GRAB)
|
||||||
|
Call<BaseModel<RedPackGrab>> grab(@Field("redpacket_id") String redpacket_id);
|
||||||
|
|
||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
@POST(Constants.POST_APPLY_Pay)
|
@POST(Constants.POST_APPLY_Pay)
|
||||||
Call<BaseModel<AppPay>> appPay(@Field("user_id") String user_id, @Field("money") String money, @Field("coin") String coin, @Field("type") String type);
|
Call<BaseModel<AppPay>> appPay(@Field("user_id") String user_id, @Field("money") String money, @Field("coin") String coin, @Field("type") String type);
|
||||||
|
|||||||
@@ -169,8 +169,10 @@ public class RetrofitClient {
|
|||||||
}
|
}
|
||||||
return INSTANCE;
|
return INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查网络连接状态
|
* 检查网络连接状态
|
||||||
|
*
|
||||||
* @return true表示网络可用,false表示网络不可用
|
* @return true表示网络可用,false表示网络不可用
|
||||||
*/
|
*/
|
||||||
private boolean isNetworkAvailable() {
|
private boolean isNetworkAvailable() {
|
||||||
@@ -185,6 +187,7 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 网络不可用时的统一处理方法
|
* 网络不可用时的统一处理方法
|
||||||
|
*
|
||||||
* @param observer BaseObserver对象
|
* @param observer BaseObserver对象
|
||||||
* @param <T> 泛型类型
|
* @param <T> 泛型类型
|
||||||
*/
|
*/
|
||||||
@@ -192,6 +195,7 @@ public class RetrofitClient {
|
|||||||
ToastUtils.showShort("网络不可用,请检查网络设置");
|
ToastUtils.showShort("网络不可用,请检查网络设置");
|
||||||
observer.onError(new Throwable("网络不可用,请检查网络设置"));
|
observer.onError(new Throwable("网络不可用,请检查网络设置"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T> T createApiClient(Class<T> apiClientClass) {
|
public <T> T createApiClient(Class<T> apiClientClass) {
|
||||||
return mRetrofit.create(apiClientClass);
|
return mRetrofit.create(apiClientClass);
|
||||||
}
|
}
|
||||||
@@ -301,6 +305,7 @@ public class RetrofitClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<RoomHourBean>> call, Throwable t) {
|
public void onFailure(Call<BaseModel<RoomHourBean>> call, Throwable t) {
|
||||||
t.printStackTrace();
|
t.printStackTrace();
|
||||||
@@ -1965,6 +1970,7 @@ public class RetrofitClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<ActivitiesPermission>> call, Throwable t) {
|
public void onFailure(Call<BaseModel<ActivitiesPermission>> call, Throwable t) {
|
||||||
t.printStackTrace();
|
t.printStackTrace();
|
||||||
@@ -1991,6 +1997,67 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void redPacketCreate(int type, String password, int coin_type, String total_amount, String total_count, String conditions, String countdown, String room_id, String remark, BaseObserver<String> observer) {
|
||||||
|
sApiServer.redPacketCreate(type, password, coin_type, total_amount, total_count, conditions, countdown, room_id, remark).enqueue(new Callback<ResponseBody>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {
|
||||||
|
if (response.code() == 200) {
|
||||||
|
try {
|
||||||
|
String json = response.body().string();
|
||||||
|
BaseModel<String> redPacketBeanBaseModel = GsonUtils.fromJson(json, BaseModel.class);
|
||||||
|
if (redPacketBeanBaseModel.getCode() == 1) {
|
||||||
|
observer.onNext(redPacketBeanBaseModel.getData());
|
||||||
|
} else if (redPacketBeanBaseModel.getCode() == 0) {
|
||||||
|
ToastUtils.showShort(redPacketBeanBaseModel.getMsg());
|
||||||
|
} else if (redPacketBeanBaseModel.getCode() == 301) {
|
||||||
|
try {
|
||||||
|
CommonAppContext.getInstance().clearLoginInfo();
|
||||||
|
ToastUtils.showShort(redPacketBeanBaseModel.getMsg());
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ResponseBody> call, Throwable t) {
|
||||||
|
t.printStackTrace();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// .enqueue(new Callback<BaseModel<String>>() {
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||||
|
// if (response.code() == 200){
|
||||||
|
// BaseModel<String> redPacketBeanBaseModel = response.body();
|
||||||
|
// if (redPacketBeanBaseModel.getCode() == 1) {
|
||||||
|
// observer.onNext(redPacketBeanBaseModel.getData());
|
||||||
|
// }else if (redPacketBeanBaseModel.getCode()==0){
|
||||||
|
// ToastUtils.showShort(redPacketBeanBaseModel.getMsg());
|
||||||
|
// }else if (redPacketBeanBaseModel.getCode()==301){
|
||||||
|
// try {
|
||||||
|
// ToastUtils.showShort(redPacketBeanBaseModel.getMsg());
|
||||||
|
// CommonAppContext.getInstance().clearLoginInfo();
|
||||||
|
// } catch (ClassNotFoundException e) {
|
||||||
|
// throw new RuntimeException(e);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||||
|
// t.printStackTrace();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
|
||||||
public void appPay(String user_id, String money, String coin, String type, BaseObserver<AppPay> observer) {
|
public void appPay(String user_id, String money, String coin, String type, BaseObserver<AppPay> observer) {
|
||||||
sApiServer.appPay(user_id, money, coin, type).enqueue(new Callback<BaseModel<AppPay>>() {
|
sApiServer.appPay(user_id, money, coin, type).enqueue(new Callback<BaseModel<AppPay>>() {
|
||||||
@Override
|
@Override
|
||||||
@@ -2275,6 +2342,7 @@ public class RetrofitClient {
|
|||||||
observer.onNext(new RoomAuction.AuctionListBean());
|
observer.onNext(new RoomAuction.AuctionListBean());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable t) {
|
public void onFailure(Throwable t) {
|
||||||
t.printStackTrace();
|
t.printStackTrace();
|
||||||
@@ -2316,6 +2384,90 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void roomRedPackets(String roomId, BaseObserver<List<RedPacketInfo>> observer) {
|
||||||
|
sApiServer.roomRedPackets(roomId).enqueue(new Callback<BaseModel<List<RedPacketInfo>>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<BaseModel<List<RedPacketInfo>>> call, Response<BaseModel<List<RedPacketInfo>>> response) {
|
||||||
|
if (response.code() == 200) {
|
||||||
|
BaseModel<List<RedPacketInfo>> baseModel = response.body();
|
||||||
|
if (baseModel.getCode() == 1) {
|
||||||
|
observer.onNext(baseModel.getData());
|
||||||
|
} else if (baseModel.getCode() == 0) {
|
||||||
|
|
||||||
|
} else if (baseModel.getCode() == 301) {
|
||||||
|
try {
|
||||||
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
|
CommonAppContext.getInstance().clearLoginInfo();
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<BaseModel<List<RedPacketInfo>>> call, Throwable t) {
|
||||||
|
t.printStackTrace();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void redPacketDetail(String redPacketId, BaseObserver<RedpacketDetail> observer) {
|
||||||
|
sApiServer.redPacketDetail(redPacketId).enqueue(new Callback<BaseModel<RedpacketDetail>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<BaseModel<RedpacketDetail>> call, Response<BaseModel<RedpacketDetail>> response) {
|
||||||
|
if (response.code() == 200) {
|
||||||
|
BaseModel<RedpacketDetail> baseModel = response.body();
|
||||||
|
if (baseModel.getCode() == 1) {
|
||||||
|
observer.onNext(baseModel.getData());
|
||||||
|
} else if (baseModel.getCode() == 0) {
|
||||||
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
|
} else if (baseModel.getCode() == 301) {
|
||||||
|
try {
|
||||||
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
|
CommonAppContext.getInstance().clearLoginInfo();
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<BaseModel<RedpacketDetail>> call, Throwable t) {
|
||||||
|
t.printStackTrace();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void grab(String redPacketId, BaseObserver<RedPackGrab> observer) {
|
||||||
|
sApiServer.grab(redPacketId).enqueue(new Callback<BaseModel<RedPackGrab>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<BaseModel<RedPackGrab>> call, Response<BaseModel<RedPackGrab>> response) {
|
||||||
|
if (response.code() == 200) {
|
||||||
|
BaseModel<RedPackGrab> baseModel = response.body();
|
||||||
|
if (baseModel.getCode() == 1) {
|
||||||
|
observer.onNext(baseModel.getData());
|
||||||
|
} else if (baseModel.getCode() == 0) {
|
||||||
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
|
observer.onNext(baseModel.getData());
|
||||||
|
} else if (baseModel.getCode() == 301) {
|
||||||
|
try {
|
||||||
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
|
CommonAppContext.getInstance().clearLoginInfo();
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<BaseModel<RedPackGrab>> call, Throwable t) {
|
||||||
|
t.printStackTrace();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public void auctionEnd(String auctionId, String roomId, BaseObserver<String> observer) {
|
public void auctionEnd(String auctionId, String roomId, BaseObserver<String> observer) {
|
||||||
sApiServer.auctionEnd(auctionId, roomId).enqueue(new Callback<BaseModel<String>>() {
|
sApiServer.auctionEnd(auctionId, roomId).enqueue(new Callback<BaseModel<String>>() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -51,11 +51,11 @@ public class EnvironmentPrefs {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// 默认使用生产环境
|
// 默认使用生产环境
|
||||||
String envName = sharedPreferences.getString(KEY_ENV, EnvironmentEnum.PRODUCTION.name());
|
String envName = sharedPreferences.getString(KEY_ENV, EnvironmentEnum.TEST.name());
|
||||||
try {
|
try {
|
||||||
return EnvironmentEnum.valueOf(envName);
|
return EnvironmentEnum.valueOf(envName);
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
return EnvironmentEnum.PRODUCTION; // 出错时默认返回生产环境
|
return EnvironmentEnum.TEST; // 出错时默认返回生产环境
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -269,6 +269,12 @@ public class Constants {
|
|||||||
public static final String GET_ROOM_TYPE = "/api/Index/room_type_list";//房间分类列表
|
public static final String GET_ROOM_TYPE = "/api/Index/room_type_list";//房间分类列表
|
||||||
public static final String GET_GIVE_GIFT = "/api/Gift/chat_gift_send";//聊天送礼物
|
public static final String GET_GIVE_GIFT = "/api/Gift/chat_gift_send";//聊天送礼物
|
||||||
public static final String GET_WALLET = "/api/UserWallet/wallet";//钱包
|
public static final String GET_WALLET = "/api/UserWallet/wallet";//钱包
|
||||||
|
public static final String REDPACKET_CREATE = "/api/Redpacket/create";//创建红包
|
||||||
|
public static final String ROOM_REDPACKET = "/api/Redpacket/roomRedPackets";//红包列表
|
||||||
|
|
||||||
|
public static final String GET_REDPACKET_DETAIL = "/api/Redpacket/detail";//红包详情
|
||||||
|
public static final String POST_GRAB = "/api/Redpacket/grab";//抢红包
|
||||||
|
|
||||||
public static final String GET_ROOM_GIFT = "/api/Room/room_give_gift";//直播间送礼
|
public static final String GET_ROOM_GIFT = "/api/Room/room_give_gift";//直播间送礼
|
||||||
public static final String GET_ROOM_USER = "/api/Room/room_user_home";//房间内点击头像
|
public static final String GET_ROOM_USER = "/api/Room/room_user_home";//房间内点击头像
|
||||||
public static final String APPLY_PIT = "/api/RoomPit/apply_pit";//申请上麦
|
public static final String APPLY_PIT = "/api/RoomPit/apply_pit";//申请上麦
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.example.moduleroom.activity;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import com.alibaba.android.arouter.facade.annotation.Autowired;
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.example.moduleroom.R;
|
import com.example.moduleroom.R;
|
||||||
import com.example.moduleroom.adapter.RedAdapter;
|
import com.example.moduleroom.adapter.RedAdapter;
|
||||||
@@ -13,8 +14,11 @@ import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
|||||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||||
import com.xscm.moduleutil.base.BaseMvpFragment;
|
import com.xscm.moduleutil.base.BaseMvpFragment;
|
||||||
|
import com.xscm.moduleutil.bean.RedpacketDetail;
|
||||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||||
|
import com.xscm.moduleutil.utils.ImageUtils;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author qx
|
* @author qx
|
||||||
* @data 2025/9/29
|
* @data 2025/9/29
|
||||||
@@ -26,9 +30,25 @@ public class RedResultActivity extends BaseMvpActivity<RedEnvelopesPresenter, Fr
|
|||||||
private RedViewModel mViewModel;
|
private RedViewModel mViewModel;
|
||||||
private RedAdapter redAdapter;
|
private RedAdapter redAdapter;
|
||||||
private int page = 1;
|
private int page = 1;
|
||||||
|
private String redpacketId;
|
||||||
|
|
||||||
public static RedResultActivity newInstance() {
|
// public static RedResultActivity newInstance() {
|
||||||
return new RedResultActivity();
|
// return new RedResultActivity();
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void initData() {
|
||||||
|
redpacketId = getIntent().getStringExtra("redpacketId");
|
||||||
|
if (redpacketId == null || redpacketId.isEmpty()) {
|
||||||
|
// 处理红包ID为空的情况
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (MvpPre==null){
|
||||||
|
MvpPre = new RedEnvelopesPresenter(this, this);
|
||||||
|
}
|
||||||
|
MvpPre.getRedpacketDetail(redpacketId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -36,11 +56,6 @@ public class RedResultActivity extends BaseMvpActivity<RedEnvelopesPresenter, Fr
|
|||||||
return new RedEnvelopesPresenter(this, this);
|
return new RedEnvelopesPresenter(this, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void initData() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
mBinding.recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
mBinding.recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||||
@@ -75,4 +90,17 @@ public class RedResultActivity extends BaseMvpActivity<RedEnvelopesPresenter, Fr
|
|||||||
return R.layout.fragment_red;
|
return R.layout.fragment_red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void redPacketDetail(RedpacketDetail redpacketDetail) {
|
||||||
|
if (redpacketDetail != null) {
|
||||||
|
ImageUtils.loadHeadCC(redpacketDetail.getMy_record().getAvatar(), mBinding.userAvatar);
|
||||||
|
mBinding.userName.setText(redpacketDetail.getMy_record().getNickname());
|
||||||
|
mBinding.tvRedTitle.setText(redpacketDetail.getRedPacket_info().getRemark());
|
||||||
|
mBinding.tvRedJb.setText(redpacketDetail.getMy_record().getAmount());
|
||||||
|
mBinding.tvJb.setText(redpacketDetail.getRedPacket_info().getCoin_type() == 1 ? "金币" : "钻石");
|
||||||
|
mBinding.tvLq.setText(redpacketDetail.getRecords().size() + "/" + redpacketDetail.getRedPacket_info().getTotal_count());
|
||||||
|
|
||||||
|
redAdapter.setNewData(redpacketDetail.getRecords());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -4,21 +4,30 @@ import android.view.View;
|
|||||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||||
import com.chad.library.adapter.base.BaseViewHolder;
|
import com.chad.library.adapter.base.BaseViewHolder;
|
||||||
import com.example.moduleroom.R;
|
import com.example.moduleroom.R;
|
||||||
|
import com.xscm.moduleutil.bean.RedpacketDetail;
|
||||||
import com.xscm.moduleutil.bean.room.RedResultBean;
|
import com.xscm.moduleutil.bean.room.RedResultBean;
|
||||||
import com.xscm.moduleutil.bean.room.RoomHourBean;
|
import com.xscm.moduleutil.bean.room.RoomHourBean;
|
||||||
import com.xscm.moduleutil.utils.ImageUtils;
|
import com.xscm.moduleutil.utils.ImageUtils;
|
||||||
|
|
||||||
public class RedAdapter extends BaseQuickAdapter<RedResultBean.RedBean, BaseViewHolder> {
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class RedAdapter extends BaseQuickAdapter<RedpacketDetail.Records, BaseViewHolder> {
|
||||||
public RedAdapter() {
|
public RedAdapter() {
|
||||||
super(R.layout.item_red);
|
super(R.layout.item_red);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void convert(BaseViewHolder baseViewHolder, RedResultBean.RedBean redBean) {
|
protected void convert(BaseViewHolder baseViewHolder,RedpacketDetail.Records redBean) {
|
||||||
ImageUtils.loadHeadCC(redBean.getRedUserAvatar(), baseViewHolder.getView(R.id.red_user_avatar));
|
ImageUtils.loadHeadCC(redBean.getAvatar(), baseViewHolder.getView(R.id.red_user_avatar));
|
||||||
baseViewHolder.setText(R.id.tv_user_name, redBean.getRedUserName());
|
baseViewHolder.setText(R.id.tv_user_name, redBean.getNickname());
|
||||||
baseViewHolder.setText(R.id.tv_red_num, redBean.getRedNum()+"");
|
baseViewHolder.setText(R.id.tv_red_num, redBean.getAmount());
|
||||||
baseViewHolder.setText(R.id.tv_time, redBean.getRedTime());
|
baseViewHolder.setText(R.id.tv_time, formatTimestamp(Long.getLong(redBean.getCreatetime())));
|
||||||
|
}
|
||||||
|
|
||||||
|
private String formatTimestamp(long timestamp) {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
|
||||||
|
return sdf.format(new Date(timestamp));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,17 +3,18 @@ package com.example.moduleroom.adapter;
|
|||||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||||
import com.chad.library.adapter.base.BaseViewHolder;
|
import com.chad.library.adapter.base.BaseViewHolder;
|
||||||
import com.example.moduleroom.R;
|
import com.example.moduleroom.R;
|
||||||
|
import com.xscm.moduleutil.bean.RedPacketInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 红包的列表适配器
|
* 红包的列表适配器
|
||||||
*/
|
*/
|
||||||
public class RedBagAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
|
public class RedBagAdapter extends BaseQuickAdapter<RedPacketInfo, BaseViewHolder> {
|
||||||
public RedBagAdapter() {
|
public RedBagAdapter() {
|
||||||
super(R.layout.item_red_bag);
|
super(R.layout.item_red_bag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void convert(BaseViewHolder helper, String item) {
|
protected void convert(BaseViewHolder helper, RedPacketInfo item) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ public class RoomSettingAdapter extends BaseMultiItemQuickAdapter<RoomSettingBea
|
|||||||
case RoomSettingBean.QXRoomSettingTypeRoomBgImage:
|
case RoomSettingBean.QXRoomSettingTypeRoomBgImage:
|
||||||
return com.xscm.moduleutil.R.mipmap.ic_bg_image;
|
return com.xscm.moduleutil.R.mipmap.ic_bg_image;
|
||||||
// 更多操作
|
// 更多操作
|
||||||
case RoomSettingBean.QXRoomSettingTypeRoomLeave:
|
// case RoomSettingBean.QXRoomSettingTypeRoomLeave:
|
||||||
return com.xscm.moduleutil.R.mipmap.ic_leave;
|
// return com.xscm.moduleutil.R.mipmap.ic_leave;
|
||||||
case RoomSettingBean.QXRoomSettingTypeRoomShare:
|
case RoomSettingBean.QXRoomSettingTypeRoomShare:
|
||||||
return com.xscm.moduleutil.R.mipmap.ic_share;
|
return com.xscm.moduleutil.R.mipmap.ic_share;
|
||||||
case RoomSettingBean.QXRoomSettingTypeRoomMyDress:
|
case RoomSettingBean.QXRoomSettingTypeRoomMyDress:
|
||||||
@@ -87,8 +87,8 @@ public class RoomSettingAdapter extends BaseMultiItemQuickAdapter<RoomSettingBea
|
|||||||
return com.xscm.moduleutil.R.mipmap.ic_report;
|
return com.xscm.moduleutil.R.mipmap.ic_report;
|
||||||
case RoomSettingBean.QXRoomSettingTypeRoomFloatingScreen:
|
case RoomSettingBean.QXRoomSettingTypeRoomFloatingScreen:
|
||||||
return b ? com.xscm.moduleutil.R.mipmap.ic_close_floating_screen : com.xscm.moduleutil.R.mipmap.ic_open_floating_screen;
|
return b ? com.xscm.moduleutil.R.mipmap.ic_close_floating_screen : com.xscm.moduleutil.R.mipmap.ic_open_floating_screen;
|
||||||
// case RoomSettingBean.QXRoomSettingTypeRoomFloatingRed:
|
case RoomSettingBean.QXRoomSettingTypeRoomFloatingRed:
|
||||||
// return com.xscm.moduleutil.R.mipmap.red_tx;
|
return com.xscm.moduleutil.R.mipmap.red_tx;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,14 @@ package com.example.moduleroom.contacts;
|
|||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import com.xscm.moduleutil.activity.IPresenter;
|
import com.xscm.moduleutil.activity.IPresenter;
|
||||||
import com.xscm.moduleutil.activity.IView;
|
import com.xscm.moduleutil.activity.IView;
|
||||||
|
import com.xscm.moduleutil.bean.RedpacketDetail;
|
||||||
|
|
||||||
public class RedEnvelopesContacts {
|
public class RedEnvelopesContacts {
|
||||||
public interface View extends IView<Activity> {
|
public interface View extends IView<Activity> {
|
||||||
|
void redPacketDetail(RedpacketDetail redpacketDetail);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IRoomPre extends IPresenter {
|
public interface IRoomPre extends IPresenter {
|
||||||
|
void getRedpacketDetail(String redpacketId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package com.example.moduleroom.dialog;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.text.method.DigitsKeyListener;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
@@ -11,9 +13,15 @@ import androidx.annotation.NonNull;
|
|||||||
import com.blankj.utilcode.util.ScreenUtils;
|
import com.blankj.utilcode.util.ScreenUtils;
|
||||||
import com.example.moduleroom.R;
|
import com.example.moduleroom.R;
|
||||||
import com.example.moduleroom.databinding.DialogRedBagSendBinding;
|
import com.example.moduleroom.databinding.DialogRedBagSendBinding;
|
||||||
|
import com.hjq.toast.ToastUtils;
|
||||||
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
|
import com.xscm.moduleutil.http.BaseObserver;
|
||||||
|
import com.xscm.moduleutil.http.RetrofitClient;
|
||||||
import com.xscm.moduleutil.widget.dialog.BaseDialog;
|
import com.xscm.moduleutil.widget.dialog.BaseDialog;
|
||||||
|
import io.reactivex.disposables.Disposable;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -25,13 +33,15 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
|||||||
private int type;//这是第一个页面,发送红包的第一个页面,默认为1,第二个页面,是2,点击查看帮助,是type=3
|
private int type;//这是第一个页面,发送红包的第一个页面,默认为1,第二个页面,是2,点击查看帮助,是type=3
|
||||||
private int stype;//当前是哪个页面:1:默认第一个页面, 2:选择条件页面
|
private int stype;//当前是哪个页面:1:默认第一个页面, 2:选择条件页面
|
||||||
|
|
||||||
private int redType;//红包类型 0:普通红包 1:口令红包
|
private int redType;//红包类型 1:普通红包 2:口令红包
|
||||||
private int redTime;//开奖倒计时 0:立刻 1:1分钟;2:2分钟;5:5分钟 10:10分钟(这里传递给服务的时候,需要乘60)
|
private int redTime;//开奖倒计时 0:立刻 1:1分钟;2:2分钟;5:5分钟 10:10分钟(这里传递给服务的时候,需要乘60)
|
||||||
private int redGold;//红包类型 0:金币红包 1:钻石红包
|
private int redGold=1;//红包类型 0:金币红包 1:钻石红包
|
||||||
private int redCount;//条件 0:无 1:收藏房间 2:仅麦上用户
|
private int redCount;//条件 0:无 1:收藏房间 2:仅麦上用户
|
||||||
|
private String roomId;
|
||||||
|
|
||||||
public RedBagSendDialog(@NonNull @NotNull Context context) {
|
public RedBagSendDialog(@NonNull @NotNull Context context, String roomId ) {
|
||||||
super(context, com.xscm.moduleutil.R.style.BaseDialogStyleH);
|
super(context, com.xscm.moduleutil.R.style.BaseDialogStyleH);
|
||||||
|
this.roomId = roomId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -49,6 +59,8 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
|||||||
window.setLayout((int) (ScreenUtils.getScreenWidth() * 345.f / 345), WindowManager.LayoutParams.WRAP_CONTENT);
|
window.setLayout((int) (ScreenUtils.getScreenWidth() * 345.f / 345), WindowManager.LayoutParams.WRAP_CONTENT);
|
||||||
|
|
||||||
setView(1);
|
setView(1);
|
||||||
|
mBinding.edText.setKeyListener(DigitsKeyListener.getInstance("0123456789"));
|
||||||
|
mBinding.etNum.setKeyListener(DigitsKeyListener.getInstance("0123456789"));
|
||||||
mBinding.imHelp.setOnClickListener(new View.OnClickListener() {
|
mBinding.imHelp.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -76,7 +88,44 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
|||||||
setView(2);
|
setView(2);
|
||||||
setFRed();
|
setFRed();
|
||||||
} else {
|
} else {
|
||||||
|
// 验证输入
|
||||||
|
String numStr = mBinding.etNum.getText().toString().trim();
|
||||||
|
String textStr = mBinding.edText.getText().toString().trim();
|
||||||
|
|
||||||
|
// 检查是否为空
|
||||||
|
if (TextUtils.isEmpty(numStr)) {
|
||||||
|
ToastUtils.show("请输入数量");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TextUtils.isEmpty(textStr)) {
|
||||||
|
ToastUtils.show("请输入金额");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (redType==2){
|
||||||
|
if (TextUtils.isEmpty(mBinding.evKl.getText().toString().trim())){
|
||||||
|
ToastUtils.show("请输入口令");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 转换为数字并比较
|
||||||
|
try {
|
||||||
|
int num = Integer.parseInt(numStr);
|
||||||
|
int text = Integer.parseInt(textStr);
|
||||||
|
|
||||||
|
if (text <= num) {
|
||||||
|
ToastUtils.show("金额必须大于数量");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 验证通过,继续发送红包逻辑
|
||||||
|
sendRedPacket();
|
||||||
|
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
ToastUtils.show("请输入有效的数字");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -85,10 +134,10 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
|||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||||
if (checkedId == R.id.bt_pt) {
|
if (checkedId == R.id.bt_pt) {
|
||||||
redType=0;
|
redType = 1;
|
||||||
mBinding.lKl.setVisibility(GONE);
|
mBinding.lKl.setVisibility(GONE);
|
||||||
} else if (checkedId == R.id.bt_kl) {
|
} else if (checkedId == R.id.bt_kl) {
|
||||||
redType=1;
|
redType = 2;
|
||||||
mBinding.lKl.setVisibility(VISIBLE);
|
mBinding.lKl.setVisibility(VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -122,7 +171,7 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
|||||||
// 钻石红包恢复默认样式
|
// 钻石红包恢复默认样式
|
||||||
mBinding.rbDiamond.setTextColor(Color.parseColor("#FFC9C7"));
|
mBinding.rbDiamond.setTextColor(Color.parseColor("#FFC9C7"));
|
||||||
mBinding.rbDiamond.setBackgroundResource(com.xscm.moduleutil.R.drawable.selector_red_bag_type_button);
|
mBinding.rbDiamond.setBackgroundResource(com.xscm.moduleutil.R.drawable.selector_red_bag_type_button);
|
||||||
redGold=0;
|
redGold = 1;
|
||||||
} else if (checkedId == R.id.rb_diamond) {
|
} else if (checkedId == R.id.rb_diamond) {
|
||||||
// 选中钻石红包:文字白色,背景透明
|
// 选中钻石红包:文字白色,背景透明
|
||||||
mBinding.rbDiamond.setTextColor(Color.parseColor("#D01717"));
|
mBinding.rbDiamond.setTextColor(Color.parseColor("#D01717"));
|
||||||
@@ -131,7 +180,7 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
|||||||
// 金币红包恢复默认样式
|
// 金币红包恢复默认样式
|
||||||
mBinding.rbGold.setTextColor(Color.parseColor("#FFC9C7"));
|
mBinding.rbGold.setTextColor(Color.parseColor("#FFC9C7"));
|
||||||
mBinding.rbGold.setBackgroundResource(com.xscm.moduleutil.R.drawable.selector_red_bag_type_button);
|
mBinding.rbGold.setBackgroundResource(com.xscm.moduleutil.R.drawable.selector_red_bag_type_button);
|
||||||
redGold=1;
|
redGold =2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -171,9 +220,71 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
|||||||
mBinding.btMicUser.setSelected(!mBinding.btMicUser.isSelected());
|
mBinding.btMicUser.setSelected(!mBinding.btMicUser.isSelected());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
private void sendRedPacket() {
|
||||||
|
// 获取输入值
|
||||||
|
String numStr = mBinding.etNum.getText().toString().trim();
|
||||||
|
String textStr = mBinding.edText.getText().toString().trim();
|
||||||
|
String kl = "";
|
||||||
|
|
||||||
|
if (redType == 2) {
|
||||||
|
kl = mBinding.evKl.getText().toString().trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 验证输入
|
||||||
|
if (TextUtils.isEmpty(numStr)) {
|
||||||
|
ToastUtils.show("请输入数量");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TextUtils.isEmpty(textStr)) {
|
||||||
|
ToastUtils.show("请输入金额");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (redType == 2 && TextUtils.isEmpty(kl)) {
|
||||||
|
ToastUtils.show("请输入口令");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
int num = Integer.parseInt(numStr);
|
||||||
|
int text = Integer.parseInt(textStr);
|
||||||
|
|
||||||
|
if (text <= num) {
|
||||||
|
ToastUtils.show("金额必须大于数量");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 发送红包
|
||||||
|
RetrofitClient.getInstance().redPacketCreate(
|
||||||
|
redType,
|
||||||
|
kl,
|
||||||
|
redGold,
|
||||||
|
textStr,
|
||||||
|
numStr,
|
||||||
|
getSelectedConditions(),
|
||||||
|
redTime + "",
|
||||||
|
roomId,
|
||||||
|
mBinding.edBz.getText().toString(),
|
||||||
|
new BaseObserver<String>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(@NotNull Disposable d) {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@NotNull String redPacketBean) {
|
||||||
|
ToastUtils.show("发送成功");
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
ToastUtils.show("请输入有效的数字");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private String getSelectedConditions() {
|
private String getSelectedConditions() {
|
||||||
Button btNone = mBinding.llTj.findViewById(R.id.bt_none);
|
Button btNone = mBinding.llTj.findViewById(R.id.bt_none);
|
||||||
Button btFavoriteRoom = mBinding.llTj.findViewById(R.id.bt_favorite_room);
|
Button btFavoriteRoom = mBinding.llTj.findViewById(R.id.bt_favorite_room);
|
||||||
@@ -193,12 +304,23 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private WalletBean walletBean;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initData() {
|
public void initData() {
|
||||||
|
RetrofitClient.getInstance().wallet(new BaseObserver<WalletBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(Disposable d) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(WalletBean walletBeans) {
|
||||||
|
walletBean = walletBeans;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private void setView(int types) {
|
private void setView(int types) {
|
||||||
type = types;
|
type = types;
|
||||||
switch (types) {
|
switch (types) {
|
||||||
@@ -261,11 +383,11 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setFRed() {
|
private void setFRed() {
|
||||||
if (redGold==0){
|
if (redGold == 1) {
|
||||||
mBinding.tvJeTitle.setText("-"+"金币可用");
|
mBinding.tvJeTitle.setText(walletBean.getCoin() != null ? walletBean.getCoin() : "0" + "金币可用");
|
||||||
mBinding.tvJ.setText("金币");
|
mBinding.tvJ.setText("金币");
|
||||||
}else if (redGold==1){
|
} else if (redGold == 2) {
|
||||||
mBinding.tvJeTitle.setText("-"+"钻石可用");
|
mBinding.tvJeTitle.setText(walletBean.getEarnings() != null ? walletBean.getEarnings() : "0" + "钻石可用");
|
||||||
mBinding.tvJ.setText("钻石");
|
mBinding.tvJ.setText("钻石");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,10 +10,14 @@ import android.view.WindowManager;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.blankj.utilcode.util.ScreenUtils;
|
import com.blankj.utilcode.util.ScreenUtils;
|
||||||
import com.example.moduleroom.R;
|
import com.example.moduleroom.R;
|
||||||
import com.example.moduleroom.adapter.RedBagAdapter;
|
import com.example.moduleroom.adapter.RedBagAdapter;
|
||||||
import com.example.moduleroom.databinding.DialogRedListBinding;
|
import com.example.moduleroom.databinding.DialogRedListBinding;
|
||||||
|
import com.example.moduleroom.fragment.RedEnvelopesFragment;
|
||||||
|
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||||
|
import com.xscm.moduleutil.utils.QXRedPacketManager;
|
||||||
import com.xscm.moduleutil.widget.dialog.BaseDialog;
|
import com.xscm.moduleutil.widget.dialog.BaseDialog;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -25,6 +29,7 @@ import java.util.List;
|
|||||||
public class RedListDialog extends BaseDialog<DialogRedListBinding> {
|
public class RedListDialog extends BaseDialog<DialogRedListBinding> {
|
||||||
|
|
||||||
RedBagAdapter redBagAdapter;
|
RedBagAdapter redBagAdapter;
|
||||||
|
private QXRedPacketManager qxRedPacketManager;
|
||||||
|
|
||||||
public RedListDialog(@NonNull Context context) {
|
public RedListDialog(@NonNull Context context) {
|
||||||
super(context, com.xscm.moduleutil.R.style.BaseDialogStyleH);
|
super(context, com.xscm.moduleutil.R.style.BaseDialogStyleH);
|
||||||
@@ -40,6 +45,7 @@ public class RedListDialog extends BaseDialog<DialogRedListBinding> {
|
|||||||
setCancelable(false);
|
setCancelable(false);
|
||||||
setCanceledOnTouchOutside(false);
|
setCanceledOnTouchOutside(false);
|
||||||
Window window = getWindow();
|
Window window = getWindow();
|
||||||
|
qxRedPacketManager=QXRedPacketManager.getInstance();
|
||||||
|
|
||||||
window.setLayout((int) (ScreenUtils.getScreenWidth() * 375.f / 375), WindowManager.LayoutParams.WRAP_CONTENT);
|
window.setLayout((int) (ScreenUtils.getScreenWidth() * 375.f / 375), WindowManager.LayoutParams.WRAP_CONTENT);
|
||||||
mBinding.ivClose.setOnClickListener(v -> dismiss());
|
mBinding.ivClose.setOnClickListener(v -> dismiss());
|
||||||
@@ -113,19 +119,27 @@ public class RedListDialog extends BaseDialog<DialogRedListBinding> {
|
|||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
|
||||||
List<String> list = new ArrayList<>();
|
redBagAdapter.setNewData(qxRedPacketManager.getAllRedPackets()) ;
|
||||||
list.add("1");
|
redBagAdapter.setOnItemClickListener((adapter, view, position) -> {
|
||||||
list.add("2");
|
RedEnvelopesFragment redEnvelopesFragment = new RedEnvelopesFragment(getContext());
|
||||||
list.add("3");
|
redEnvelopesFragment.setRedPacket(qxRedPacketManager.getAllRedPackets().get(position));
|
||||||
list.add("4");
|
redEnvelopesFragment.show();
|
||||||
list.add("5");
|
|
||||||
list.add("4");
|
});
|
||||||
list.add("5");
|
|
||||||
list.add("4");
|
// List<String> list = new ArrayList<>();
|
||||||
list.add("5");
|
// list.add("1");
|
||||||
list.add("4");
|
// list.add("2");
|
||||||
list.add("5");
|
// list.add("3");
|
||||||
redBagAdapter.setNewData(list);
|
// list.add("4");
|
||||||
|
// list.add("5");
|
||||||
|
// list.add("4");
|
||||||
|
// list.add("5");
|
||||||
|
// list.add("4");
|
||||||
|
// list.add("5");
|
||||||
|
// list.add("4");
|
||||||
|
// list.add("5");
|
||||||
|
// redBagAdapter.setNewData(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -162,8 +162,8 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
|||||||
dataList.add(new RoomSettingBean("背景图片", "ic_bg_image", null, null, RoomSettingBean.QXRoomSettingTypeRoomBgImage, read, isSelected, false, false));
|
dataList.add(new RoomSettingBean("背景图片", "ic_bg_image", null, null, RoomSettingBean.QXRoomSettingTypeRoomBgImage, read, isSelected, false, false));
|
||||||
|
|
||||||
dataList.add(new RoomSettingBean("更多操作", null, null, null, -1, read, isSelected, false, false));
|
dataList.add(new RoomSettingBean("更多操作", null, null, null, -1, read, isSelected, false, false));
|
||||||
// dataList.add(new RoomSettingBean("发红包", "ic_red", null, null, RoomSettingBean.QXRoomSettingTypeRoomFloatingRed, read, isSelected, false, false));
|
dataList.add(new RoomSettingBean("发红包", "ic_red", null, null, RoomSettingBean.QXRoomSettingTypeRoomFloatingRed, read, isSelected, false, false));
|
||||||
dataList.add(new RoomSettingBean("离开房间", "ic_leave", null, null, RoomSettingBean.QXRoomSettingTypeRoomLeave, read, isSelected, false, false));
|
// dataList.add(new RoomSettingBean("离开房间", "ic_leave", null, null, RoomSettingBean.QXRoomSettingTypeRoomLeave, read, isSelected, false, false));
|
||||||
// dataList.add(new RoomSettingBean("分享房间", "ic_share", null, null, RoomSettingBean.QXRoomSettingTypeRoomShare, read, isSelected, false, false));
|
// dataList.add(new RoomSettingBean("分享房间", "ic_share", null, null, RoomSettingBean.QXRoomSettingTypeRoomShare, read, isSelected, false, false));
|
||||||
dataList.add(new RoomSettingBean("调音台", "ic_my_dress", null, null, RoomSettingBean.QXRoomSettingTypeRoomMyDress, read, isSelected, false, false));
|
dataList.add(new RoomSettingBean("调音台", "ic_my_dress", null, null, RoomSettingBean.QXRoomSettingTypeRoomMyDress, read, isSelected, false, false));
|
||||||
dataList.add(new RoomSettingBean("房间设置", "ic_room_setting", null, null, RoomSettingBean.QXRoomSettingTypeRoomSetting, read, isSelected, false, false));
|
dataList.add(new RoomSettingBean("房间设置", "ic_room_setting", null, null, RoomSettingBean.QXRoomSettingTypeRoomSetting, read, isSelected, false, false));
|
||||||
@@ -263,9 +263,11 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
|||||||
EventBus.getDefault().post(new MusicEvent());
|
EventBus.getDefault().post(new MusicEvent());
|
||||||
|
|
||||||
dismiss();
|
dismiss();
|
||||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomLeave) {
|
}
|
||||||
EventBus.getDefault().post(new RoomOutEvent());
|
// else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomLeave) {
|
||||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeSing) {
|
// EventBus.getDefault().post(new RoomOutEvent());
|
||||||
|
// }
|
||||||
|
else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeSing) {
|
||||||
// MvpPre.changeRoomType(roomId, "1");
|
// MvpPre.changeRoomType(roomId, "1");
|
||||||
queren("1");
|
queren("1");
|
||||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeAuction) {
|
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeAuction) {
|
||||||
@@ -320,15 +322,15 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
|||||||
}
|
}
|
||||||
upAdapter();
|
upAdapter();
|
||||||
}
|
}
|
||||||
// else if (bean.getType()==RoomSettingBean.QXRoomSettingTypeRoomFloatingRed){
|
else if (bean.getType()==RoomSettingBean.QXRoomSettingTypeRoomFloatingRed){
|
||||||
//
|
|
||||||
// if (getActivity() instanceof RoomActivity) {
|
if (getActivity() instanceof RoomActivity) {
|
||||||
// ((RoomActivity) getActivity()).redDialogView();
|
((RoomActivity) getActivity()).redDialogView();
|
||||||
// }
|
}
|
||||||
// dismiss();
|
dismiss();
|
||||||
//
|
|
||||||
//
|
|
||||||
// }
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -395,7 +397,7 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (type >= RoomSettingBean.QXRoomSettingTypeRoomLeave &&
|
if (type >= RoomSettingBean.QXRoomSettingTypeRoomLeave &&
|
||||||
type <= RoomSettingBean.QXRoomSettingTypeRoomReport
|
type <= RoomSettingBean.QXRoomSettingTypeRoomReport || type == RoomSettingBean.QXRoomSettingTypeRoomFloatingRed
|
||||||
) {
|
) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
@@ -428,6 +430,7 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
|||||||
type == RoomSettingBean.QXRoomSettingTypeRoomMyDress ||
|
type == RoomSettingBean.QXRoomSettingTypeRoomMyDress ||
|
||||||
type == RoomSettingBean.QXRoomSettingTypeRoomCloseEffects ||
|
type == RoomSettingBean.QXRoomSettingTypeRoomCloseEffects ||
|
||||||
type == RoomSettingBean.QXRoomSettingTypeRoomReport ||
|
type == RoomSettingBean.QXRoomSettingTypeRoomReport ||
|
||||||
|
type == RoomSettingBean.QXRoomSettingTypeRoomFloatingRed||
|
||||||
type == RoomSettingBean.QXRoomSettingTypeRoomFloatingScreen;
|
type == RoomSettingBean.QXRoomSettingTypeRoomFloatingScreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -889,6 +889,7 @@ public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEa
|
|||||||
case 1056:
|
case 1056:
|
||||||
case 1057:
|
case 1057:
|
||||||
case 1059:
|
case 1059:
|
||||||
|
case 1060:
|
||||||
case 1025:
|
case 1025:
|
||||||
case 1058:
|
case 1058:
|
||||||
// EventBus.getDefault().post(message);
|
// EventBus.getDefault().post(message);
|
||||||
|
|||||||
@@ -8,11 +8,19 @@ import android.view.WindowManager;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.blankj.utilcode.util.ScreenUtils;
|
import com.blankj.utilcode.util.ScreenUtils;
|
||||||
|
import com.blankj.utilcode.util.ToastUtils;
|
||||||
import com.example.moduleroom.R;
|
import com.example.moduleroom.R;
|
||||||
import com.example.moduleroom.databinding.FragmentRedEnvelopesBinding;
|
import com.example.moduleroom.databinding.FragmentRedEnvelopesBinding;
|
||||||
|
import com.xscm.moduleutil.bean.RedPackGrab;
|
||||||
|
import com.xscm.moduleutil.bean.RedPacketInfo;
|
||||||
|
import com.xscm.moduleutil.event.RedEnvelopeStatus;
|
||||||
|
import com.xscm.moduleutil.http.BaseObserver;
|
||||||
|
import com.xscm.moduleutil.http.RetrofitClient;
|
||||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||||
|
import com.xscm.moduleutil.utils.ImageUtils;
|
||||||
import com.xscm.moduleutil.view.QXRedBagSendView;
|
import com.xscm.moduleutil.view.QXRedBagSendView;
|
||||||
import com.xscm.moduleutil.widget.dialog.BaseDialog;
|
import com.xscm.moduleutil.widget.dialog.BaseDialog;
|
||||||
|
import io.reactivex.disposables.Disposable;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -23,6 +31,8 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
public class RedEnvelopesFragment extends BaseDialog<FragmentRedEnvelopesBinding> {
|
public class RedEnvelopesFragment extends BaseDialog<FragmentRedEnvelopesBinding> {
|
||||||
|
private RedEnvelopeStatus mCurrentStatus;
|
||||||
|
private RedPacketInfo mRedPacketInfo;
|
||||||
public RedEnvelopesFragment(@NonNull @NotNull Context context) {
|
public RedEnvelopesFragment(@NonNull @NotNull Context context) {
|
||||||
super(context, com.xscm.moduleutil.R.style.BaseDialogStyleH);
|
super(context, com.xscm.moduleutil.R.style.BaseDialogStyleH);
|
||||||
}
|
}
|
||||||
@@ -54,13 +64,50 @@ public class RedEnvelopesFragment extends BaseDialog<FragmentRedEnvelopesBinding
|
|||||||
mBinding.imRedK.setOnClickListener(new View.OnClickListener() {
|
mBinding.imRedK.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
ARouter.getInstance().build(ARouteConstants.ROOM_RED_RESULT).navigation();
|
RetrofitClient.getInstance().grab(mRedPacketInfo.getRedpacket_id(), new BaseObserver<RedPackGrab>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(@NotNull Disposable d) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@NotNull RedPackGrab redPackGrab) {
|
||||||
|
if (redPackGrab!=null){
|
||||||
|
if (redPackGrab.getCode()==1){
|
||||||
|
ARouter.getInstance().build(ARouteConstants.ROOM_RED_RESULT).withString("redpacketId", mRedPacketInfo.getRedpacket_id()).navigation();
|
||||||
|
}else if (redPackGrab.getCode()==2){
|
||||||
|
ToastUtils.showShort("您已经抢过红包了");
|
||||||
|
ARouter.getInstance().build(ARouteConstants.ROOM_RED_RESULT).withString("redpacketId", mRedPacketInfo.getRedpacket_id()).navigation();
|
||||||
|
}else {
|
||||||
|
snatched();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// QXRedBagSendView redBagView = new QXRedBagSendView(getContext());
|
// QXRedBagSendView redBagView = new QXRedBagSendView(getContext());
|
||||||
// redBagView.showInView((ViewGroup) getWindow().getDecorView());
|
// redBagView.showInView((ViewGroup) getWindow().getDecorView());
|
||||||
dismiss();
|
dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
mBinding.tvCk.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
ARouter.getInstance().build(ARouteConstants.ROOM_RED_RESULT).withString("redpacketId", mRedPacketInfo.getRedpacket_id()).navigation();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void snatched(){
|
||||||
|
mBinding.tvRedCount.setText("手慢,没有抢到");
|
||||||
|
mBinding.imRedK.setVisibility(View.GONE);
|
||||||
|
mBinding.textPl.setVisibility(View.GONE);
|
||||||
|
mBinding.tvTitle.setVisibility(View.GONE);
|
||||||
|
mBinding.tvPinl.setVisibility(View.GONE);
|
||||||
|
mBinding.tvKl.setVisibility(View.GONE);
|
||||||
|
mBinding.tvCk.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -69,4 +116,33 @@ public class RedEnvelopesFragment extends BaseDialog<FragmentRedEnvelopesBinding
|
|||||||
public int getLayoutId() {
|
public int getLayoutId() {
|
||||||
return R.layout.fragment_red_envelopes;
|
return R.layout.fragment_red_envelopes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setRedPacket(RedPacketInfo redPacketInfo) {
|
||||||
|
this.mRedPacketInfo = redPacketInfo;
|
||||||
|
ImageUtils.loadHeadCC(redPacketInfo.getAvatar(), mBinding.userAvatar);
|
||||||
|
mBinding.tvUserName.setText(redPacketInfo.getNickname());
|
||||||
|
mBinding.tvRedCount.setText(redPacketInfo.getRemark());
|
||||||
|
// 根据红包信息确定当前状态
|
||||||
|
// if (redPacketInfo.isHasCountdown() && redPacketInfo.isHasCondition()) {
|
||||||
|
// mCurrentStatus = RedEnvelopeStatus.COUNTDOWN_AND_CONDITION;
|
||||||
|
// handleCountdownAndCondition();
|
||||||
|
// } else if (redPacketInfo.isHasCountdown()) {
|
||||||
|
// mCurrentStatus = RedEnvelopeStatus.COUNTDOWN_TO_OPEN;
|
||||||
|
// handleCountdown();
|
||||||
|
// } else if (redPacketInfo.isHasCondition()) {
|
||||||
|
// mCurrentStatus = RedEnvelopeStatus.CONDITION_TO_OPEN;
|
||||||
|
// handleCondition();
|
||||||
|
// } else {
|
||||||
|
mCurrentStatus = RedEnvelopeStatus.READY_TO_OPEN;//红包可以直接抢的
|
||||||
|
handleReadyToOpen();
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleReadyToOpen() {
|
||||||
|
mBinding.textPl.setVisibility(View.GONE);
|
||||||
|
mBinding.tvTitle.setVisibility(View.GONE);
|
||||||
|
mBinding.tvPinl.setVisibility(View.GONE);
|
||||||
|
mBinding.tvKl.setVisibility(View.VISIBLE);
|
||||||
|
mBinding.imRedK.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,37 @@ package com.example.moduleroom.presenter;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import com.example.moduleroom.contacts.RedEnvelopesContacts;
|
import com.example.moduleroom.contacts.RedEnvelopesContacts;
|
||||||
|
import com.xscm.moduleutil.bean.RedpacketDetail;
|
||||||
|
import com.xscm.moduleutil.http.BaseObserver;
|
||||||
import com.xscm.moduleutil.presenter.BasePresenter;
|
import com.xscm.moduleutil.presenter.BasePresenter;
|
||||||
|
import io.reactivex.disposables.Disposable;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.lang.ref.WeakReference;
|
||||||
|
|
||||||
public class RedEnvelopesPresenter extends BasePresenter<RedEnvelopesContacts.View> implements RedEnvelopesContacts.IRoomPre{
|
public class RedEnvelopesPresenter extends BasePresenter<RedEnvelopesContacts.View> implements RedEnvelopesContacts.IRoomPre{
|
||||||
|
RedEnvelopesContacts.View mView;
|
||||||
public RedEnvelopesPresenter(RedEnvelopesContacts.View view, Context context) {
|
public RedEnvelopesPresenter(RedEnvelopesContacts.View view, Context context) {
|
||||||
super(view, context);
|
super(view, context);
|
||||||
|
mView = view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getRedpacketDetail(String redpacketId) {
|
||||||
|
api.redPacketDetail(redpacketId, new BaseObserver<RedpacketDetail>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(@NotNull Disposable d) {
|
||||||
|
addDisposable(d);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@NotNull RedpacketDetail redpacketDetail) {
|
||||||
|
if (MvpRef==null){
|
||||||
|
MvpRef=new WeakReference<>(mView);
|
||||||
|
}
|
||||||
|
MvpRef.get().redPacketDetail(redpacketDetail);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import android.content.Context;
|
|||||||
import com.blankj.utilcode.util.LogUtils;
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
import com.example.moduleroom.contacts.RoomContacts;
|
import com.example.moduleroom.contacts.RoomContacts;
|
||||||
import com.xscm.moduleutil.base.CommonAppContext;
|
import com.xscm.moduleutil.base.CommonAppContext;
|
||||||
|
import com.xscm.moduleutil.bean.RedPacketInfo;
|
||||||
import com.xscm.moduleutil.bean.RoomCharmRankBean;
|
import com.xscm.moduleutil.bean.RoomCharmRankBean;
|
||||||
import com.xscm.moduleutil.bean.UserOnlineStatusBean;
|
import com.xscm.moduleutil.bean.UserOnlineStatusBean;
|
||||||
import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
||||||
@@ -21,6 +22,7 @@ import java.lang.ref.WeakReference;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import io.reactivex.disposables.Disposable;
|
import io.reactivex.disposables.Disposable;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public class RoomPresenter extends BasePresenter<RoomContacts.View> implements RoomContacts.IRoomPre {
|
public class RoomPresenter extends BasePresenter<RoomContacts.View> implements RoomContacts.IRoomPre {
|
||||||
RoomContacts.View mView;
|
RoomContacts.View mView;
|
||||||
@@ -443,4 +445,23 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void roomRedPackets(String roomId) {
|
||||||
|
api.roomRedPackets(roomId,new BaseObserver<List<RedPacketInfo>>(){
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(@NotNull Disposable d) {
|
||||||
|
addDisposable(d);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@NotNull List<RedPacketInfo> redPacketInfos) {
|
||||||
|
if (MvpRef==null){
|
||||||
|
MvpRef=new WeakReference<>(mView);
|
||||||
|
}
|
||||||
|
MvpRef.get().roomRedPackets(redPacketInfos);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -394,6 +394,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
|
android:id="@+id/ed_text"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/dp_26"
|
android:layout_height="@dimen/dp_26"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
@@ -405,6 +406,7 @@
|
|||||||
android:layout_toStartOf="@+id/tv_j"
|
android:layout_toStartOf="@+id/tv_j"
|
||||||
android:textColorHint="#999"
|
android:textColorHint="#999"
|
||||||
android:textColor="#333"
|
android:textColor="#333"
|
||||||
|
android:inputType="number"
|
||||||
android:hint="请输入金额"/>
|
android:hint="请输入金额"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -448,6 +450,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
|
android:id="@+id/et_num"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/dp_26"
|
android:layout_height="@dimen/dp_26"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
@@ -459,6 +462,7 @@
|
|||||||
android:layout_toStartOf="@+id/tv_g"
|
android:layout_toStartOf="@+id/tv_g"
|
||||||
android:textColorHint="#999"
|
android:textColorHint="#999"
|
||||||
android:textColor="#333"
|
android:textColor="#333"
|
||||||
|
android:inputType="number"
|
||||||
android:hint="请输入数量"/>
|
android:hint="请输入数量"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -576,6 +580,7 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"/>
|
app:layout_constraintStart_toStartOf="parent"/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
|
android:id="@+id/ed_bz"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="@dimen/dp_26"
|
android:layout_height="@dimen/dp_26"
|
||||||
android:layout_weight="2"
|
android:layout_weight="2"
|
||||||
|
|||||||
@@ -91,6 +91,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tv_jb"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="#fff"
|
android:textColor="#fff"
|
||||||
|
|||||||
@@ -139,6 +139,23 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_ck"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_26"
|
||||||
|
android:textColor="#fff"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
android:layout_marginBottom="@dimen/dp_63"
|
||||||
|
android:text="查看大家的手气>"
|
||||||
|
android:gravity="center"
|
||||||
|
tools:ignore="HardcodedText"
|
||||||
|
tools:text="查看大家手气"
|
||||||
|
android:visibility="gone"
|
||||||
|
/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/text_share"
|
android:id="@+id/text_share"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|||||||
Reference in New Issue
Block a user