1:添加小时榜
2:添加小时榜飘屏
@@ -66,19 +66,19 @@ android {
|
||||
|
||||
// // 测试版配置
|
||||
beta {
|
||||
dimension "environment"
|
||||
// 测试版包名:基础包名 + .beta(com.example.myapp.beta)
|
||||
applicationIdSuffix ".beta"
|
||||
// 测试版版本名:1.0-beta
|
||||
versionNameSuffix "-beta"
|
||||
|
||||
// 【测试版应用名称】动态生成带标识的名称
|
||||
resValue "string", "app_name", "秘地-测试版"
|
||||
|
||||
// 【测试版图标】替换为测试专用图标
|
||||
manifestPlaceholders = [
|
||||
appIcon: "@mipmap/ic_launcher_app_bat" // 需在main/res/mipmap放置该图标
|
||||
]
|
||||
// dimension "environment"
|
||||
// // 测试版包名:基础包名 + .beta(com.example.myapp.beta)
|
||||
// applicationIdSuffix ".beta"
|
||||
// // 测试版版本名:1.0-beta
|
||||
// versionNameSuffix "-beta"
|
||||
//
|
||||
// // 【测试版应用名称】动态生成带标识的名称
|
||||
// resValue "string", "app_name", "秘地-测试版"
|
||||
//
|
||||
// // 【测试版图标】替换为测试专用图标
|
||||
// manifestPlaceholders = [
|
||||
// appIcon: "@mipmap/ic_launcher_app_bat" // 需在main/res/mipmap放置该图标
|
||||
// ]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ isBuildModule=false
|
||||
#org.gradle.deamon=false
|
||||
android.injected.testOnly=false
|
||||
|
||||
APP_VERSION_NAME=1.1.6
|
||||
APP_VERSION_CODE=168
|
||||
APP_VERSION_NAME=1.1.7
|
||||
APP_VERSION_CODE=169
|
||||
|
||||
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
||||
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
||||
|
||||
@@ -18,6 +18,9 @@ import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -37,6 +40,7 @@ import android.widget.TextView;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ViewDataBinding;
|
||||
|
||||
@@ -50,6 +54,7 @@ import com.xscm.moduleutil.R;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.base.RoomManager;
|
||||
import com.xscm.moduleutil.bean.XLHBean;
|
||||
import com.xscm.moduleutil.event.HourlyBean;
|
||||
import com.xscm.moduleutil.event.MqttBean;
|
||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
import com.xscm.moduleutil.utils.BackgroundManager;
|
||||
@@ -66,6 +71,7 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -410,6 +416,232 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
||||
private View currentMqttView = null; // 当前正在播放的MQTT视图
|
||||
private View currentXlhView = null; // 当前正在播放的XLH视图
|
||||
|
||||
private final List<HourlyBean> hourlyMessageQueue = new ArrayList<>(); // 小时榜消息队列
|
||||
private final Map<Integer, View> currentHourlyViews = new HashMap<>(); // 当前显示的小时榜视图
|
||||
private final Object hourlyQueueLock = new Object(); // 小时榜队列同步锁
|
||||
private boolean isHourlyProcessing = false; // 小时榜处理状态标志
|
||||
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onMessageReceived(List<HourlyBean> hourlyBean) {
|
||||
LogUtils.e("收到小时榜", hourlyBean);
|
||||
if (hourlyBean == null) return;
|
||||
if (SpUtil.getFloatingScreen() == 1) {
|
||||
synchronized (hourlyQueueLock) {
|
||||
hourlyMessageQueue.addAll(hourlyBean);
|
||||
if (!isHourlyProcessing) {
|
||||
isHourlyProcessing = true;
|
||||
processHourlyMessages();
|
||||
}
|
||||
}
|
||||
}else {
|
||||
hourlyMessageQueue.clear();
|
||||
clearAllHourlyViews();
|
||||
}
|
||||
}
|
||||
|
||||
private void processHourlyMessages() {
|
||||
List<HourlyBean> messagesToProcess;
|
||||
synchronized (hourlyQueueLock) {
|
||||
if (hourlyMessageQueue.isEmpty()) {
|
||||
isHourlyProcessing = false;
|
||||
return;
|
||||
}
|
||||
// 最多处理3条数据
|
||||
int processCount = Math.min(3, hourlyMessageQueue.size());
|
||||
messagesToProcess = new ArrayList<>(hourlyMessageQueue.subList(0, processCount));
|
||||
// 从队列中移除已处理的数据
|
||||
for (int i = 0; i < processCount; i++) {
|
||||
hourlyMessageQueue.remove(0);
|
||||
}
|
||||
}
|
||||
|
||||
// 同时展示多条数据
|
||||
for (int i = 0; i < messagesToProcess.size(); i++) {
|
||||
HourlyBean bean = messagesToProcess.get(i);
|
||||
showHourlyFloatingMessage(bean, i);
|
||||
}
|
||||
}
|
||||
|
||||
private void showHourlyFloatingMessage(HourlyBean hourlyBean, int positionIndex) {
|
||||
try {
|
||||
ViewGroup decorView = (ViewGroup) getWindow().getDecorView();
|
||||
|
||||
// 创建新的视图
|
||||
View hourlyView = LayoutInflater.from(this).inflate(R.layout.item_hourly_floating, null);
|
||||
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(
|
||||
FrameLayout.LayoutParams.MATCH_PARENT,
|
||||
FrameLayout.LayoutParams.WRAP_CONTENT);
|
||||
|
||||
// 根据位置设置不同的垂直间距
|
||||
int baseMargin = com.sunfusheng.marqueeview.DisplayUtil.dip2px(this, 70);
|
||||
int verticalSpacing = com.sunfusheng.marqueeview.DisplayUtil.dip2px(this, 50);
|
||||
layoutParams.topMargin = baseMargin + (positionIndex * verticalSpacing);
|
||||
layoutParams.gravity = Gravity.TOP | Gravity.CENTER_HORIZONTAL;
|
||||
hourlyView.setLayoutParams(layoutParams);
|
||||
|
||||
decorView.addView(hourlyView);
|
||||
|
||||
// 保存视图引用
|
||||
currentHourlyViews.put(positionIndex, hourlyView);
|
||||
|
||||
// 更新视图数据
|
||||
updateHourlyFloatingViewData(hourlyView, hourlyBean);
|
||||
|
||||
// 根据类型获取展示时间
|
||||
long displayDuration = getDisplayDurationByType(Integer.parseInt(hourlyBean.getRank_number()));
|
||||
|
||||
// 启动动画
|
||||
resetAndStartHourlyAnimation(hourlyView, displayDuration, () -> {
|
||||
// 动画结束后清理视图
|
||||
if (hourlyView.getParent() != null) {
|
||||
decorView.removeView(hourlyView);
|
||||
}
|
||||
currentHourlyViews.remove(positionIndex);
|
||||
|
||||
// 检查是否还有更多消息需要处理
|
||||
synchronized (hourlyQueueLock) {
|
||||
if (hourlyMessageQueue.isEmpty() && currentHourlyViews.isEmpty()) {
|
||||
isHourlyProcessing = false;
|
||||
} else if (!hourlyMessageQueue.isEmpty() && currentHourlyViews.isEmpty()) {
|
||||
// 所有当前视图都已消失,处理下一批消息
|
||||
processHourlyMessages();
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
LogUtils.e("显示小时榜飘屏失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
private long getDisplayDurationByType(int type) {
|
||||
// 根据不同类型设置不同的展示时间(毫秒)
|
||||
switch (type) {
|
||||
case 1: // 第一名
|
||||
return 5000; // 5秒
|
||||
case 2: // 第二名
|
||||
return 4000; // 4秒
|
||||
case 3: // 第三名
|
||||
return 3000; // 3秒
|
||||
default:
|
||||
return 3000; // 默认3秒
|
||||
}
|
||||
}
|
||||
|
||||
private void updateHourlyFloatingViewData(View view, HourlyBean hourlyBean) {
|
||||
TextView tvName = view.findViewById(R.id.tv_name);
|
||||
ImageView ivAvatar = view.findViewById(R.id.im_h_t);
|
||||
|
||||
if (hourlyBean != null) {
|
||||
// 根据排名设置不同的显示
|
||||
switch (hourlyBean.getRank_number()) {
|
||||
case "1":
|
||||
// tvName.setText("新科状元! ["+hourlyBean.getRoom_name()+"] 独占鳌头!");
|
||||
setColoredText(tvName, "新科状元! [", hourlyBean.getRoom_name(), "] 独占鳌头!", R.color.color_FFFA63);
|
||||
ivAvatar.setImageResource(R.mipmap.hourl_top1);
|
||||
break;
|
||||
case "2":
|
||||
// tvName.setText("金榜榜眼! ["+hourlyBean.getRoom_name()+"] 才气逼人!");
|
||||
setColoredText(tvName, "金榜榜眼! [", hourlyBean.getRoom_name(), "] 才气逼人!", R.color.color_FFFA63);
|
||||
|
||||
ivAvatar.setImageResource(R.mipmap.hourl_top2);
|
||||
break;
|
||||
case "3":
|
||||
setColoredText(tvName, "风采探花! [", hourlyBean.getRoom_name(), "] 实力绽放!", R.color.color_1FFFE5);
|
||||
// tvName.setText("风采探花! ["+hourlyBean.getRoom_name()+"] 实力绽放!");
|
||||
|
||||
ivAvatar.setImageResource(R.mipmap.hourl_top3);
|
||||
break;
|
||||
default:
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
// 设置带颜色的文本
|
||||
// 设置带颜色的文本
|
||||
private void setColoredText(TextView textView, String prefix, String roomName, String suffix, int colorRes) {
|
||||
String fullText = prefix + roomName + suffix;
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder(fullText);
|
||||
|
||||
// 先为整个文本设置白色
|
||||
builder.setSpan(
|
||||
new ForegroundColorSpan(ContextCompat.getColor(this, R.color.white)),
|
||||
0,
|
||||
fullText.length(),
|
||||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||
);
|
||||
|
||||
// 查找房间名在文本中的位置
|
||||
int start = fullText.indexOf("[");
|
||||
int end = fullText.indexOf("]") + 1;
|
||||
|
||||
if (start >= 0 && end > start) {
|
||||
// 为房间名部分设置指定颜色
|
||||
builder.setSpan(
|
||||
new ForegroundColorSpan(ContextCompat.getColor(this, colorRes)),
|
||||
start,
|
||||
end,
|
||||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||
);
|
||||
}
|
||||
|
||||
textView.setText(builder);
|
||||
}
|
||||
|
||||
private void resetAndStartHourlyAnimation(View view, long displayDuration, Runnable onAnimationEnd) {
|
||||
try {
|
||||
int screenWidth = getScreenWidth();
|
||||
// 设置初始位置:在屏幕右侧外部
|
||||
view.setTranslationX(screenWidth);
|
||||
|
||||
// 进入动画
|
||||
ObjectAnimator enterAnimator = ObjectAnimator.ofFloat(view, "translationX", screenWidth, 0f);
|
||||
enterAnimator.setDuration(500);
|
||||
enterAnimator.setInterpolator(new DecelerateInterpolator());
|
||||
enterAnimator.start();
|
||||
|
||||
// 停留后退出动画
|
||||
view.postDelayed(() -> {
|
||||
try {
|
||||
ObjectAnimator exitAnimator = ObjectAnimator.ofFloat(view, "translationX", 0f, -screenWidth);
|
||||
exitAnimator.setDuration(500);
|
||||
exitAnimator.setInterpolator(new AccelerateInterpolator());
|
||||
exitAnimator.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
onAnimationEnd.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
onAnimationEnd.run();
|
||||
}
|
||||
});
|
||||
exitAnimator.start();
|
||||
} catch (Exception e) {
|
||||
LogUtils.e("小时榜退出动画执行失败", e);
|
||||
onAnimationEnd.run();
|
||||
}
|
||||
}, displayDuration); // 根据类型设置的展示时间
|
||||
|
||||
} catch (Exception e) {
|
||||
LogUtils.e("小时榜动画启动失败", e);
|
||||
onAnimationEnd.run();
|
||||
}
|
||||
}
|
||||
|
||||
private void clearAllHourlyViews() {
|
||||
ViewGroup decorView = (ViewGroup) getWindow().getDecorView();
|
||||
for (View view : currentHourlyViews.values()) {
|
||||
if (view.getParent() != null) {
|
||||
decorView.removeView(view);
|
||||
}
|
||||
}
|
||||
currentHourlyViews.clear();
|
||||
}
|
||||
|
||||
/// 礼物特效 - MQTT消息处理
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onMessageReceived(MqttBean mqttBean) {
|
||||
|
||||
@@ -114,6 +114,8 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
// 添加后台状态标记
|
||||
private boolean wasInBackground = false;
|
||||
|
||||
public boolean isMai=false;
|
||||
|
||||
public void onAppBackground() {
|
||||
wasInBackground = true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.xscm.moduleutil.bean.room;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/9/29
|
||||
*@description:小时榜实体类
|
||||
*/
|
||||
@Data
|
||||
public class RoomHourBean {
|
||||
private String time_range;
|
||||
private List<RoomListBean> lists;
|
||||
|
||||
@Data
|
||||
public class RoomListBean {
|
||||
private String room_id;
|
||||
private String room_name;
|
||||
private int label_id;
|
||||
private String room_cover;
|
||||
private int total_price;
|
||||
private String label_icon;
|
||||
private int xlh_status;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -30,6 +30,7 @@ public class RoomInfoResp implements Serializable {
|
||||
private List<RoomPitBean> song_pit_list;
|
||||
private FriendInfo friend_info;
|
||||
private GiftXlh gift_cycle;
|
||||
private int hour_ranking_open;//1:开启 0:关闭
|
||||
|
||||
|
||||
//弹出麦位操作弹出
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 小时榜飘屏
|
||||
*/
|
||||
@Data
|
||||
public class HourlyBean {
|
||||
private String room_id;
|
||||
private String room_name;
|
||||
private String text;
|
||||
private String rank_number;
|
||||
}
|
||||
@@ -63,13 +63,7 @@ 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;
|
||||
import com.xscm.moduleutil.bean.room.RoomAuction;
|
||||
import com.xscm.moduleutil.bean.room.RoomBean;
|
||||
import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
||||
import com.xscm.moduleutil.bean.room.RoomOnline;
|
||||
import com.xscm.moduleutil.bean.room.*;
|
||||
import com.xscm.moduleutil.bean.zhuangb.ZhuangBanShangChengBean;
|
||||
import com.xscm.moduleutil.widget.Constants;
|
||||
|
||||
@@ -95,6 +89,9 @@ public interface ApiServer {
|
||||
@POST(Constants.LOGIN)
|
||||
Call<BaseModel<List<UserBean>>> login(@Field("user_login") String user_login, @Field("sms_code") String sms_code);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.ROOM_HOUR_BEAN)
|
||||
Call<BaseModel<RoomHourBean>> getRoomHourRanking(@Field("page") String page,@Field("page_limit")String page_limit);
|
||||
@FormUrlEncoded //手机换绑
|
||||
@POST(Constants.MODIFY_MOBILE)
|
||||
Call<BaseModel<String>> mobileView(@Field("mobile") String mobile, @Field("new_mobile") String new_mobile, @Field("sms_code") String sms_code);
|
||||
|
||||
@@ -80,13 +80,7 @@ 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;
|
||||
import com.xscm.moduleutil.bean.room.RoomAuction;
|
||||
import com.xscm.moduleutil.bean.room.RoomBean;
|
||||
import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
||||
import com.xscm.moduleutil.bean.room.RoomOnline;
|
||||
import com.xscm.moduleutil.bean.room.*;
|
||||
import com.xscm.moduleutil.bean.zhuangb.ZhuangBanShangChengBean;
|
||||
import com.xscm.moduleutil.listener.MessageListenerSingleton;
|
||||
import com.xscm.moduleutil.utils.SpUtil;
|
||||
@@ -351,6 +345,29 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getRoomHourRanking(String page, String page_limit, BaseObserver<RoomHourBean> observer){
|
||||
sApiServer.getRoomHourRanking(page, page_limit).enqueue(new Callback<BaseModel<RoomHourBean>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<RoomHourBean>> call, Response<BaseModel<RoomHourBean>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<RoomHourBean> listBaseModel = response.body();
|
||||
if (listBaseModel != null) {
|
||||
if (listBaseModel.getCode()==1) {
|
||||
observer.onNext(listBaseModel.getData());
|
||||
}else {
|
||||
ToastUtils.showShort(listBaseModel.getMsg());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<RoomHourBean>> call, Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void userLogin(String mobile, String password, BaseObserver<List<UserBean>> observer) {
|
||||
sApiServer.userLogin(mobile, password).enqueue(new Callback<BaseModel<List<UserBean>>>() {
|
||||
@Override
|
||||
|
||||
@@ -31,6 +31,7 @@ public class MqttConnect {
|
||||
// 订阅主题
|
||||
public static String shutdown = "";
|
||||
public static String update_app = "";
|
||||
public static String qx_hour_ranking = "";
|
||||
Handler handler = new Handler(Looper.getMainLooper());
|
||||
String[] topic;
|
||||
int[] qos = {1,2,3,0,0,0,0,0,0,0,0,0,0}; // 消息质量
|
||||
@@ -44,10 +45,12 @@ public class MqttConnect {
|
||||
// 这里是你自己需要订阅的主题
|
||||
shutdown = "qx_room_topic"; // 关机
|
||||
update_app = "qx_xunlehui"; // 发送更新APP
|
||||
qx_hour_ranking = "qx_hour_ranking";
|
||||
|
||||
ArrayList<String> topicList = new ArrayList<>();
|
||||
topicList.add(shutdown);
|
||||
topicList.add(update_app);
|
||||
topicList.add(qx_hour_ranking);
|
||||
topic = topicList.toArray(new String[0]);
|
||||
}
|
||||
|
||||
@@ -82,6 +85,7 @@ public class MqttConnect {
|
||||
// sub(topic,qos);
|
||||
sub(shutdown);
|
||||
sub(update_app);
|
||||
sub(qx_hour_ranking);
|
||||
// uiTip("MQTT连接成功");
|
||||
}catch (MqttException e){
|
||||
// uiTip("MQTT连接失败,准备重连。。。:"+e.getMessage());
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.hjq.toast.ToastUtils;
|
||||
import com.orhanobut.logger.Logger;
|
||||
import com.xscm.moduleutil.bean.MqttXlhEnd;
|
||||
import com.xscm.moduleutil.bean.XLHBean;
|
||||
import com.xscm.moduleutil.event.HourlyBean;
|
||||
import com.xscm.moduleutil.event.RoomGiftRunable;
|
||||
import com.xscm.moduleutil.utils.SpUtil;
|
||||
|
||||
@@ -20,6 +21,8 @@ import org.eclipse.paho.client.mqttv3.MqttCallback;
|
||||
import org.eclipse.paho.client.mqttv3.MqttMessage;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MqttInitCallback implements MqttCallback {
|
||||
private String Tag = "MqttInitCallback";
|
||||
private String HOST;
|
||||
@@ -58,6 +61,59 @@ public class MqttInitCallback implements MqttCallback {
|
||||
} else if (topic.equals("qx_xunlehui")) {
|
||||
// ToastUtils.show("收到轮盘飘屏");
|
||||
receiveXlhMessage(messageStr);
|
||||
}else if (topic.equals("qx_hour_ranking")){
|
||||
receiveQXHourRanking(topic, messageStr);
|
||||
}
|
||||
}
|
||||
|
||||
private void receiveQXHourRanking(String topic, String data) {
|
||||
try {
|
||||
JSONObject jsonObject = JSON.parseObject(data);
|
||||
int type = jsonObject.getIntValue("type");
|
||||
String message = jsonObject.getString("msg");
|
||||
|
||||
// 将事件处理放到主线程执行
|
||||
new Handler(Looper.getMainLooper()).post(() -> {
|
||||
processMessage(topic, message);
|
||||
});
|
||||
} catch (Exception e) {
|
||||
Log.e("MQTT", "解析MQTT消息异常", e);
|
||||
// ToastUtils.show("收到礼物飘屏,解析异常");
|
||||
}
|
||||
}
|
||||
|
||||
private void processMessage(String topic, String data){
|
||||
try {
|
||||
// 如果 data 是集合字符串
|
||||
if (isJsonArray(data)) {
|
||||
// 解析为集合
|
||||
List<HourlyBean> dataList = JSON.parseArray(data, HourlyBean.class);
|
||||
|
||||
// 在主线程处理集合数据
|
||||
new Handler(Looper.getMainLooper()).post(() -> {
|
||||
processDataList(dataList);
|
||||
});
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e("MQTT", "解析MQTT消息异常", e);
|
||||
}
|
||||
}
|
||||
// 处理集合数据
|
||||
private void processDataList(List<HourlyBean> dataList) {
|
||||
// 遍历集合并发送每个元素
|
||||
// for (HourlyBean dataItem : dataList) {
|
||||
// EventBus.getDefault().post(dataItem);
|
||||
// }
|
||||
|
||||
// 或者发送整个集合
|
||||
EventBus.getDefault().post(dataList);
|
||||
}
|
||||
// 判断是否为 JSON 数组
|
||||
private boolean isJsonArray(String jsonString) {
|
||||
try {
|
||||
return JSON.parseArray(jsonString) != null;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
private void receiveMessage(String topic, String data) {
|
||||
|
||||
@@ -51,11 +51,11 @@ public class EnvironmentPrefs {
|
||||
// }
|
||||
|
||||
// 默认使用生产环境
|
||||
String envName = sharedPreferences.getString(KEY_ENV, EnvironmentEnum.TEST.name());
|
||||
String envName = sharedPreferences.getString(KEY_ENV, EnvironmentEnum.PRODUCTION.name());
|
||||
try {
|
||||
return EnvironmentEnum.valueOf(envName);
|
||||
} catch (IllegalArgumentException e) {
|
||||
return EnvironmentEnum.TEST; // 出错时默认返回生产环境
|
||||
return EnvironmentEnum.PRODUCTION; // 出错时默认返回生产环境
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -538,7 +538,7 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
@Override
|
||||
public void subscribeMessages(RoomBeckoningEvent roomBeckoningEvent) {
|
||||
if (roomId.equals(roomBeckoningEvent.getRoomId())) {
|
||||
if (roomId != null && roomId.equals(roomBeckoningEvent.getRoomId())) {
|
||||
mCharmView.setVisibility(roomBeckoningEvent.isOpen() ? VISIBLE : INVISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -392,6 +392,7 @@ public class Constants {
|
||||
public static final String GET_GIFT_PACK_LIST_COUNT = "/api/UserGiftPack/get_gift_pack_list_count";//背包礼物总价值
|
||||
public static final String ROOM_USER_RECONNECT = "/api/Room/user_reconnect";//用户重连
|
||||
public static final String USER_ROOM_BACK = "/api/Room/user_in_room_background";//用户在房间内切后台保留数据操作
|
||||
public static final String ROOM_HOUR_BEAN = "/api/RoomHourRanking/room_hour_ranking";//房间小时榜
|
||||
|
||||
|
||||
|
||||
|
||||
70
moduleUtil/src/main/res/layout/item_hourly_floating.xml
Normal file
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_90">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_h_t"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/hourl_top1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginEnd="@dimen/dp_2"
|
||||
android:ellipsize="start"
|
||||
android:maxLines="1"
|
||||
android:text="礼品"
|
||||
android:textColor="#FFDE77"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_to_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:text="...."
|
||||
android:textColor="#FFDE77"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_name"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_piaoping"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_num"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_47"
|
||||
android:text="x1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
BIN
moduleUtil/src/main/res/mipmap-xhdpi/hourly_xlh_sta.webp
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/top1.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/top2.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/top3.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/dcl.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/hourl_top1.webp
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/hourl_top2.webp
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/hourl_top3.webp
Normal file
|
After Width: | Height: | Size: 25 KiB |
@@ -23,6 +23,8 @@
|
||||
<color name="color_ffe5f7">#ffe5f7</color>
|
||||
<color name="color_ff8acc">#FF8ACC</color>
|
||||
<color name="color_45d08c">#45D08C</color>
|
||||
<color name="color_1FFFE5">#1FFFE5</color>
|
||||
<color name="color_FFFA63">#FFFA63</color>
|
||||
<color name="color_959595">#959595</color>
|
||||
<color name="color_ff2727">#FF2727</color>
|
||||
<!-- 透明度60% -->
|
||||
|
||||
@@ -48,8 +48,10 @@ import com.blankj.utilcode.util.ThreadUtils
|
||||
import com.blankj.utilcode.util.TimeUtils
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.example.moduleroom.R
|
||||
|
||||
import com.example.moduleroom.contacts.RoomContacts
|
||||
import com.example.moduleroom.databinding.ActivityRoomBinding
|
||||
|
||||
import com.example.moduleroom.dialog.ExitRoomBottomSheet
|
||||
import com.example.moduleroom.dialog.ExitRoomBottomSheet.OnOptionSelectedListener
|
||||
import com.example.moduleroom.dialog.FriendsDialogFragment
|
||||
@@ -677,7 +679,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
|
||||
|
||||
|
||||
private val imSdkListener = object : V2TIMSDKListener() {
|
||||
override fun onConnecting() {}
|
||||
|
||||
@@ -970,6 +971,12 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
newDialog.show(fm, "TourClubDialogFragment")
|
||||
}
|
||||
}
|
||||
|
||||
mBinding!!.clXsb.visibility = View.GONE
|
||||
mBinding!!.tvXlh.setOnClickListener { view ->
|
||||
val fragment = HourlyChartDialog.newInstance()
|
||||
fragment.show(supportFragmentManager, "HourlyChartDialog")
|
||||
}
|
||||
}
|
||||
|
||||
private fun onGiftGiveProgressClcik() {
|
||||
@@ -1411,12 +1418,13 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
// ToastUtils.showShort("点击了房间,事件穿透");
|
||||
}
|
||||
|
||||
mBinding!!.roomTop.clXsb.setOnClickListener {
|
||||
val fragment = HourlyChartDialog.newInstance()
|
||||
if (fragment != null) {
|
||||
addActiveDialogFragment(fragment) // 添加到管理列表
|
||||
}
|
||||
}
|
||||
// mBinding!!.clXsb.setOnClickListener {
|
||||
// val fragment = HourlyChartDialog.newInstance()
|
||||
// fragment.show(supportFragmentManager,"HourlyChartDialog")
|
||||
// if (fragment != null) {
|
||||
// addActiveDialogFragment(fragment) // 添加到管理列表
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@@ -1545,7 +1553,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
roomFragment!!.handleMsgType1028(messageEvent)
|
||||
} else if (msgType == 1058) {
|
||||
var userId = messageEvent!!.text!!.user_id!!
|
||||
LogUtils.e("messageEvent!!.text.type"+messageEvent!!.text.type)
|
||||
LogUtils.e("messageEvent!!.text.type" + messageEvent!!.text.type)
|
||||
CommonAppContext.getInstance().onlineMap.set(
|
||||
userId?.toString() ?: "",
|
||||
messageEvent!!.text.type
|
||||
@@ -1999,7 +2007,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
if ("2" == labelId) {
|
||||
roomFragment!!.KtvFragmentEvent(messageEvent)
|
||||
} else if ("1" == labelId) {
|
||||
mRoomInfoResp!!.room_info.pit_list.set(pitNumber.toInt()-1, getPitBean(messageEvent))
|
||||
mRoomInfoResp!!.room_info.pit_list.set(pitNumber.toInt() - 1, getPitBean(messageEvent))
|
||||
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
||||
roomFragment!!.SingSongEvent(messageEvent)
|
||||
}
|
||||
@@ -2076,7 +2084,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
if ("2" == labelId) {
|
||||
roomFragment!!.KtvFragmentEvent(messageEvent)
|
||||
} else if ("1" == labelId) {
|
||||
mRoomInfoResp!!.room_info.pit_list.set(pitNumber.toInt()-1, getPitBean2(messageEvent,pitNumber))
|
||||
mRoomInfoResp!!.room_info.pit_list.set(pitNumber.toInt() - 1, getPitBean2(messageEvent, pitNumber))
|
||||
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
||||
roomFragment!!.SingSongEvent(messageEvent)
|
||||
if (mRoomInfoResp!!.user_info.user_id == SpUtil.getUserId().toString() + "") {
|
||||
@@ -2959,12 +2967,14 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
isSwith = false
|
||||
AgoraManager.getInstance(this).muteLocalAudioStream(false)
|
||||
AgoraManager.getInstance(this).ClientRole(true)
|
||||
CommonAppContext.getInstance().isMai = true
|
||||
} else {
|
||||
mBinding!!.ivMic.setImageResource(com.xscm.moduleutil.R.mipmap.room_microphone_off)
|
||||
AgoraManager.getInstance(this)
|
||||
.setLocalAudioEnabled(false, SpUtil.getUserId().toString() + "")
|
||||
isSwith = true
|
||||
isMute(1)
|
||||
CommonAppContext.getInstance().isMai = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3389,10 +3399,14 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
mBinding!!.xlhRk.visibility = View.INVISIBLE
|
||||
releaseCountDownTimer1()
|
||||
}
|
||||
// tzblChanged()
|
||||
// sharedViewModel.setDataForFragment(mRoomInfoResp);
|
||||
//
|
||||
|
||||
if (mRoomInfoResp!!.hour_ranking_open == 1) {
|
||||
mBinding!!.clXsb.visibility = View.VISIBLE
|
||||
} else {
|
||||
mBinding!!.clXsb.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
protected fun tzblChanged() {
|
||||
// mBinding.dhv9.updateTzbl(SpUtil.getTzbl(roomId));
|
||||
|
||||
@@ -3674,7 +3688,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
// customMusicFloatingView.initView();
|
||||
customMusicFloatingView!!.show()
|
||||
// 等待 View 创建完成后才绑定点击事件
|
||||
ViewUtils.waitUntilViewReady(musicWindowControl!!,
|
||||
ViewUtils.waitUntilViewReady(
|
||||
musicWindowControl!!,
|
||||
OnViewCreatedListener { view: View? ->
|
||||
customMusicFloatingView!!.initView() // 这里 fxControl.getView() 不再为 null
|
||||
customMusicFloatingView!!.updatePlayState(false)
|
||||
@@ -3692,15 +3707,20 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
CommonAppContext.getInstance().isRoomJoininj = false
|
||||
// 当Activity恢复时,重置标记
|
||||
userLeaving = true
|
||||
RetrofitClient.getInstance().roomUserReconnect(CommonAppContext.getInstance().playId)
|
||||
if(CommonAppContext.getInstance().onConnectFailed){//判断是否有有过断开腾讯IM
|
||||
CommonAppContext.getInstance().onConnectFailed=false
|
||||
if (CommonAppContext.getInstance().playId!=null && !CommonAppContext.getInstance().playId.isEmpty()) { //判断是否有roomId
|
||||
LogUtils.e("RoomActivity", "onResume playId:"+CommonAppContext.getInstance().playId)
|
||||
MvpPre!!.postRoomInfo(CommonAppContext.getInstance().playId)//当有过断开,然后重新连接
|
||||
LogUtils.e("RoomActivity", "onResume playId:"+CommonAppContext.getInstance().playId)
|
||||
// RetrofitClient.getInstance().roomUserReconnect(CommonAppContext.getInstance().playId)//重连腾讯IM
|
||||
// if(CommonAppContext.getInstance().onConnectFailed){//判断是否有有过断开腾讯IM
|
||||
// CommonAppContext.getInstance().onConnectFailed=false
|
||||
// if (CommonAppContext.getInstance().playId!=null && !CommonAppContext.getInstance().playId.isEmpty()) { //判断是否有roomId
|
||||
// LogUtils.e("RoomActivity", "onResume playId:"+CommonAppContext.getInstance().playId)
|
||||
// MvpPre!!.postRoomInfo(CommonAppContext.getInstance().playId)//当有过断开,然后重新连接
|
||||
// LogUtils.e("RoomActivity", "onResume playId:"+CommonAppContext.getInstance().playId)
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
if (isInBackground) {
|
||||
isInBackground = false
|
||||
MvpPre!!.postRoomInfo(CommonAppContext.getInstance().playId)
|
||||
}
|
||||
|
||||
// // 正常启动或从后台恢复
|
||||
@@ -3963,7 +3983,9 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
|
||||
|
||||
AgoraManager.stopMuisc()
|
||||
if (!CommonAppContext.getInstance().isMai) {
|
||||
initializeAudio()
|
||||
}
|
||||
|
||||
if (mRoomInfoResp!!.room_info.label_id == "2" || mRoomInfoResp!!.room_info.type_id == "7") {
|
||||
mBinding!!.rlMore.visibility = View.GONE
|
||||
@@ -3979,6 +4001,12 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
mBinding!!.rlMore.visibility = View.GONE
|
||||
mBinding!!.rlMisc.visibility = View.GONE
|
||||
}
|
||||
|
||||
if (mRoomInfoResp!!.hour_ranking_open == 1) {
|
||||
mBinding!!.clXsb.visibility = View.VISIBLE
|
||||
} else {
|
||||
mBinding!!.clXsb.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
fun upHeight() {
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.example.moduleroom.adapter;
|
||||
|
||||
import android.view.View;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.moduleroom.R;
|
||||
import com.xscm.moduleutil.bean.room.RoomHourBean;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
|
||||
public class RoomHourlyAdapter extends BaseQuickAdapter<RoomHourBean.RoomListBean, BaseViewHolder> {
|
||||
public RoomHourlyAdapter() {
|
||||
super(R.layout.item_hourly);
|
||||
}
|
||||
|
||||
// 定义点击监听器接口
|
||||
public interface OnItemClickListener {
|
||||
void onItemClick(RoomHourBean.RoomListBean item, int position);
|
||||
}
|
||||
|
||||
private OnItemClickListener mOnItemClickListener;
|
||||
|
||||
// 设置监听器的方法
|
||||
public void setOnItemClickListener(OnItemClickListener listener) {
|
||||
this.mOnItemClickListener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder baseViewHolder, RoomHourBean.RoomListBean roomListBean) {
|
||||
// 获取当前项的索引
|
||||
int position = baseViewHolder.getAdapterPosition();
|
||||
if (position == 0){
|
||||
baseViewHolder.setBackgroundRes(R.id.tv_num, com.xscm.moduleutil.R.mipmap.top1);
|
||||
}else if (position == 1){
|
||||
baseViewHolder.setBackgroundRes(R.id.tv_num, com.xscm.moduleutil.R.mipmap.top2);
|
||||
}else if (position == 2){
|
||||
baseViewHolder.setBackgroundRes(R.id.tv_num, com.xscm.moduleutil.R.mipmap.top3);
|
||||
}else {
|
||||
baseViewHolder.setText(R.id.tv_num, position+1+"");
|
||||
}
|
||||
|
||||
ImageUtils.loadHeadCC(roomListBean.getRoom_cover(), baseViewHolder.getView(R.id.room_tx));
|
||||
if (roomListBean.getXlh_status()==1){
|
||||
baseViewHolder.getView(R.id.im_xlh).setVisibility(View.VISIBLE);
|
||||
baseViewHolder.setImageResource(R.id.im_xlh, com.xscm.moduleutil.R.mipmap.hourly_xlh_status);
|
||||
}else if (roomListBean.getXlh_status()==2){
|
||||
baseViewHolder.getView(R.id.im_xlh).setVisibility(View.VISIBLE);
|
||||
baseViewHolder.setImageResource(R.id.im_xlh, com.xscm.moduleutil.R.mipmap.hourly_xlh_sta);
|
||||
}else {
|
||||
baseViewHolder.getView(R.id.im_xlh).setVisibility(View.GONE);
|
||||
}
|
||||
baseViewHolder.setText(R.id.room_name, roomListBean.getRoom_name());
|
||||
ImageUtils.loadHeadCC(roomListBean.getLabel_icon(), baseViewHolder.getView(R.id.iv_type));
|
||||
baseViewHolder.setText(R.id.room_hr, roomListBean.getTotal_price()+"");
|
||||
// 为整个item设置点击事件
|
||||
baseViewHolder.itemView.setOnClickListener(v -> {
|
||||
if (mOnItemClickListener != null) {
|
||||
mOnItemClickListener.onItemClick(roomListBean, position);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -4,13 +4,16 @@ import android.app.Activity;
|
||||
|
||||
import com.xscm.moduleutil.activity.IPresenter;
|
||||
import com.xscm.moduleutil.activity.IView;
|
||||
import com.xscm.moduleutil.bean.room.RoomHourBean;
|
||||
|
||||
public class HourlyChartContacts {
|
||||
public interface View extends IView<Activity> {
|
||||
void getRoomHourRanking(RoomHourBean roomHourBean);
|
||||
|
||||
void findView();
|
||||
}
|
||||
|
||||
public interface IRoomPre extends IPresenter {
|
||||
|
||||
void getRoomHourRanking(String page,String page_limit);// 房间小时榜
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,37 @@
|
||||
package com.example.moduleroom.dialog;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.view.Gravity;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import com.example.moduleroom.R;
|
||||
import com.example.moduleroom.adapter.RoomHourlyAdapter;
|
||||
import com.example.moduleroom.contacts.HourlyChartContacts;
|
||||
import com.example.moduleroom.databinding.DialogHourlyChartFragmentBinding;
|
||||
import com.example.moduleroom.presenter.HourlyChartPresenter;
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||
import com.xscm.moduleutil.activity.IPresenter;
|
||||
import com.xscm.moduleutil.adapter.CirleListAdapter;
|
||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||
import com.xscm.moduleutil.base.RoomManager;
|
||||
import com.xscm.moduleutil.bean.room.RoomHourBean;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/9/29
|
||||
*@description:小时榜
|
||||
*/
|
||||
public class HourlyChartDialog extends BaseMvpDialogFragment<HourlyChartPresenter, DialogHourlyChartFragmentBinding> implements HourlyChartContacts.View {
|
||||
private int page;
|
||||
|
||||
private RoomHourlyAdapter roomHourlyAdapter;
|
||||
|
||||
@Override
|
||||
protected HourlyChartPresenter bindPresenter() {
|
||||
return new HourlyChartPresenter( this, getActivity());
|
||||
@@ -27,14 +47,98 @@ public class HourlyChartDialog extends BaseMvpDialogFragment<HourlyChartPresente
|
||||
protected void initData() {
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
if (getDialog() != null && getDialog().getWindow() != null) {
|
||||
getDialog().getWindow().setLayout(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT
|
||||
);
|
||||
getDialog().getWindow().setGravity(Gravity.END);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
page=1;
|
||||
MvpPre.getRoomHourRanking(page+"", "20");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
// 设置dialog的窗口属性
|
||||
if (getDialog() != null && getDialog().getWindow() != null) {
|
||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
getDialog().getWindow().setGravity(Gravity.END); // 保持右侧显示
|
||||
}
|
||||
mBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
roomHourlyAdapter = new RoomHourlyAdapter();
|
||||
mBinding.recyclerView.setAdapter(roomHourlyAdapter);
|
||||
// 确保最后一项完全可见
|
||||
mBinding.recyclerView.setClipToPadding(false);
|
||||
mBinding.recyclerView.setPadding(
|
||||
0,
|
||||
getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_12),
|
||||
0,
|
||||
getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_12)
|
||||
);
|
||||
mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull @NotNull RefreshLayout refreshLayout) {
|
||||
page=1;
|
||||
MvpPre.getRoomHourRanking(page+"", "20");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMore(@NonNull @NotNull RefreshLayout refreshLayout) {
|
||||
page++;
|
||||
MvpPre.getRoomHourRanking(page+"", "20");
|
||||
}
|
||||
});
|
||||
|
||||
roomHourlyAdapter.setOnItemClickListener(new RoomHourlyAdapter.OnItemClickListener() {
|
||||
|
||||
@Override
|
||||
public void onItemClick(RoomHourBean.RoomListBean item, int position) {
|
||||
RoomManager.getInstance().fetchRoomDataAndEnter(getActivity(), item.getRoom_id(),"");
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.viewBackground.setOnClickListener(v -> dismiss());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.dialog_hourly_chart_fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getRoomHourRanking(RoomHourBean roomHourBean) {
|
||||
if (roomHourBean!=null){
|
||||
mBinding.tvHourlyDjs.setText("榜单时间 "+roomHourBean.getTime_range());
|
||||
if (page == 1) {
|
||||
if (roomHourBean.getLists() != null && !roomHourBean.getLists().isEmpty()) {
|
||||
roomHourlyAdapter.setNewData(roomHourBean.getLists());
|
||||
} else {
|
||||
roomHourlyAdapter.setNewData(new ArrayList<>()); // 清空旧数据并提示空状态
|
||||
}
|
||||
} else {
|
||||
if (roomHourBean.getLists() != null && !roomHourlyAdapter.getData().isEmpty()) {
|
||||
roomHourlyAdapter.addData(roomHourBean.getLists());
|
||||
} else {
|
||||
// 没有更多数据时可调用 finishLoadMoreWithNoMoreData()
|
||||
mBinding.smartRefreshLayout.finishLoadMoreWithNoMoreData();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void findView() {
|
||||
mBinding.smartRefreshLayout.finishLoadMore() ;
|
||||
mBinding.smartRefreshLayout.finishRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,40 @@ import android.content.Context;
|
||||
|
||||
import com.example.moduleroom.contacts.BidListContacts;
|
||||
import com.example.moduleroom.contacts.HourlyChartContacts;
|
||||
import com.xscm.moduleutil.bean.room.RoomHourBean;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.presenter.BasePresenter;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
public class HourlyChartPresenter extends BasePresenter<HourlyChartContacts.View> implements HourlyChartContacts.IRoomPre{
|
||||
|
||||
HourlyChartContacts.View mView;
|
||||
public HourlyChartPresenter(HourlyChartContacts.View view, Context context) {
|
||||
super(view, context);
|
||||
this.mView=view;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void getRoomHourRanking(String page, String page_limit) {
|
||||
api.getRoomHourRanking(page, page_limit, new BaseObserver<RoomHourBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NotNull Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NotNull RoomHourBean roomHourBean) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().getRoomHourRanking(roomHourBean);
|
||||
MvpRef.get().findView();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_bg_mask"
|
||||
@@ -34,11 +34,11 @@
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/color_40000000"
|
||||
android:scaleType="centerCrop"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:visibility="gone"/>
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
|
||||
<include
|
||||
@@ -50,7 +50,7 @@
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:elevation="2dp"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/main_content_container"
|
||||
@@ -65,12 +65,12 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/room_top">
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/guideline_horizontal"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="horizontal"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.66" />-->
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/guideline_horizontal"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="horizontal"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.66" />-->
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/vp_room_pager"
|
||||
@@ -81,7 +81,7 @@
|
||||
android:clipToPadding="false"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/ease_container"
|
||||
@@ -97,45 +97,45 @@
|
||||
android:id="@+id/svga_ride"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:minHeight="@dimen/dp_80" />
|
||||
android:minHeight="@dimen/dp_80"/>
|
||||
</FrameLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_10"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_15"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintBottom_toTopOf="@+id/ll_bottom"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/room_top">-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_10"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_15"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintBottom_toTopOf="@+id/ll_bottom"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/room_top">-->
|
||||
|
||||
<!-- <FrameLayout-->
|
||||
<!-- android:id="@+id/vp_room_pager"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- android:layout_weight="2"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_5"-->
|
||||
<!-- android:clipChildren="false"-->
|
||||
<!-- android:clipToPadding="false" />-->
|
||||
<!-- <FrameLayout-->
|
||||
<!-- android:id="@+id/vp_room_pager"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- android:layout_weight="2"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_5"-->
|
||||
<!-- android:clipChildren="false"-->
|
||||
<!-- android:clipToPadding="false" />-->
|
||||
|
||||
<!-- <FrameLayout-->
|
||||
<!-- android:id="@+id/ease_container"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_5"-->
|
||||
<!-- android:minHeight="@dimen/dp_80">-->
|
||||
<!-- <FrameLayout-->
|
||||
<!-- android:id="@+id/ease_container"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_5"-->
|
||||
<!-- android:minHeight="@dimen/dp_80">-->
|
||||
|
||||
<!-- <com.xscm.moduleutil.widget.AvatarFrameView-->
|
||||
<!-- android:id="@+id/svga_ride"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:minHeight="@dimen/dp_80" />-->
|
||||
<!-- </FrameLayout>-->
|
||||
<!-- </LinearLayout>-->
|
||||
<!-- <com.xscm.moduleutil.widget.AvatarFrameView-->
|
||||
<!-- android:id="@+id/svga_ride"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:minHeight="@dimen/dp_80" />-->
|
||||
<!-- </FrameLayout>-->
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
<com.xscm.moduleutil.widget.RoomMessageInputMenu
|
||||
android:id="@+id/input_menu1"
|
||||
@@ -143,7 +143,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_bottom"
|
||||
@@ -175,7 +175,7 @@
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:src="@mipmap/mess" />
|
||||
android:src="@mipmap/mess"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/iv_chat"
|
||||
@@ -185,13 +185,13 @@
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:text="说点什么"
|
||||
android:textColor="#80ffffff"
|
||||
android:textSize="@dimen/sp_13" />
|
||||
android:textSize="@dimen/sp_13"/>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="0.2" />
|
||||
android:layout_weight="0.2"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_voive"
|
||||
@@ -205,7 +205,7 @@
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/room_voice_kg" />
|
||||
android:src="@mipmap/room_voice_kg"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -223,7 +223,7 @@
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/room_microphone_off"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible" />
|
||||
tools:visibility="visible"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -239,7 +239,7 @@
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/room_message"
|
||||
android:visibility="visible" />
|
||||
android:visibility="visible"/>
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_message_dot"-->
|
||||
@@ -265,7 +265,7 @@
|
||||
android:textSize="@dimen/sp_8"
|
||||
android:visibility="gone"
|
||||
tools:text="99+"
|
||||
tools:visibility="visible" />
|
||||
tools:visibility="visible"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -280,7 +280,7 @@
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/room_pk" />
|
||||
android:src="@mipmap/room_pk"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -295,7 +295,7 @@
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/room_mis" />
|
||||
android:src="@mipmap/room_mis"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -310,7 +310,7 @@
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/room_gift" />
|
||||
android:src="@mipmap/room_gift"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -324,7 +324,7 @@
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/room_sett" />
|
||||
android:src="@mipmap/room_sett"/>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -338,7 +338,7 @@
|
||||
app:layout_constraintBottom_toTopOf="@id/ll_bottom"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
|
||||
<!-- </ScrollView>-->
|
||||
@@ -350,24 +350,24 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- <com.xscm.moduleutil.widget.AvatarFrameView-->
|
||||
<!-- android:id="@+id/svga_gift"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
<!-- <com.xscm.moduleutil.widget.AvatarFrameView-->
|
||||
<!-- android:id="@+id/svga_gift"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <com.xscm.moduleutil.widget.AvatarFrameView-->
|
||||
<!-- android:id="@+id/svga_zuoji"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
<!-- <com.xscm.moduleutil.widget.AvatarFrameView-->
|
||||
<!-- android:id="@+id/svga_zuoji"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!--礼物连送图标-->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -391,7 +391,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<com.xscm.moduleutil.widget.CircularProgressView
|
||||
android:id="@+id/gift_show_progress"
|
||||
@@ -404,12 +404,10 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:progColor="#888888"
|
||||
app:progWidth="3dp"
|
||||
app:progress="0" />
|
||||
app:progress="0"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_first_charge"
|
||||
android:layout_width="@dimen/dp_98"
|
||||
@@ -429,7 +427,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_first_charge"
|
||||
@@ -442,7 +440,7 @@
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_first_charge"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_first"
|
||||
@@ -455,7 +453,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_first_charge"
|
||||
tools:text="0人排队" />
|
||||
tools:text="0人排队"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -468,10 +466,10 @@
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginBottom="@dimen/dp_14"
|
||||
android:src="@mipmap/room_sound_effects"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/iv_wheat_feeding"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:visibility="visible"
|
||||
android:visibility="gone"/>
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_wheat_feeding"
|
||||
@@ -483,26 +481,22 @@
|
||||
android:translationZ="@dimen/dp_2"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:visibility="visible" />
|
||||
<!--https://tmd.xscmmidi.site/data/avatar/head_pic.png-->
|
||||
|
||||
|
||||
|
||||
tools:visibility="visible"/>
|
||||
<!--https://tmd.xscmmidi.site/data/avatar/head_pic.png-->
|
||||
|
||||
|
||||
<com.xscm.moduleutil.widget.DropViewRoom
|
||||
android:id="@+id/xlh_rk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_100"
|
||||
android:paddingEnd="@dimen/dp_0"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_100"
|
||||
android:background="@color/transparent"
|
||||
android:gravity="center_vertical|center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:background="@color/transparent"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
@@ -511,17 +505,47 @@
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@mipmap/xlh_rk_bj"
|
||||
app:riv_oval="true" />
|
||||
app:riv_oval="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_djs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_gravity="center_vertical"
|
||||
tools:text="倒计时:12:12"
|
||||
android:textColor="#FFEBBD"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:visibility="visible"/>
|
||||
android:visibility="visible"
|
||||
tools:text="倒计时:12:12"/>
|
||||
|
||||
|
||||
</com.xscm.moduleutil.widget.DropViewRoom>
|
||||
|
||||
|
||||
<com.xscm.moduleutil.widget.DropViewRoom
|
||||
android:id="@+id/cl_xsb"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_25"
|
||||
android:layout_marginTop="@dimen/dp_60"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:gravity="right"
|
||||
android:background="@mipmap/room_xsb"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible"
|
||||
android:elevation="4dp"
|
||||
android:visibility="invisible">
|
||||
<!-- android:background="@mipmap/room_xsb"-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_xlh"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center"
|
||||
android:gravity="center|right"
|
||||
android:paddingEnd="@dimen/dp_5"
|
||||
android:text="小时榜"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="11sp"/>
|
||||
|
||||
|
||||
</com.xscm.moduleutil.widget.DropViewRoom>
|
||||
@@ -541,7 +565,7 @@
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_screenshare"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_quan"
|
||||
@@ -550,8 +574,8 @@
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
android:translationZ="10dp"
|
||||
android:src="@mipmap/quan" />
|
||||
android:src="@mipmap/quan"
|
||||
android:translationZ="10dp"/>
|
||||
<!-- 自定义内容 -->
|
||||
</com.xscm.moduleutil.widget.floatingView.Floa>
|
||||
|
||||
@@ -591,7 +615,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
@@ -603,7 +627,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_oval="true" />
|
||||
app:riv_oval="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/headName"
|
||||
@@ -614,7 +638,7 @@
|
||||
android:textColor="@color/color_FFFFF0F0"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toEndOf="@+id/head_avate"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/head_cone"
|
||||
@@ -627,7 +651,7 @@
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/head_avate"
|
||||
app:layout_constraintTop_toBottomOf="@+id/headName" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/headName"/>
|
||||
|
||||
|
||||
<ImageView
|
||||
@@ -637,7 +661,7 @@
|
||||
android:src="@mipmap/tt_q"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/im_yc"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_quan_c"
|
||||
@@ -647,7 +671,7 @@
|
||||
android:src="@mipmap/tt_c"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/iv_quan_qiang"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_yc"
|
||||
@@ -656,7 +680,7 @@
|
||||
android:src="@mipmap/tt_yc"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -670,7 +694,7 @@
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -682,7 +706,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/black"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_exit_fullscreen"
|
||||
@@ -696,7 +720,7 @@
|
||||
android:src="@mipmap/quan"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -6,19 +6,39 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
android:background="@android:color/transparent">
|
||||
|
||||
<!-- 左侧透明背景,用于点击关闭dialog -->
|
||||
<View
|
||||
android:id="@+id/view_background"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#80000000"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/cl_content"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<!-- 右侧内容区域 -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_content"
|
||||
android:layout_width="@dimen/dp_256"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#32057F"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_bj"
|
||||
android:layout_width="@dimen/dp_256"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_281"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:src="@mipmap/hourly_top_bj"
|
||||
android:scaleType="fitCenter"
|
||||
/>
|
||||
android:scaleType="fitCenter"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hourly_djs"
|
||||
android:layout_width="@dimen/dp_150"
|
||||
android:layout_height="@dimen/dp_23"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_bj"
|
||||
@@ -29,14 +49,15 @@
|
||||
android:text="榜单时间 10:00-10:59"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_FFFFFF99"
|
||||
android:textSize="@dimen/sp_12"
|
||||
/>
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_hourly_wf"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/hourly_wh"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_40"/>
|
||||
@@ -44,23 +65,25 @@
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smart_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
app:srlEnableLoadMore="true"
|
||||
app:srlEnableRefresh="true"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_bj"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/im_bj"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
tools:listitem="@layout/item_hourly"
|
||||
android:paddingBottom="@dimen/dp_12" />
|
||||
android:paddingBottom="@dimen/dp_12"/>
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_88"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginBottom="@dimen/dp_4"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="#32057F"
|
||||
android:background="#430C93"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
@@ -25,6 +28,9 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_7"
|
||||
android:textColor="#A6A77E"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:gravity="center"
|
||||
android:background="@mipmap/hourly_num"/>
|
||||
|
||||
<TextView
|
||||
@@ -36,7 +42,6 @@
|
||||
android:background="@mipmap/hourly_d"/>
|
||||
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_xlh"
|
||||
android:layout_width="@dimen/dp_44"
|
||||
@@ -66,7 +71,7 @@
|
||||
android:src="@mipmap/ic_jiaoy"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintStart_toStartOf="@+id/room_name"
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_name" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_name"/>
|
||||
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_ranking"
|
||||
android:layout_width="@dimen/dp_59"
|
||||
android:layout_width="@dimen/dp_75"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:layout_below="@id/group_1"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
@@ -158,7 +158,7 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_notice"
|
||||
android:layout_width="@dimen/dp_48"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:layout_alignTop="@id/btn_ranking"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
@@ -192,7 +192,7 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:layout_alignTop="@id/btn_notice"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
@@ -257,42 +257,42 @@
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_xsb"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_25"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignTop="@id/btn_notice"
|
||||
tools:visibility="visible">
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:id="@+id/cl_xsb"-->
|
||||
<!-- android:layout_width="@dimen/dp_60"-->
|
||||
<!-- android:layout_height="@dimen/dp_25"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_8"-->
|
||||
<!-- android:layout_alignParentEnd="true"-->
|
||||
<!-- android:layout_alignTop="@id/btn_notice"-->
|
||||
<!-- tools:visibility="visible">-->
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_first_charge"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/room_xsb"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_first_charge"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:scaleType="fitCenter"-->
|
||||
<!-- android:src="@mipmap/room_xsb"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_first"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFF"
|
||||
android:paddingEnd="@dimen/dp_2"
|
||||
android:textSize="11sp"
|
||||
android:gravity="center"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:text="小时榜" />
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_first"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:textColor="#FFFFFF"-->
|
||||
<!-- android:paddingEnd="@dimen/dp_2"-->
|
||||
<!-- android:textSize="11sp"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- android:text="小时榜" />-->
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,64 +1,153 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_x"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/dcl"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
<!-- 提现金额 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_amount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:layout_marginStart="@dimen/dp_13"
|
||||
android:textColor="@color/color_FF333333"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/im_x"
|
||||
tools:text="提现金额"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:id="@+id/tv_amount_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:layout_marginEnd="@dimen/dp_13"
|
||||
android:textColor="@color/color_ff2727"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_amount"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:text="142.12"/>
|
||||
|
||||
<!-- 手续费 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_fee"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/color_FF666666"
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_amount"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_amount"
|
||||
tools:text="手续费"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_fee_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/color_FF666666"
|
||||
android:layout_marginEnd="@dimen/dp_13"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_amount_value"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_fee"
|
||||
tools:text="3.21"/>
|
||||
|
||||
<!-- 个人所得税 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_tax"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/color_FF666666"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_fee"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_fee"
|
||||
tools:text="个人所得税"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tax_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/color_666666"
|
||||
android:layout_marginEnd="@dimen/dp_13"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_fee_value"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_tax"
|
||||
tools:text="计算中..."/>
|
||||
|
||||
<View
|
||||
android:id="@+id/view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="#F1F2F3"
|
||||
android:layout_marginStart="@dimen/dp_13"
|
||||
android:layout_marginEnd="@dimen/dp_13"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_tax"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_tax"
|
||||
app:layout_constraintEnd_toEndOf="@+id/tv_tax_value"
|
||||
android:layout_marginTop="@dimen/dp_12"/>
|
||||
|
||||
<!-- 预计到账 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_expected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/color_FF333333"
|
||||
tools:text="每日签到"
|
||||
/>
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
app:layout_constraintTop_toBottomOf="@id/view"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_tax"
|
||||
|
||||
tools:text="预计到账(个税扣除前)"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_expected_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/color_ff2727"
|
||||
android:layout_marginEnd="@dimen/dp_13"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_expected"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:text="138.91"/>
|
||||
|
||||
<!-- 时间 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_17"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textColor="@color/color_FF999999"
|
||||
tools:text="2025-5-27 16:43:09"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_jb"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textColor="@color/color_ff2727"
|
||||
tools:text="+10"
|
||||
/>
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_expected"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_expected"
|
||||
tools:text="2024.12.14 11:21:45"/>
|
||||
|
||||
<!-- 状态 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textColor="#0DFFB9"
|
||||
android:layout_marginEnd="@dimen/dp_13"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textColor="@color/color_ff2727"
|
||||
tools:text="待处理"
|
||||
/>
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_time"
|
||||
tools:text="待处理"/>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_time"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:background="#F1F2F3"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||