巡乐会添加榜单和记录

剩余转盘,屏幕适配器
This commit is contained in:
2025-09-04 19:36:17 +08:00
parent 41c9e9d5d6
commit 1b8af0e733
97 changed files with 1682 additions and 150 deletions

View File

@@ -156,6 +156,9 @@ dependencies {
api(libs.zcw.togglebutton.library)
//图片模糊
api(libs.com.github.mmin18.realtimeblurview)
api 'com.baoyz.actionsheet:library:1.1.7'
//播放器
//腾讯直播sdk
api('com.tencent.liteav:LiteAVSDK_Professional:10.9.0.13102')

View File

@@ -23,4 +23,5 @@ public class GiftBean {
private String nickname;
private int count;
private String user_id;
private int num;
}

View File

@@ -91,6 +91,9 @@ public class RoomMessageEvent {
private BlindBoxBean.XlhData xlh_data;
private String from_pit_number;
private String to_pit_number;
private String gift_num;
}
@Data

View File

@@ -137,6 +137,7 @@ public class BlindBoxBean {
private String gift_name;
private String base_image;
private String gift_num;
private String gift_price;
}
@Data

View File

@@ -0,0 +1,16 @@
package com.xscm.moduleutil.bean.blindboxwheel;
import lombok.Data;
/**
*@author qx
*@data 2025/9/4
*@description: 巡乐会抽奖
*/
@Data
public class XlhDrawBean {
private int gift_id;
private String gift_name;
private String gift_base_image;
private String gift_price;
private int count ;
}

View File

@@ -101,7 +101,7 @@ public class EMMessageInfo implements MultiItemEntity {
///巡乐会
public static final int QXRoomMessageTypeXlh = 1057;
///
///房间内换麦
public static final int QXRoomMessageTypehm = 1039;
private RoomMessageEvent emMessage;

View File

@@ -86,6 +86,9 @@ public class WebViewDialog extends BaseDialog<WebViewDialogBinding> {
}else if (type==12){
mBinding.gzCl.setBackgroundResource(R.mipmap.skzj);
mBinding.imGz.setImageResource(R.mipmap.skzj_gz);
}else if (type==13){
mBinding.gzCl.setBackgroundResource(R.mipmap.xlh);
mBinding.imGz.setImageResource(R.mipmap.xlh_gz);
}
}

View File

@@ -8,6 +8,7 @@ import com.xscm.moduleutil.bean.GiftBean;
import com.xscm.moduleutil.bean.WalletBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindBoxBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindReslutBean;
import com.xscm.moduleutil.bean.blindboxwheel.XlhDrawBean;
import java.util.List;
@@ -22,6 +23,8 @@ public class GiftLotteryContacts {
void finishRefreshLoadMore();
void wallet(WalletBean walletBean);
void xlhChouSuccess(List<XlhDrawBean> data);
}
public interface IRoomPre extends IPresenter {
@@ -36,5 +39,11 @@ public class GiftLotteryContacts {
void wallet();
void xlh(String room_id);
void xlhChou(String room_id,String num);
void xlhAllRecord(String room_id,String page,String pageSize);
void xlhMyRecord(String room_id,String page,String pageSize);
}
}

View File

@@ -17,6 +17,7 @@ import android.widget.GridView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentManager;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@@ -30,6 +31,7 @@ import com.xscm.moduleutil.bean.RoomMessageEvent;
import com.xscm.moduleutil.bean.WalletBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindBoxBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindReslutBean;
import com.xscm.moduleutil.bean.blindboxwheel.XlhDrawBean;
import com.xscm.moduleutil.databinding.DialogGiftLotteryBinding;
import com.xscm.moduleutil.dialog.WebViewDialog;
import com.xscm.moduleutil.event.LotteryEvent;
@@ -91,6 +93,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
private int type;//10:对应天空之境 11对应岁月之城 12对应时空之巅
private GiftLotteryDialogFragment giftLotteryDialogFragment;
private String blind_box_turntable_id = "";//本次抽奖标识id
private BlindBoxBean.XlhData xlhData;
@Override
protected GiftLotteryPresenter bindPresenter() {
@@ -361,7 +364,17 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
giftLotteryDialogFragment = GiftLotteryDialogFragment.newInstance(giftBagId);
giftLotteryDialogFragment.show(getChildFragmentManager(), "GiftLotteryDialogFragment");
}else if (id == R.id.tv_start){
if (xlhData!=null){
if (xlhData.getStatus()==1){
FragmentManager fm = getParentFragmentManager();
if (fm != null && !fm.isDestroyed()) {
TourClubDialogFragment newDialog = TourClubDialogFragment.newInstance(
roomId);
newDialog.show(fm, "TourClubDialogFragment");
}
this.dismissAllowingStateLoss();
}
}
}
}
@@ -651,7 +664,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
private void UpView(BlindBoxBean.XlhData xlhData) {
if (xlhData != null) {
this.xlhData = xlhData;
int currentNum = xlhData.getCurrent_num();
int startNum = Integer.parseInt(xlhData.getStart_num());
int waitingStartNum = Integer.parseInt(xlhData.getWaiting_start_num());
@@ -689,8 +702,8 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
mBinding.pinnacleTime.tvStart.setBackgroundResource(R.mipmap.zhensgh);
} else if (xlhData.getStatus() == 2) {
mBinding.mirroeSky.tvStart.setBackgroundResource(R.mipmap.jijang);
mBinding.cityTime.tvStart.setBackgroundResource(R.mipmap.zhensgh);
mBinding.pinnacleTime.tvStart.setBackgroundResource(R.mipmap.zhensgh);
mBinding.cityTime.tvStart.setBackgroundResource(R.mipmap.jijang);
mBinding.pinnacleTime.tvStart.setBackgroundResource(R.mipmap.jijang);
}
}
}
@@ -768,6 +781,11 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
}
@Override
public void xlhChouSuccess(List<XlhDrawBean> data) {
}
// TODO: 2025/8/29 接收im推送过来的消息
@Subscribe(threadMode = ThreadMode.MAIN)
public void onMusicPlay(RoomMessageEvent message) {

View File

@@ -23,6 +23,7 @@ import com.xscm.moduleutil.bean.GiftBean;
import com.xscm.moduleutil.bean.WalletBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindBoxBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindReslutBean;
import com.xscm.moduleutil.bean.blindboxwheel.XlhDrawBean;
import com.xscm.moduleutil.databinding.DialogGiftLotteryFragmentBinding;
import com.xscm.moduleutil.widget.pagerecyclerview.PagerGridSnapHelper;
@@ -134,20 +135,6 @@ public class GiftLotteryDialogFragment extends BaseMvpDialogFragment<GiftLottery
mBinding.textView1.setOnClickListener(this::onClick);
mBinding.textView2.setOnClickListener(this::onClick);
// 根据屏幕密度调整行数和列数
int rows, columns;
float density = this.getResources().getDisplayMetrics().density;
if (density <= 2.0) { // 低密度屏幕如mdpi, hdpi
rows = 3;
columns = 3;
} else if (density <= 3.0) { // 中密度屏幕如xhdpi
rows = 4;
columns = 3;
} else { // 高密度屏幕如xxhdpi, xxxhdpi
rows = 5;
columns = 3;
}
adapter=new GiftLotteryAdapter();
giftRecordAdapte=new GiftRecordAdapte();
@@ -258,4 +245,9 @@ public class GiftLotteryDialogFragment extends BaseMvpDialogFragment<GiftLottery
public void wallet(WalletBean walletBean) {
}
@Override
public void xlhChouSuccess(List<XlhDrawBean> data) {
}
}

View File

@@ -6,6 +6,7 @@ import com.xscm.moduleutil.bean.GiftBean;
import com.xscm.moduleutil.bean.WalletBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindBoxBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindReslutBean;
import com.xscm.moduleutil.bean.blindboxwheel.XlhDrawBean;
import com.xscm.moduleutil.http.BaseObserver;
import com.xscm.moduleutil.presenter.BasePresenter;
@@ -124,10 +125,82 @@ public class GiftLotteryPresenter extends BasePresenter<GiftLotteryContacts.View
}
});
}
///巡乐会
@Override
public void xlh(String room_id) {
// api.xlh(room_id, new BaseObserver<String>() {)
api.getBoxGiftListXLH(room_id, new BaseObserver<BlindBoxBean>() {
@Override
public void onSubscribe(Disposable d) {
addDisposable( d);
}
@Override
public void onNext(BlindBoxBean blindBoxBeans) {
if (MvpRef==null){
MvpRef=new WeakReference<>(mView);
}
MvpRef.get().getGiftListSuccess(blindBoxBeans);
}
});
}
@Override
public void xlhChou(String room_id, String num) {
api.xlhChou(room_id,num, new BaseObserver<List<XlhDrawBean>>() {
@Override
public void onSubscribe(Disposable d) {
addDisposable(d);
}
@Override
public void onNext(List<XlhDrawBean> xlhDrawBeans) {
if (MvpRef==null){
MvpRef=new WeakReference<>(mView);
}
MvpRef.get().xlhChouSuccess(xlhDrawBeans);
}
});
}
@Override
public void xlhAllRecord(String room_id, String page, String pageSize) {
api.xlhAllRecord(room_id,page,pageSize,new BaseObserver<List<GiftBean>>() {
@Override
public void onSubscribe(Disposable d) {
addDisposable(d);
}
@Override
public void onNext(List<GiftBean> giftBean) {
if (MvpRef==null){
MvpRef=new WeakReference<>(mView);
}
MvpRef.get().getAllRecordSuccess(giftBean);
MvpRef.get().finishRefreshLoadMore();
}
});
}
@Override
public void xlhMyRecord(String room_id, String page, String pageSize) {
api.xlhMyRecord(room_id,page,pageSize,new BaseObserver<List<GiftBean>>() {
@Override
public void onSubscribe(Disposable d) {
addDisposable(d);
}
@Override
public void onNext(List<GiftBean> giftBeans) {
if (MvpRef == null) {
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().getMyRecordSuccess(giftBeans);
MvpRef.get().finishRefreshLoadMore();
}
});
}
}

View File

@@ -0,0 +1,46 @@
package com.xscm.moduleutil.dialog.giftLottery;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.style.ForegroundColorSpan;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xscm.moduleutil.R;
import com.xscm.moduleutil.bean.GiftBean;
import com.xscm.moduleutil.utils.ImageUtils;
public class GiftRecordAdapter extends BaseQuickAdapter<GiftBean, BaseViewHolder> {
public GiftRecordAdapter() {
super(R.layout.item_my_record);
}
@Override
protected void convert(BaseViewHolder helper, GiftBean item) {
helper.setText(R.id.tv_gift_time, item.getCreatetime());
ImageUtils.loadHeadCC(item.getBase_image(),helper.getView(R.id.iv_gift_image));
// 使用 SpannableString 给 "x4" 设置不同颜色
TextView giftNameTextView = helper.getView(R.id.tv_gift_name);
if (giftNameTextView != null) {
String baseName = item.getGift_name();
String countText = "x"+item.getCount();
String fullText = baseName + countText;
SpannableStringBuilder spannable = new SpannableStringBuilder(fullText);
// 给 "x4" 部分设置颜色
spannable.setSpan(
new ForegroundColorSpan(mContext.getResources().getColor(R.color.color_C7BF62)), // 替换为实际颜色
baseName.length(),
fullText.length(),
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
);
giftNameTextView.setText(spannable);
}
}
}

View File

@@ -0,0 +1,20 @@
package com.xscm.moduleutil.dialog.giftLottery;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xscm.moduleutil.R;
import com.xscm.moduleutil.bean.GiftBean;
import com.xscm.moduleutil.utils.ImageUtils;
public class GiftXlhChouAdapter extends BaseQuickAdapter<GiftBean, BaseViewHolder> {
public GiftXlhChouAdapter() {
super(R.layout.item_xlh);
}
@Override
protected void convert(BaseViewHolder helper, GiftBean item) {
helper.setText(R.id.tv_gift_name, item.getGift_name());
helper.setText(R.id.tv_gift_pic, item.getGift_price());
ImageUtils.loadHeadCC(item.getBase_image(),helper.getView(R.id.iv_gift_image));
}
}

View File

@@ -21,10 +21,11 @@ import com.xscm.moduleutil.utils.ImageUtils;
*/
public class PrizePoolAdapter extends BaseQuickAdapter<GiftBean, BaseViewHolder> {
private Context context;
private int type;
public PrizePoolAdapter() {
public PrizePoolAdapter(int type) {
super(R.layout.item_prize_pool);
this.type = type;
}
@@ -32,6 +33,13 @@ public class PrizePoolAdapter extends BaseQuickAdapter<GiftBean, BaseViewHolder>
@Override
protected void convert(BaseViewHolder helper, GiftBean item) {
if (type == 10 || type == 12){
helper.setImageResource(R.id.iv_prize_pool,R.mipmap.tkzj_z);
}else {
helper.setImageResource(R.id.iv_prize_pool,R.mipmap.xlh_hd);
}
helper.setText(R.id.tv_gift_name, item.getGift_name());
helper.setText(R.id.tv_gift_pic, item.getGift_price());
ImageUtils.loadHeadCC(item.getBase_image(),helper.getView(R.id.iv_gift_image));

View File

@@ -88,6 +88,9 @@ public class PrizePoolDialog extends BaseDialog<DialogPrizePoolBinding> {
} else if (type == 12) {
mBinding.clPrize.setBackgroundResource(R.mipmap.skzj);
mBinding.imJc.setImageResource(R.mipmap.skzl_jc);
}else if (type == 13){
mBinding.clPrize.setBackgroundResource(R.mipmap.xlh);
mBinding.imJc.setImageResource(R.mipmap.xlh_jc);
}
// 根据屏幕密度调整行数和列数
@@ -108,7 +111,7 @@ public class PrizePoolDialog extends BaseDialog<DialogPrizePoolBinding> {
if (newData != null && !newData.isEmpty()) {
this.gift_list = newData;
if (mBinding != null && mContext != null) {
PrizePoolAdapter prizePoolAdapter = new PrizePoolAdapter();
PrizePoolAdapter prizePoolAdapter = new PrizePoolAdapter(type);
GridLayoutManager layoutManager = new GridLayoutManager(getContext(), 3);
// PagerGridLayoutManager layoutManager = new PagerGridLayoutManager(rows, columns, PagerGridLayoutManager.VERTICAL);
mBinding.gvGift.setLayoutManager(layoutManager);

View File

@@ -1,29 +1,87 @@
package com.xscm.moduleutil.dialog.giftLottery;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.blankj.utilcode.util.TimeUtils;
import com.xscm.moduleutil.R;
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
import com.xscm.moduleutil.bean.GiftBean;
import com.xscm.moduleutil.bean.RoomMessageEvent;
import com.xscm.moduleutil.bean.WalletBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindBoxBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindReslutBean;
import com.xscm.moduleutil.bean.blindboxwheel.XlhDrawBean;
import com.xscm.moduleutil.databinding.FragmentTourClubDialogBinding;
import com.xscm.moduleutil.dialog.WebViewDialog;
import com.xscm.moduleutil.utils.ImageUtils;
import com.xscm.moduleutil.widget.InfintLinearLayoutManager;
import com.xscm.moduleutil.widget.pagerecyclerview.PagerGridSnapHelper;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.util.ArrayList;
import java.util.List;
public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPresenter, FragmentTourClubDialogBinding> implements GiftLotteryContacts.View {
private String roomId;
private List<GiftBean> giftLists = new ArrayList<>();
private String getRule_url;
private CountDownTimer mCountDownTimer;
private long endTime; // 服务器返回的结束时间戳
private String num;
private XlhRankingDialog xlhRankingDialog;
private XlhRecordDialog xlhRecordDialog;
private GiftXlhChouAdapter giftXlhChouAdapter;
@Override
protected GiftLotteryPresenter bindPresenter() {
return new GiftLotteryPresenter(this, getActivity());
}
public static TourClubDialogFragment newInstance(String roomId) {
TourClubDialogFragment dialog = new TourClubDialogFragment();
Bundle args = new Bundle();
args.putString("roomId", roomId);
dialog.setArguments(args);
return dialog;
}
@Nullable
@Override
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
Dialog dialog = super.onCreateDialog(savedInstanceState);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setCancelable(true);
if (!EventBus.getDefault().isRegistered(this))
EventBus.getDefault().register(this);
return dialog;
}
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
roomId = getArguments().getString("roomId");
}
@Override
protected void initData() {
MvpPre.xlh(roomId);
MvpPre.wallet();
}
@Override
@@ -31,6 +89,7 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
super.initDialogStyle(window);
window.setGravity(Gravity.BOTTOM);
}
@Override
public void onStart() {
super.onStart();
@@ -50,21 +109,73 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
window.setWindowAnimations(R.style.CommonShowDialogBottom);
}
}
@Override
protected void initView() {
mBinding.tvJc.setOnClickListener(this::onClick);
mBinding.llOne.setOnClickListener(this::onClick);
mBinding.llTen.setOnClickListener(this::onClick);
mBinding.llHundred.setOnClickListener(this::onClick);
mBinding.tvGz.setOnClickListener(this::onClick);
mBinding.tvBd.setOnClickListener(this::onClick);
mBinding.tvJl.setOnClickListener(this::onClick);
giftXlhChouAdapter=new GiftXlhChouAdapter();
GridLayoutManager layoutManager = new GridLayoutManager(getActivity(), 3);
mBinding.recycleView.setLayoutManager(new InfintLinearLayoutManager(mBinding.recycleView));
mBinding.recycleView.setOnFlingListener(null);
// 设置滚动辅助工具
PagerGridSnapHelper pageSnapHelper = new PagerGridSnapHelper();
pageSnapHelper.attachToRecyclerView(mBinding.recycleView);
mBinding.recycleView.setAdapter(giftXlhChouAdapter);
}
private void onClick(View view) {
int id = view.getId();
if (id==R.id.tv_jc){
// if (giftLists != null && !giftLists.isEmpty()) {
// PrizePoolDialog prizePoolDialog = new PrizePoolDialog(getActivity());
// prizePoolDialog.updateData(giftLists, type);
// prizePoolDialog.show();
// } else {
// com.hjq.toast.ToastUtils.show("奖池数据加载中,请稍后再试");
// }
if (id == R.id.tv_jc) {
if (giftLists != null && !giftLists.isEmpty()) {
PrizePoolDialog prizePoolDialog = new PrizePoolDialog(getActivity());
prizePoolDialog.updateData(giftLists, 13);
prizePoolDialog.show();
} else {
com.hjq.toast.ToastUtils.show("奖池数据加载中,请稍后再试");
}
} else if (id == R.id.ll_one) {
num="1";
MvpPre.xlhChou(roomId,num);
} else if (id == R.id.ll_ten) {
num="10";
MvpPre.xlhChou(roomId,num);
} else if (id == R.id.ll_hundred) {
num="100";
MvpPre.xlhChou(roomId,num);
}else if (id == R.id.tv_gz){
Bundle bundle = new Bundle();
bundle.putString("url", getRule_url);
bundle.putInt("type", 13);
WebViewDialog dialog = new WebViewDialog(getActivity(), bundle);
dialog.show();
}else if (id == R.id.tv_bd){
// 如果当前dialog存在且正在显示先关闭
if (xlhRankingDialog != null && xlhRankingDialog.isVisible()) {
xlhRankingDialog.dismiss();
}
xlhRankingDialog = XlhRankingDialog.newInstance(roomId);
xlhRankingDialog.show(getChildFragmentManager(), "XlhRankingDialog");
}else if (id == R.id.tv_jl){
// 如果当前dialog存在且正在显示先关闭
if (xlhRecordDialog != null && xlhRecordDialog.isVisible()) {
xlhRecordDialog.dismiss();
}
xlhRecordDialog = XlhRecordDialog.newInstance(roomId);
xlhRecordDialog.show(getChildFragmentManager(), "XlhRecordDialog");
}
}
@@ -75,9 +186,147 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
@Override
public void getGiftListSuccess(BlindBoxBean blindBoxBean) {
if (blindBoxBean != null) {
getRule_url=blindBoxBean.getRule_url();
upTitle(blindBoxBean.getBox_price());
giftLists = blindBoxBean.getGift_list();
// 获取结束时间并启动倒计时
if (blindBoxBean.getXlh_end_time() != null && !blindBoxBean.getXlh_end_time().isEmpty()) {
try {
// 假设 end_time 是时间戳字符串
endTime = Long.parseLong(blindBoxBean.getXlh_end_time());
startCountdown();
} catch (NumberFormatException e) {
// 如果不是时间戳,可能是日期字符串,需要相应解析
// 例如2025-08-26 19:10:47
// 可以使用 SimpleDateFormat 解析
e.printStackTrace();
}
}
if (blindBoxBean.getGive_homeowner_gift() != null) {
ImageUtils.loadHeadCC(blindBoxBean.getGive_homeowner_gift().getBase_image(), mBinding.giveIm);
}
if (blindBoxBean.getLocking_gift()!=null){
ImageUtils.loadHeadCC(blindBoxBean.getLocking_gift().getBase_image(), mBinding.giftImg);
mBinding.tvGiftName.setText(blindBoxBean.getLocking_gift().getGift_name());
mBinding.tvGiftPrice.setText(blindBoxBean.getLocking_gift().getGift_price());
mBinding.tvGiftCount.setText(blindBoxBean.getLocking_gift().getGift_num());
}
if (blindBoxBean.getXlh_user()!=null){
ImageUtils.loadHeadCC(blindBoxBean.getXlh_user().getAvatar(), mBinding.userPic);
mBinding.userName.setText(blindBoxBean.getXlh_user().getNickname());
}
giftXlhChouAdapter.setNewData(giftLists);
}
}
// TODO: 2025/9/4 设置底部按钮文字
private void upTitle(int boxPrice){
mBinding.tvOne.setText(boxPrice+"币一次");
mBinding.tvTen.setText((boxPrice*10)+"币十次");
mBinding.tvHundred.setText((boxPrice*100)+"币十次");
}
// TODO: 2025/8/29 接收im推送过来的消息
@Subscribe(threadMode = ThreadMode.MAIN)
public void onMusicPlay(RoomMessageEvent message) {
if (message.getMsgType() == 1057){
// UpView(message.getText().getXlh_data());
endTime=Long.parseLong(message.getText().getEnd_time());
startCountdown();
mBinding.tvGiftCount.setText(message.getText().getGift_num());
mBinding.userName.setText(message.getText().getFromUserInfo().getNickname());
ImageUtils.loadHeadCC(message.getText().getFromUserInfo().getAvatar(), mBinding.userPic);
}
}
/**
* 启动倒计时
*/
private void startCountdown() {
// 先释放之前的倒计时器
releaseCountDownTimer();
// 获取当前时间
long currentTime = System.currentTimeMillis() / 1000; // 转换为秒
long countdownTime = endTime - currentTime; // 计算剩余时间(秒)
// 如果倒计时时间已经结束显示00:00
if (countdownTime <= 0) {
updateCountdownDisplay(0, 0);
return;
}
// 确保不超过最大时间59:59 (3599秒)
countdownTime = Math.min(countdownTime, 3599);
mCountDownTimer = new CountDownTimer(countdownTime * 1000, 1000) {
@Override
public void onTick(long millisUntilFinished) {
long seconds = millisUntilFinished / 1000;
long minutes = seconds / 60;
long remainingSeconds = seconds % 60;
updateCountdownDisplay((int) minutes, (int) remainingSeconds);
}
@Override
public void onFinish() {
updateCountdownDisplay(0, 0);
}
};
mCountDownTimer.start();
}
/**
* 更新倒计时显示
* @param minutes 分钟数
* @param seconds 秒数
*/
private void updateCountdownDisplay(int minutes, int seconds) {
// 假设布局中有以下TextView
// mBinding.tvMinutes 十位分钟
// mBinding.tvMinutesUnit 个位分钟
// mBinding.tvSeconds 十位秒数
// mBinding.tvSecondsUnit 个位秒数
// 分解分钟数
int minutesTens = minutes / 10; // 十位分钟
int minutesUnits = minutes % 10; // 个位分钟
// 分解秒数
int secondsTens = seconds / 10; // 十位秒数
int secondsUnits = seconds % 10; // 个位秒数
// 更新UI显示根据你的实际布局调整
mBinding.tvTime1.setText(String.valueOf(minutesTens));
mBinding.tvTime2.setText(String.valueOf(minutesUnits));
mBinding.tvTime3.setText(String.valueOf(secondsTens));
mBinding.tvTime4.setText(String.valueOf(secondsUnits));
// 或者如果是一个整体的显示:
// mBinding.tvCountdown.setText(String.format("%02d:%02d", minutes, seconds));
}
/**
* 释放倒计时器资源
*/
private void releaseCountDownTimer() {
if (mCountDownTimer != null) {
mCountDownTimer.cancel();
mCountDownTimer = null;
}
}
@Override
public void onDestroyView() {
super.onDestroyView();
releaseCountDownTimer();
}
@Override
public void drawGiftListSuccess(BlindReslutBean blindReslutBean) {
@@ -100,6 +349,35 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
@Override
public void wallet(WalletBean walletBean) {
if (walletBean != null) {
mBinding.tvIcon.setText(walletBean.getCoin());
}
}
@Override
public void xlhChouSuccess(List<XlhDrawBean> data) {
if (data != null){
// 创建并显示对话框
XlhObtainDialog dialog = new XlhObtainDialog(getActivity());
dialog.setOnGiftItemClickListener(new XlhObtainDialog.OnGiftItemClickListener() {
@Override
public void onPlayAgainClick() {
// 处理再玩一次点击事件
MvpPre.xlhChou(roomId,num);
}
@Override
public void onCloseClick() {
// 处理关闭点击事件
dialog.dismiss();
}
});
dialog.show();
dialog.setGiftList(data);
}
MvpPre.wallet();
}
}

View File

@@ -5,20 +5,42 @@ import android.view.Window;
import android.view.WindowManager;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.GridLayoutManager;
import com.blankj.utilcode.util.ScreenUtils;
import com.xscm.moduleutil.R;
import com.xscm.moduleutil.bean.blindboxwheel.XlhDrawBean;
import com.xscm.moduleutil.databinding.DialogHeavenGiftBinding;
import com.xscm.moduleutil.databinding.DialogXlhObtainBinding;
import com.xscm.moduleutil.widget.dialog.BaseDialog;
import java.util.List;
/**
*@author qx
*@data 2025/9/2
*@description: 巡乐会恭喜或得礼弹窗
* @author qx
* @data 2025/9/2
* @description: 巡乐会恭喜或得礼弹窗
*/
public class XlhObtainDialog extends BaseDialog<DialogXlhObtainBinding> {
public interface OnGiftItemClickListener {
void onPlayAgainClick();
void onCloseClick();
}
private GiftItemAdapter mAdapter;
private OnGiftItemClickListener mListener;
private List<XlhDrawBean> mGiftList;
public XlhObtainDialog(@NonNull Context context) {
super(context,R.style.BaseDialogStyleH);
super(context, R.style.BaseDialogStyleH);
}
public XlhObtainDialog(@NonNull Context context, List<XlhDrawBean> giftList) {
super(context, R.style.BaseDialogStyleH);
this.mGiftList = giftList;
}
@Override
@@ -32,8 +54,44 @@ public class XlhObtainDialog extends BaseDialog<DialogXlhObtainBinding> {
setCanceledOnTouchOutside(false);
Window window = getWindow();
window.setLayout((int) (ScreenUtils.getScreenWidth() * 375.f / 375), WindowManager.LayoutParams.WRAP_CONTENT);
mBinding.xlhClose.setOnClickListener(v -> dismiss());
mBinding.ivAgain.setOnClickListener(v -> dismiss());///在玩一次
// 设置点击事件
mBinding.xlhClose.setOnClickListener(v -> {
if (mListener != null) {
mListener.onCloseClick();
}
dismiss();
});
mBinding.ivAgain.setOnClickListener(v -> {
if (mListener != null) {
mListener.onPlayAgainClick();
}
dismiss();
});
initRecyclerView();
}
private void initRecyclerView() {
mAdapter = new GiftItemAdapter();
mBinding.rvHead.setLayoutManager(new GridLayoutManager(getContext(), 3));
mBinding.rvHead.setAdapter(mAdapter);
}
/**
* 设置礼物数据
*/
public void setGiftList(List<XlhDrawBean> giftList) {
this.mGiftList = giftList;
if (mAdapter != null) {
mAdapter.setNewData(giftList);
}
}
/**
* 设置点击回调监听器
*/
public void setOnGiftItemClickListener(OnGiftItemClickListener listener) {
this.mListener = listener;
}
@Override

View File

@@ -0,0 +1,176 @@
package com.xscm.moduleutil.dialog.giftLottery;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.scwang.smartrefresh.layout.api.RefreshLayout;
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
import com.xscm.moduleutil.R;
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
import com.xscm.moduleutil.bean.GiftBean;
import com.xscm.moduleutil.bean.WalletBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindBoxBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindReslutBean;
import com.xscm.moduleutil.bean.blindboxwheel.XlhDrawBean;
import com.xscm.moduleutil.databinding.DialogGiftLotteryFragmentBinding;
import com.xscm.moduleutil.databinding.DialogRankingXlhFragmentBinding;
import com.xscm.moduleutil.widget.pagerecyclerview.PagerGridSnapHelper;
import java.util.ArrayList;
import java.util.List;
/**
*@author qx
*@data 2025/9/4
*@description:巡乐会榜单
*/
public class XlhRankingDialog extends BaseMvpDialogFragment<GiftLotteryPresenter, DialogRankingXlhFragmentBinding> implements GiftLotteryContacts.View{
private int page=1;
private String roomId;
private GiftRecordAdapte giftRecordAdapte;
@Override
protected GiftLotteryPresenter bindPresenter() {
return new GiftLotteryPresenter(this,getSelfActivity());
}
public static XlhRankingDialog newInstance(String giftBagId) {
Bundle args = new Bundle();
XlhRankingDialog fragment = new XlhRankingDialog();
args.putString("roomId", giftBagId);
fragment.setArguments(args);
return fragment;
}
@Nullable
@Override
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
Dialog dialog = super.onCreateDialog(savedInstanceState);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setCancelable(true);
return dialog;
}
@Override
public void onStart() {
super.onStart();
Window window = getDialog().getWindow();
if (window != null) {
// 获取屏幕高度
android.util.DisplayMetrics displayMetrics = new android.util.DisplayMetrics();
requireActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
int screenHeight = displayMetrics.heightPixels;
// 设置高度为屏幕高度的100%(全屏)
int heightInPx = (int) (screenHeight * 0.8);;
window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, heightInPx);
window.setBackgroundDrawableResource(android.R.color.transparent);
// 可选:设置动画样式(从底部弹出)
window.setWindowAnimations(R.style.CommonShowDialogBottom);
}
}
@Override
protected void initDialogStyle(Window window) {
super.initDialogStyle(window);
window.setGravity(Gravity.BOTTOM);
}
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
roomId = getArguments().getString("roomId");
}
@Override
protected void initData() {
MvpPre.xlhAllRecord(roomId, "1", "20");
}
@Override
protected void initView() {
mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
@Override
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
page = 1;
MvpPre.xlhAllRecord(roomId, page+"", "20");
}
@Override
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
page++;
MvpPre.xlhAllRecord(roomId, page+"", "20");
}
});
giftRecordAdapte=new GiftRecordAdapte();
mBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
mBinding.recyclerView.setAdapter(giftRecordAdapte);
}
@Override
protected int getLayoutId() {
return R.layout.dialog_ranking_xlh_fragment;
}
@Override
public void getGiftListSuccess(BlindBoxBean blindBoxBean) {
}
@Override
public void drawGiftListSuccess(BlindReslutBean blindReslutBean) {
}
@Override
public void getMyRecordSuccess(List<GiftBean> data) {
}
@Override
public void getAllRecordSuccess(List<GiftBean> data) {
if (data != null){
if (page==1){
giftRecordAdapte.setNewData(data);
}else {
giftRecordAdapte.addData(data);
}
}else {
if (page == 1) {
giftRecordAdapte.setNewData(null);
}
}
}
@Override
public void finishRefreshLoadMore() {
mBinding.smartRefreshLayout.finishRefresh();
mBinding.smartRefreshLayout.finishLoadMore();
}
@Override
public void wallet(WalletBean walletBean) {
}
@Override
public void xlhChouSuccess(List<XlhDrawBean> data) {
}
}

View File

@@ -0,0 +1,182 @@
package com.xscm.moduleutil.dialog.giftLottery;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.scwang.smartrefresh.layout.api.RefreshLayout;
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
import com.xscm.moduleutil.R;
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
import com.xscm.moduleutil.bean.GiftBean;
import com.xscm.moduleutil.bean.WalletBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindBoxBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindReslutBean;
import com.xscm.moduleutil.bean.blindboxwheel.XlhDrawBean;
import com.xscm.moduleutil.databinding.DialogGiftLotteryFragmentBinding;
import com.xscm.moduleutil.databinding.DialogXlhRecordFragmentBinding;
import com.xscm.moduleutil.widget.pagerecyclerview.PagerGridSnapHelper;
import java.util.ArrayList;
import java.util.List;
/**
*@author qx
*@data 2025/9/4
*@description:巡乐会记录
*/
public class XlhRecordDialog extends BaseMvpDialogFragment<GiftLotteryPresenter, DialogXlhRecordFragmentBinding> implements GiftLotteryContacts.View{
private int page=1;
private String roomId;
private GiftRecordAdapter adapter;
@Override
protected GiftLotteryPresenter bindPresenter() {
return new GiftLotteryPresenter(this,getSelfActivity());
}
public static XlhRecordDialog newInstance(String roomId) {
Bundle args = new Bundle();
XlhRecordDialog fragment = new XlhRecordDialog();
args.putString("roomId", roomId);
fragment.setArguments(args);
return fragment;
}
@Nullable
@Override
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
Dialog dialog = super.onCreateDialog(savedInstanceState);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setCancelable(true);
return dialog;
}
@Override
public void onStart() {
super.onStart();
Window window = getDialog().getWindow();
if (window != null) {
// 获取屏幕高度
android.util.DisplayMetrics displayMetrics = new android.util.DisplayMetrics();
requireActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
int screenHeight = displayMetrics.heightPixels;
// 设置高度为屏幕高度的100%(全屏)
int heightInPx = (int) (screenHeight * 0.8);;
window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, heightInPx);
window.setBackgroundDrawableResource(android.R.color.transparent);
// 可选:设置动画样式(从底部弹出)
window.setWindowAnimations(R.style.CommonShowDialogBottom);
}
}
@Override
protected void initDialogStyle(Window window) {
super.initDialogStyle(window);
window.setGravity(Gravity.BOTTOM);
}
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
roomId = getArguments().getString("roomId");
}
@Override
protected void initData() {
MvpPre.xlhMyRecord(roomId, "1", "20");
}
@Override
protected void initView() {
mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
@Override
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
page = 1;
MvpPre.xlhMyRecord(roomId, page+"", "20");
}
@Override
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
page++;
MvpPre.xlhMyRecord(roomId, page+"", "20");
}
});
adapter=new GiftRecordAdapter();
GridLayoutManager layoutManager = new GridLayoutManager(getActivity(), 3);
mBinding.recyclerView.setLayoutManager(layoutManager);
mBinding.recyclerView.setOnFlingListener(null);
// 设置滚动辅助工具
PagerGridSnapHelper pageSnapHelper = new PagerGridSnapHelper();
pageSnapHelper.attachToRecyclerView(mBinding.recyclerView);
mBinding.recyclerView.setAdapter(adapter);
}
@Override
protected int getLayoutId() {
return R.layout.dialog_xlh_record_fragment;
}
@Override
public void getGiftListSuccess(BlindBoxBean blindBoxBean) {
}
@Override
public void drawGiftListSuccess(BlindReslutBean blindReslutBean) {
}
@Override
public void getMyRecordSuccess(List<GiftBean> data) {
if (data != null){
if (page==1){
adapter.setNewData(data);
}else {
adapter.addData(data);
}
}else {
if (page == 1) {
adapter.setNewData(null);
}
}
}
@Override
public void getAllRecordSuccess(List<GiftBean> data) {
}
@Override
public void finishRefreshLoadMore() {
mBinding.smartRefreshLayout.finishRefresh();
mBinding.smartRefreshLayout.finishLoadMore();
}
@Override
public void wallet(WalletBean walletBean) {
}
@Override
public void xlhChouSuccess(List<XlhDrawBean> data) {
}
}

View File

@@ -58,6 +58,7 @@ import com.xscm.moduleutil.bean.WalletConfig;
import com.xscm.moduleutil.bean.WithdrawalBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindBoxBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindReslutBean;
import com.xscm.moduleutil.bean.blindboxwheel.XlhDrawBean;
import com.xscm.moduleutil.bean.room.AuctionBean;
import com.xscm.moduleutil.bean.room.FriendUserBean;
import com.xscm.moduleutil.bean.room.RoomApplyListBean;
@@ -725,7 +726,7 @@ public interface ApiServer {
@FormUrlEncoded
@POST(Constants.POST_ROOM_AUCTION_JOIN)
Observable<BaseModel<RoomAuction.AuctionListBean>> roomAuctionJoin(@Field("auction_id") String auction_id, @Field("user_id") String user_id, @Field("gift_id") String gift_id, @Field("num") String num, @Field("type") String type);
Call<BaseModel<RoomAuction.AuctionListBean>> roomAuctionJoin(@Field("auction_id") String auction_id, @Field("user_id") String user_id, @Field("gift_id") String gift_id, @Field("num") String num, @Field("type") String type);
@FormUrlEncoded
@@ -748,4 +749,18 @@ public interface ApiServer {
@FormUrlEncoded
@POST(Constants.GIFT_SEND)
Call<BaseModel<String>> giftSend(@Field("send_id")String send_id);
@GET(Constants.GET_BOX_GIFT_LIST_XLH)
Call<BaseModel<BlindBoxBean>> getBoxGiftListXLH( @Query("room_id") String room_id);
@FormUrlEncoded
@POST(Constants.POST_DRAW_GIFT_LIST_XLH)
Call<BaseModel<List<XlhDrawBean>>> xlhChou(@Field("room_id") String room_id, @Field("num") String num);
@FormUrlEncoded
@POST(Constants.POST_XLH_ALL_RECORD)
Call<BaseModel<List<GiftBean>>> xlhAllRecord(@Field("room_id") String room_id, @Field("page") String page, @Field("page_size") String page_size);
@GET(Constants.GET_XLH_MY_RECORD)
Call<BaseModel<List<GiftBean>>> xlhMyRecord(@Query("room_id") String room_id, @Query("page") String page, @Query("page_size") String page_size);
}

View File

@@ -75,6 +75,7 @@ import com.xscm.moduleutil.bean.WalletConfig;
import com.xscm.moduleutil.bean.WithdrawalBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindBoxBean;
import com.xscm.moduleutil.bean.blindboxwheel.BlindReslutBean;
import com.xscm.moduleutil.bean.blindboxwheel.XlhDrawBean;
import com.xscm.moduleutil.bean.room.AuctionBean;
import com.xscm.moduleutil.bean.room.FriendUserBean;
import com.xscm.moduleutil.bean.room.RoomApplyListBean;
@@ -1121,7 +1122,21 @@ public class RetrofitClient {
}
public void roomAuctionJoin(String auctionId, String userId, String giftId, String num, String type, BaseObserver<RoomAuction.AuctionListBean> observer) {
sApiServer.roomAuctionJoin(auctionId, userId, giftId, num, type).compose(new DefaultTransformer<>()).subscribe(observer);
sApiServer.roomAuctionJoin(auctionId, userId, giftId, num, type).enqueue(new Callback<BaseModel<RoomAuction.AuctionListBean>>() {
@Override
public void onResponse(Call<BaseModel<RoomAuction.AuctionListBean>> call, Response<BaseModel<RoomAuction.AuctionListBean>> response) {
if (response.code() == 200){
BaseModel<RoomAuction.AuctionListBean> baseModel = response.body();
observer.onNext(baseModel.getData());
}
}
@Override
public void onFailure(Call<BaseModel<RoomAuction.AuctionListBean>> call, Throwable t) {
t.printStackTrace();
}
});
}
public void auctionDelay(String auctionId, BaseObserver<String> observer) {
@@ -2225,6 +2240,43 @@ public class RetrofitClient {
}
});
}
///巡乐会
public void getBoxGiftListXLH( String roomId, BaseObserver<BlindBoxBean> observer){
sApiServer.getBoxGiftListXLH(roomId).enqueue(new Callback<BaseModel<BlindBoxBean>>() {
@Override
public void onResponse(Call<BaseModel<BlindBoxBean>> call, Response<BaseModel<BlindBoxBean>> response) {
if (response.code() == 200) {
BaseModel<BlindBoxBean> baseModel = response.body();
observer.onNext(baseModel.getData());
}
}
@Override
public void onFailure(Call<BaseModel<BlindBoxBean>> call, Throwable t) {
t.printStackTrace();
}
});
}
///巡乐会抽奖
public void xlhChou(String roomId, String num,BaseObserver<List<XlhDrawBean>> observer){
sApiServer.xlhChou(roomId,num).enqueue(new Callback<BaseModel<List<XlhDrawBean>>>() {
@Override
public void onResponse(Call<BaseModel<List<XlhDrawBean>>> call, Response<BaseModel<List<XlhDrawBean>>> response) {
if (response.code() == 200) {
BaseModel<List<XlhDrawBean>> baseModel = response.body();
observer.onNext(baseModel.getData());
}
}
@Override
public void onFailure(Call<BaseModel<List<XlhDrawBean>>> call, Throwable t) {
t.printStackTrace();
}
});
}
///盲盒转盘抽奖
public void drawGiftList(String giftBagId, String gift_user_ids, String roomId, String num,BaseObserver<BlindReslutBean> observer){
sApiServer.drawGiftList(giftBagId, gift_user_ids, roomId, num).enqueue(new Callback<BaseModel<BlindReslutBean>>() {
@@ -2261,6 +2313,45 @@ public class RetrofitClient {
}
});
}
public void xlhAllRecord(String roomId,String page,String pageSize,BaseObserver<List<GiftBean>> observer){
sApiServer.xlhAllRecord(roomId,page,pageSize).enqueue(new Callback<BaseModel<List<GiftBean>>>() {
@Override
public void onResponse(Call<BaseModel<List<GiftBean>>> call, Response<BaseModel<List<GiftBean>>> response) {
if (response.code()==200){
BaseModel<List<GiftBean>> baseModel = response.body();
if (baseModel.getCode()==1){
observer.onNext(baseModel.getData());
}
}
}
@Override
public void onFailure(Call<BaseModel<List<GiftBean>>> call, Throwable t) {
t.printStackTrace();
}
});
}
public void xlhMyRecord(String roomId,String page,String pageSize,BaseObserver<List<GiftBean>> observer){
sApiServer.xlhMyRecord(roomId,page,pageSize).enqueue(new Callback<BaseModel<List<GiftBean>>>() {
@Override
public void onResponse(Call<BaseModel<List<GiftBean>>> call, Response<BaseModel<List<GiftBean>>> response) {
if (response.code()==200){
BaseModel<List<GiftBean>> baseModel = response.body();
if (baseModel.getCode()==1){
observer.onNext(baseModel.getData());
}
}
}
@Override
public void onFailure(Call<BaseModel<List<GiftBean>>> call, Throwable t) {
t.printStackTrace();
}
});
}
public void getAllRecord(String giftBagId,String page,String pageSize,BaseObserver<List<GiftBean>> observer){
sApiServer.getAllRecord(giftBagId,page,pageSize).enqueue(new Callback<BaseModel<List<GiftBean>>>() {
@Override

View File

@@ -32,6 +32,9 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(List<RewardUserBean> rewardUserBeans) {
if (MvpRef==null){
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().getRewardList(rewardUserBeans);
}
});
@@ -48,6 +51,9 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(List<GiftLabelBean> giftLabelBeans) {
if (MvpRef==null){
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().getGiftLabel(giftLabelBeans);
}
});
@@ -65,6 +71,9 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(List<RoonGiftModel> roonGiftModels) {
if (MvpRef==null){
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().setGiftList(roonGiftModels, type);
}
});
@@ -81,6 +90,9 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(String s) {
if (MvpRef==null){
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().giveGift();
}
});
@@ -115,6 +127,9 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(WalletBean walletBean) {
if (MvpRef==null){
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().wallet(walletBean);
}
});
@@ -131,6 +146,9 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(String s) {
if (MvpRef==null){
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().reward_zone();
}
});
@@ -146,6 +164,9 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(String s) {
if (MvpRef==null){
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().reward_zone();
}
});
@@ -161,6 +182,9 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(RoomAuction.AuctionListBean auctionListBean) {
if (MvpRef==null){
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().roomAuctionJoin(auctionListBean);
}
});
@@ -177,6 +201,9 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(List<GiftPackBean> giftPackBeans) {
if (MvpRef==null){
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().giftPack(giftPackBeans);
}
});

View File

@@ -380,6 +380,11 @@ public class Constants {
public static final String GET_ALL_RECORD = "/api/BlindBoxTurntable/get_all_record";//获取全服抽奖记录
public static final String GIFT_SEND = "/api/BlindBoxTurntable/gift_send";//礼物发放
public static final String GET_BOX_GIFT_LIST_XLH = "/api/BlindBoxTurntable/xlh";///巡乐会
public static final String POST_DRAW_GIFT_LIST_XLH = "/api/BlindBoxTurntable/xlh_draw_gift";///巡乐会抽奖
public static final String POST_XLH_ALL_RECORD = "/api/BlindBoxTurntable/get_xlh_all_record";///巡乐会榜单
public static final String GET_XLH_MY_RECORD = "/api/BlindBoxTurntable/get_xlh_my_record";///巡乐会记录
public static final String MODIFY_MOBILE = "/api/UserData/modify_mobile";//手机换绑

View File

@@ -0,0 +1,169 @@
package com.xscm.moduleutil.widget;
import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.opensource.svgaplayer.SVGAImageView;
import com.xscm.moduleutil.R;
import com.xscm.moduleutil.bean.room.RoomPitBean;
import com.xscm.moduleutil.utils.ImageUtils;
public class RoomSingWheatView extends LinearLayout {
public ImageView mRiv;
public ImageView mIvGift;
public WheatCharmView mCharmView;
public TextView mTvName;
public ImageView mIvSex;
public AvatarFrameView mIvFrame;
public AvatarFrameView mIvRipple;
public ExpressionImgView mIvFace;
public ImageView mIvShutup;
public TextView tvTime;
public TextView mTvNo;
public TextView tv_time_pk;
public RoomPitBean pitBean;//麦位数据
public String roomId;//房间id
public static final String WHEAT_BOSS = "8";//老板位
public static final String WHEAT_HOST = "9";//主持位
public float oX;
public float oY;
boolean closePhone = false;//自己麦位关闭话筒,用于判断声纹显示
public String pitNumber;
public int pitImageVId;
public ImageView iv_on_line;
private boolean showGiftAnim = true;//显示麦位动画
private ImageView iv_tag_type;
private TextView tv_zhul;
public RoomSingWheatView(@NonNull Context context) {
this(context, null);
}
public RoomSingWheatView(@NonNull Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public RoomSingWheatView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
initView(context);
}
private void initView(Context context) {
// 确保布局被正确加载
inflate(context, getLayoutId(), this);
// 初始化所有视图组件
mRiv = findViewById(R.id.riv);
mIvGift = findViewById(R.id.iv_gift);
mCharmView = findViewById(R.id.charm_view);
mTvName = findViewById(R.id.tv_name);
mIvSex = findViewById(R.id.iv_sex);
mIvFrame = findViewById(R.id.iv_frame);
mIvRipple = findViewById(R.id.iv_ripple);
mIvFace = findViewById(R.id.iv_face);
mIvShutup = findViewById(R.id.iv_shutup);
tvTime = findViewById(R.id.tv_time);
tv_time_pk = findViewById(R.id.tv_time_pk);
mTvNo = findViewById(R.id.tv_no);
iv_on_line = findViewById(R.id.iv_online);
iv_tag_type = findViewById(R.id.iv_tag_type);
tv_zhul = findViewById(R.id.tv_zhul);
// 设置初始位置
if (mIvGift != null) {
oX = mIvGift.getX();
oY = mIvGift.getY();
}
}
protected int getLayoutId() {
return R.layout.room_view_sing_wheat;
}
public void setData(RoomPitBean bean) {
this.pitBean = bean;
if (bean == null) return;
// 添加空值检查防止NPE
if (mTvName == null) {
// 可能布局未正确加载,尝试重新初始化
initView(getContext());
if (mTvName == null) {
// 如果仍然为null记录日志并返回
android.util.Log.e("RoomSingWheatView", "mTvName is still null after re-initialization");
return;
}
}
if (isOn()) {
//开启声浪
mIvRipple.startLoopingSvga("ripple3695.svga");
mIvRipple.setVisibility(VISIBLE);
mTvName.setText(bean.getNickname());
ImageUtils.loadHeadCC(bean.getAvatar(), mRiv);
if (TextUtils.isEmpty(pitBean.getDress())) {
if (mIvFrame != null) mIvFrame.setVisibility(INVISIBLE);
} else {
if (mIvFrame != null) {
mIvFrame.setVisibility(VISIBLE);
mIvFrame.setSource(pitBean.getDress(), 1);
}
}
} else {
String pitText = "-1".equals(pitNumber) ? "" :
"9".equals(pitNumber) ? "主持位" :
"10".equals(pitNumber) ? "嘉宾位" :
pitNumber + "号麦位";
mTvName.setText(pitText);
if (mIvFrame != null) mIvFrame.setVisibility(INVISIBLE);
if (mIvFace != null) mIvFace.remove();
//停止声浪
mIvRipple.stopSvga();
mIvRipple.setVisibility(GONE);
}
// 更新魅力值视图
if (mCharmView != null) {
if (pitBean.getNickname() == null || pitBean.getNickname().isEmpty()) {
mCharmView.setVisibility(GONE);
} else {
mCharmView.setVisibility(VISIBLE);
}
}
// 更新PK状态
if (tv_time_pk != null) {
if (pitBean.is_pk() && pitBean.getUser_id() != null &&
!pitBean.getUser_id().equals("0") && !pitBean.getUser_id().isEmpty()) {
tv_time_pk.setVisibility(VISIBLE);
if (mCharmView != null) mCharmView.setVisibility(GONE);
} else {
tv_time_pk.setVisibility(GONE);
if (mCharmView != null) mCharmView.setVisibility(VISIBLE);
}
}
}
private boolean isOn() {
return pitBean != null && !TextUtils.isEmpty(pitBean.getUser_id()) && !"0".equals(pitBean.getUser_id());
}
}

View File

@@ -15,7 +15,7 @@
android:layout_margin="@dimen/dp_10"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ll_yx"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
@@ -152,10 +152,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginBottom="5dp"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/lottery_buttons_layout"
app:layout_constraintTop_toBottomOf="@+id/gift7"
app:layout_constraintEnd_toStartOf="@+id/ll_tx"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent">
@@ -191,7 +192,7 @@
android:layout_marginBottom="@dimen/dp_5"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/lottery_buttons_layout"
app:layout_constraintTop_toTopOf="@+id/ll_yx"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/ll_yx">

View File

@@ -15,7 +15,7 @@
android:layout_margin="@dimen/dp_10"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ll_yx"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
@@ -153,9 +153,10 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_10"
android:layout_marginBottom="5dp"
android:layout_marginTop="@dimen/dp_10"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/lottery_buttons_layout"
app:layout_constraintTop_toBottomOf="@+id/gift9"
app:layout_constraintEnd_toStartOf="@+id/ll_tx"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent">
@@ -191,7 +192,7 @@
android:layout_marginBottom="@dimen/dp_5"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/lottery_buttons_layout"
app:layout_constraintTop_toTopOf="@+id/ll_yx"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/ll_yx">

View File

@@ -15,7 +15,7 @@
android:layout_margin="@dimen/dp_10"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ll_yx"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
@@ -153,9 +153,10 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_10"
android:layout_marginBottom="5dp"
android:layout_marginTop="@dimen/dp_10"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/lottery_buttons_layout"
app:layout_constraintTop_toBottomOf="@+id/gift7"
app:layout_constraintEnd_toStartOf="@+id/ll_tx"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent">
@@ -191,7 +192,7 @@
android:layout_marginBottom="@dimen/dp_5"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/lottery_buttons_layout"
app:layout_constraintTop_toTopOf="@+id/ll_yx"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/ll_yx">

View File

@@ -132,6 +132,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_gift"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_195"
android:layout_marginTop="@dimen/dp_10"
@@ -179,7 +180,8 @@
tools:text="请选择礼物" />
<TextView
android:id="@+id/tv_gift_count"
android:id="@+id/tv_gift_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@mipmap/jinb"
@@ -189,7 +191,7 @@
tools:text="999" />
<TextView
android:id="@+id/tv_gift_price"
android:id="@+id/tv_gift_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
@@ -212,6 +214,7 @@
app:layout_constraintBottom_toBottomOf="parent"/>
<ImageView
android:id="@+id/give_im"
android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_40"
app:layout_constraintStart_toStartOf="@+id/gift_l2"
@@ -271,6 +274,14 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycle_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginBottom="@dimen/dp_15"
app:layout_constraintTop_toBottomOf="@+id/cl_gift"
app:layout_constraintBottom_toTopOf="@+id/exchange_layout"/>
<TextView
android:id="@+id/tv_option"
android:layout_width="wrap_content"
@@ -363,12 +374,13 @@
android:textSize="@dimen/sp_12" />
<TextView
android:id="@+id/tv_one"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_5"
android:drawableLeft="@mipmap/jinb"
android:gravity="center"
android:text="10币一次"
tools:text="10币一次"
android:textSize="@dimen/sp_10" />
</LinearLayout>
@@ -393,12 +405,13 @@
android:textSize="@dimen/sp_12" />
<TextView
android:id="@+id/tv_ten"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_5"
android:drawableLeft="@mipmap/jinb"
android:gravity="center"
android:text="100币一次"
tools:text="100币一次"
android:textSize="@dimen/sp_10" />
</LinearLayout>
@@ -421,12 +434,13 @@
android:textSize="@dimen/sp_12" />
<TextView
android:id="@+id/tv_hundred"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_5"
android:drawableLeft="@mipmap/jinb"
android:gravity="center"
android:text="1000币一次"
tools:text="1000币一次"
android:textSize="@dimen/sp_10" />
</LinearLayout>
</LinearLayout>

View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<ImageView
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:id="@+id/iv_prize_pool"
android:scaleType="centerCrop"
android:src="@mipmap/xlh_xz"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
<ImageView
android:id="@+id/iv_gift_image"
android:layout_width="@dimen/dp_50"
android:layout_height="@dimen/dp_52"
app:layout_constraintTop_toTopOf="@+id/iv_prize_pool"
app:layout_constraintBottom_toBottomOf="@+id/iv_prize_pool"
app:layout_constraintStart_toStartOf="@+id/iv_prize_pool"
app:layout_constraintEnd_toEndOf="@+id/iv_prize_pool"
android:scaleType="fitCenter"/>
<TextView
android:id="@+id/tv_gift_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10"
tools:text="中奖名单"
android:textSize="@dimen/sp_12"
android:textColor="@color/white"
android:gravity="center"
app:layout_constraintStart_toStartOf="@+id/iv_prize_pool"
app:layout_constraintTop_toBottomOf="@+id/iv_prize_pool"
app:layout_constraintEnd_toEndOf="@+id/iv_prize_pool"
/>
<TextView
android:id="@+id/tv_gift_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="2025-8-28 18:41:53"
android:textSize="@dimen/sp_10"
android:textColor="#5B5B5B"
android:gravity="center"
app:layout_constraintStart_toStartOf="@+id/tv_gift_name"
app:layout_constraintTop_toBottomOf="@+id/tv_gift_name"
app:layout_constraintEnd_toEndOf="@+id/tv_gift_name"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_154"
android:background="@mipmap/xlh_cj_item"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<ImageView
android:id="@+id/iv_gift_image"
android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_60"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="@dimen/dp_35"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:scaleType="fitCenter"/>
<TextView
android:id="@+id/tv_gift_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_11"
tools:text="中奖名单"
android:textSize="@dimen/sp_12"
android:textColor="@color/white"
android:gravity="center"
app:layout_constraintStart_toStartOf="@+id/iv_gift_image"
app:layout_constraintTop_toBottomOf="@+id/iv_gift_image"
app:layout_constraintEnd_toEndOf="@+id/iv_gift_image"
/>
<TextView
android:id="@+id/tv_gift_pic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="中奖名单"
android:textSize="@dimen/sp_10"
android:drawableLeft="@mipmap/jinb"
android:drawablePadding="@dimen/dp_2"
android:textColor="#C7BF62"
android:gravity="center"
app:layout_constraintStart_toStartOf="@+id/tv_gift_name"
app:layout_constraintTop_toBottomOf="@+id/tv_gift_name"
app:layout_constraintEnd_toEndOf="@+id/tv_gift_name"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/gift_l"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/xlh_hd"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/gift_img"
android:layout_width="@dimen/dp_50"
android:layout_height="@dimen/dp_50"
android:scaleType="fitCenter"
android:src="@mipmap/ic_launcher" />
</LinearLayout>
<TextView
android:id="@+id/tv_gift_name"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_14"
android:layout_gravity="center"
android:gravity="center"
android:textColor="#FFFFFF"
android:textSize="@dimen/sp_12"
app:layout_constraintTop_toBottomOf="@+id/gift_l"
app:layout_constraintStart_toStartOf="@+id/gift_l"
app:layout_constraintEnd_toEndOf="@+id/gift_l"
tools:text="请选择礼物" />
</androidx.constraintlayout.widget.ConstraintLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 KiB

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="WarpLinearLayoutDefault">
<!-- <item name="grivate">left</item>-->
<!-- <item name="horizontal_Space">20dp</item>-->
<!-- <item name="vertical_Space">20dp</item>-->
<!-- <item name="isFull">false</item>-->
</style>
<style name="AppTheme_MAIN" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimary</item>
<item name="colorAccent">@color/colorPrimary</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<!-- 给status栏设置透明颜色 -->
<item name="android:statusBarColor">@android:color/transparent</item>
<!-- true: status栏的图标和文字为黑色false: sstatus栏的图标和文字为白色 -->
<item name="android:windowLightStatusBar">true</item>
<item name="android:windowTranslucentStatus">false</item>
<item name="actionSheetStyle">@style/ActionSheetStyleiOS7</item>
</style>
</resources>

View File

@@ -13,4 +13,19 @@
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
<style name="AppTheme_MAIN" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimary</item>
<item name="colorAccent">@color/colorPrimary</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<!-- 给status栏设置透明颜色 -->
<item name="android:statusBarColor">@android:color/transparent</item>
<!-- true: status栏的图标和文字为黑色false: sstatus栏的图标和文字为白色 -->
<item name="android:windowTranslucentStatus">false</item>
<item name="actionSheetStyle">@style/ActionSheetStyleiOS7</item>
</style>
</resources>