1:添加小时榜
2:添加小时榜飘屏
@@ -66,19 +66,19 @@ android {
|
|||||||
|
|
||||||
// // 测试版配置
|
// // 测试版配置
|
||||||
beta {
|
beta {
|
||||||
dimension "environment"
|
// dimension "environment"
|
||||||
// 测试版包名:基础包名 + .beta(com.example.myapp.beta)
|
// // 测试版包名:基础包名 + .beta(com.example.myapp.beta)
|
||||||
applicationIdSuffix ".beta"
|
// applicationIdSuffix ".beta"
|
||||||
// 测试版版本名:1.0-beta
|
// // 测试版版本名:1.0-beta
|
||||||
versionNameSuffix "-beta"
|
// versionNameSuffix "-beta"
|
||||||
|
//
|
||||||
// 【测试版应用名称】动态生成带标识的名称
|
// // 【测试版应用名称】动态生成带标识的名称
|
||||||
resValue "string", "app_name", "秘地-测试版"
|
// resValue "string", "app_name", "秘地-测试版"
|
||||||
|
//
|
||||||
// 【测试版图标】替换为测试专用图标
|
// // 【测试版图标】替换为测试专用图标
|
||||||
manifestPlaceholders = [
|
// manifestPlaceholders = [
|
||||||
appIcon: "@mipmap/ic_launcher_app_bat" // 需在main/res/mipmap放置该图标
|
// appIcon: "@mipmap/ic_launcher_app_bat" // 需在main/res/mipmap放置该图标
|
||||||
]
|
// ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ isBuildModule=false
|
|||||||
#org.gradle.deamon=false
|
#org.gradle.deamon=false
|
||||||
android.injected.testOnly=false
|
android.injected.testOnly=false
|
||||||
|
|
||||||
APP_VERSION_NAME=1.1.6
|
APP_VERSION_NAME=1.1.7
|
||||||
APP_VERSION_CODE=168
|
APP_VERSION_CODE=169
|
||||||
|
|
||||||
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
||||||
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
#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.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
|
import android.text.Spannable;
|
||||||
|
import android.text.SpannableStringBuilder;
|
||||||
|
import android.text.style.ForegroundColorSpan;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@@ -37,6 +40,7 @@ import android.widget.TextView;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.databinding.DataBindingUtil;
|
||||||
import androidx.databinding.ViewDataBinding;
|
import androidx.databinding.ViewDataBinding;
|
||||||
|
|
||||||
@@ -50,6 +54,7 @@ import com.xscm.moduleutil.R;
|
|||||||
import com.xscm.moduleutil.base.CommonAppContext;
|
import com.xscm.moduleutil.base.CommonAppContext;
|
||||||
import com.xscm.moduleutil.base.RoomManager;
|
import com.xscm.moduleutil.base.RoomManager;
|
||||||
import com.xscm.moduleutil.bean.XLHBean;
|
import com.xscm.moduleutil.bean.XLHBean;
|
||||||
|
import com.xscm.moduleutil.event.HourlyBean;
|
||||||
import com.xscm.moduleutil.event.MqttBean;
|
import com.xscm.moduleutil.event.MqttBean;
|
||||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||||
import com.xscm.moduleutil.utils.BackgroundManager;
|
import com.xscm.moduleutil.utils.BackgroundManager;
|
||||||
@@ -66,6 +71,7 @@ import org.greenrobot.eventbus.ThreadMode;
|
|||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -410,6 +416,232 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
|||||||
private View currentMqttView = null; // 当前正在播放的MQTT视图
|
private View currentMqttView = null; // 当前正在播放的MQTT视图
|
||||||
private View currentXlhView = null; // 当前正在播放的XLH视图
|
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消息处理
|
/// 礼物特效 - MQTT消息处理
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onMessageReceived(MqttBean mqttBean) {
|
public void onMessageReceived(MqttBean mqttBean) {
|
||||||
|
|||||||
@@ -114,6 +114,8 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
|||||||
// 添加后台状态标记
|
// 添加后台状态标记
|
||||||
private boolean wasInBackground = false;
|
private boolean wasInBackground = false;
|
||||||
|
|
||||||
|
public boolean isMai=false;
|
||||||
|
|
||||||
public void onAppBackground() {
|
public void onAppBackground() {
|
||||||
wasInBackground = true;
|
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 List<RoomPitBean> song_pit_list;
|
||||||
private FriendInfo friend_info;
|
private FriendInfo friend_info;
|
||||||
private GiftXlh gift_cycle;
|
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.BlindBoxBean;
|
||||||
import com.xscm.moduleutil.bean.blindboxwheel.BlindReslutBean;
|
import com.xscm.moduleutil.bean.blindboxwheel.BlindReslutBean;
|
||||||
import com.xscm.moduleutil.bean.blindboxwheel.XlhDrawBean;
|
import com.xscm.moduleutil.bean.blindboxwheel.XlhDrawBean;
|
||||||
import com.xscm.moduleutil.bean.room.AuctionBean;
|
import com.xscm.moduleutil.bean.room.*;
|
||||||
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.zhuangb.ZhuangBanShangChengBean;
|
import com.xscm.moduleutil.bean.zhuangb.ZhuangBanShangChengBean;
|
||||||
import com.xscm.moduleutil.widget.Constants;
|
import com.xscm.moduleutil.widget.Constants;
|
||||||
|
|
||||||
@@ -95,6 +89,9 @@ public interface ApiServer {
|
|||||||
@POST(Constants.LOGIN)
|
@POST(Constants.LOGIN)
|
||||||
Call<BaseModel<List<UserBean>>> login(@Field("user_login") String user_login, @Field("sms_code") String sms_code);
|
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 //手机换绑
|
@FormUrlEncoded //手机换绑
|
||||||
@POST(Constants.MODIFY_MOBILE)
|
@POST(Constants.MODIFY_MOBILE)
|
||||||
Call<BaseModel<String>> mobileView(@Field("mobile") String mobile, @Field("new_mobile") String new_mobile, @Field("sms_code") String sms_code);
|
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.BlindBoxBean;
|
||||||
import com.xscm.moduleutil.bean.blindboxwheel.BlindReslutBean;
|
import com.xscm.moduleutil.bean.blindboxwheel.BlindReslutBean;
|
||||||
import com.xscm.moduleutil.bean.blindboxwheel.XlhDrawBean;
|
import com.xscm.moduleutil.bean.blindboxwheel.XlhDrawBean;
|
||||||
import com.xscm.moduleutil.bean.room.AuctionBean;
|
import com.xscm.moduleutil.bean.room.*;
|
||||||
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.zhuangb.ZhuangBanShangChengBean;
|
import com.xscm.moduleutil.bean.zhuangb.ZhuangBanShangChengBean;
|
||||||
import com.xscm.moduleutil.listener.MessageListenerSingleton;
|
import com.xscm.moduleutil.listener.MessageListenerSingleton;
|
||||||
import com.xscm.moduleutil.utils.SpUtil;
|
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) {
|
public void userLogin(String mobile, String password, BaseObserver<List<UserBean>> observer) {
|
||||||
sApiServer.userLogin(mobile, password).enqueue(new Callback<BaseModel<List<UserBean>>>() {
|
sApiServer.userLogin(mobile, password).enqueue(new Callback<BaseModel<List<UserBean>>>() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ public class MqttConnect {
|
|||||||
// 订阅主题
|
// 订阅主题
|
||||||
public static String shutdown = "";
|
public static String shutdown = "";
|
||||||
public static String update_app = "";
|
public static String update_app = "";
|
||||||
|
public static String qx_hour_ranking = "";
|
||||||
Handler handler = new Handler(Looper.getMainLooper());
|
Handler handler = new Handler(Looper.getMainLooper());
|
||||||
String[] topic;
|
String[] topic;
|
||||||
int[] qos = {1,2,3,0,0,0,0,0,0,0,0,0,0}; // 消息质量
|
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"; // 关机
|
shutdown = "qx_room_topic"; // 关机
|
||||||
update_app = "qx_xunlehui"; // 发送更新APP
|
update_app = "qx_xunlehui"; // 发送更新APP
|
||||||
|
qx_hour_ranking = "qx_hour_ranking";
|
||||||
|
|
||||||
ArrayList<String> topicList = new ArrayList<>();
|
ArrayList<String> topicList = new ArrayList<>();
|
||||||
topicList.add(shutdown);
|
topicList.add(shutdown);
|
||||||
topicList.add(update_app);
|
topicList.add(update_app);
|
||||||
|
topicList.add(qx_hour_ranking);
|
||||||
topic = topicList.toArray(new String[0]);
|
topic = topicList.toArray(new String[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,6 +85,7 @@ public class MqttConnect {
|
|||||||
// sub(topic,qos);
|
// sub(topic,qos);
|
||||||
sub(shutdown);
|
sub(shutdown);
|
||||||
sub(update_app);
|
sub(update_app);
|
||||||
|
sub(qx_hour_ranking);
|
||||||
// uiTip("MQTT连接成功");
|
// uiTip("MQTT连接成功");
|
||||||
}catch (MqttException e){
|
}catch (MqttException e){
|
||||||
// uiTip("MQTT连接失败,准备重连。。。:"+e.getMessage());
|
// uiTip("MQTT连接失败,准备重连。。。:"+e.getMessage());
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import com.hjq.toast.ToastUtils;
|
|||||||
import com.orhanobut.logger.Logger;
|
import com.orhanobut.logger.Logger;
|
||||||
import com.xscm.moduleutil.bean.MqttXlhEnd;
|
import com.xscm.moduleutil.bean.MqttXlhEnd;
|
||||||
import com.xscm.moduleutil.bean.XLHBean;
|
import com.xscm.moduleutil.bean.XLHBean;
|
||||||
|
import com.xscm.moduleutil.event.HourlyBean;
|
||||||
import com.xscm.moduleutil.event.RoomGiftRunable;
|
import com.xscm.moduleutil.event.RoomGiftRunable;
|
||||||
import com.xscm.moduleutil.utils.SpUtil;
|
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.eclipse.paho.client.mqttv3.MqttMessage;
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class MqttInitCallback implements MqttCallback {
|
public class MqttInitCallback implements MqttCallback {
|
||||||
private String Tag = "MqttInitCallback";
|
private String Tag = "MqttInitCallback";
|
||||||
private String HOST;
|
private String HOST;
|
||||||
@@ -58,6 +61,59 @@ public class MqttInitCallback implements MqttCallback {
|
|||||||
} else if (topic.equals("qx_xunlehui")) {
|
} else if (topic.equals("qx_xunlehui")) {
|
||||||
// ToastUtils.show("收到轮盘飘屏");
|
// ToastUtils.show("收到轮盘飘屏");
|
||||||
receiveXlhMessage(messageStr);
|
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) {
|
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 {
|
try {
|
||||||
return EnvironmentEnum.valueOf(envName);
|
return EnvironmentEnum.valueOf(envName);
|
||||||
} catch (IllegalArgumentException e) {
|
} 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)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
@Override
|
@Override
|
||||||
public void subscribeMessages(RoomBeckoningEvent roomBeckoningEvent) {
|
public void subscribeMessages(RoomBeckoningEvent roomBeckoningEvent) {
|
||||||
if (roomId.equals(roomBeckoningEvent.getRoomId())) {
|
if (roomId != null && roomId.equals(roomBeckoningEvent.getRoomId())) {
|
||||||
mCharmView.setVisibility(roomBeckoningEvent.isOpen() ? VISIBLE : INVISIBLE);
|
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 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 ROOM_USER_RECONNECT = "/api/Room/user_reconnect";//用户重连
|
||||||
public static final String USER_ROOM_BACK = "/api/Room/user_in_room_background";//用户在房间内切后台保留数据操作
|
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_ffe5f7">#ffe5f7</color>
|
||||||
<color name="color_ff8acc">#FF8ACC</color>
|
<color name="color_ff8acc">#FF8ACC</color>
|
||||||
<color name="color_45d08c">#45D08C</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_959595">#959595</color>
|
||||||
<color name="color_ff2727">#FF2727</color>
|
<color name="color_ff2727">#FF2727</color>
|
||||||
<!-- 透明度60% -->
|
<!-- 透明度60% -->
|
||||||
|
|||||||
@@ -48,8 +48,10 @@ import com.blankj.utilcode.util.ThreadUtils
|
|||||||
import com.blankj.utilcode.util.TimeUtils
|
import com.blankj.utilcode.util.TimeUtils
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
import com.example.moduleroom.R
|
import com.example.moduleroom.R
|
||||||
|
|
||||||
import com.example.moduleroom.contacts.RoomContacts
|
import com.example.moduleroom.contacts.RoomContacts
|
||||||
import com.example.moduleroom.databinding.ActivityRoomBinding
|
import com.example.moduleroom.databinding.ActivityRoomBinding
|
||||||
|
|
||||||
import com.example.moduleroom.dialog.ExitRoomBottomSheet
|
import com.example.moduleroom.dialog.ExitRoomBottomSheet
|
||||||
import com.example.moduleroom.dialog.ExitRoomBottomSheet.OnOptionSelectedListener
|
import com.example.moduleroom.dialog.ExitRoomBottomSheet.OnOptionSelectedListener
|
||||||
import com.example.moduleroom.dialog.FriendsDialogFragment
|
import com.example.moduleroom.dialog.FriendsDialogFragment
|
||||||
@@ -677,7 +679,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private val imSdkListener = object : V2TIMSDKListener() {
|
private val imSdkListener = object : V2TIMSDKListener() {
|
||||||
override fun onConnecting() {}
|
override fun onConnecting() {}
|
||||||
|
|
||||||
@@ -970,6 +971,12 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
newDialog.show(fm, "TourClubDialogFragment")
|
newDialog.show(fm, "TourClubDialogFragment")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mBinding!!.clXsb.visibility = View.GONE
|
||||||
|
mBinding!!.tvXlh.setOnClickListener { view ->
|
||||||
|
val fragment = HourlyChartDialog.newInstance()
|
||||||
|
fragment.show(supportFragmentManager, "HourlyChartDialog")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun onGiftGiveProgressClcik() {
|
private fun onGiftGiveProgressClcik() {
|
||||||
@@ -1411,12 +1418,13 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
// ToastUtils.showShort("点击了房间,事件穿透");
|
// ToastUtils.showShort("点击了房间,事件穿透");
|
||||||
}
|
}
|
||||||
|
|
||||||
mBinding!!.roomTop.clXsb.setOnClickListener {
|
// mBinding!!.clXsb.setOnClickListener {
|
||||||
val fragment = HourlyChartDialog.newInstance()
|
// val fragment = HourlyChartDialog.newInstance()
|
||||||
if (fragment != null) {
|
// fragment.show(supportFragmentManager,"HourlyChartDialog")
|
||||||
addActiveDialogFragment(fragment) // 添加到管理列表
|
// if (fragment != null) {
|
||||||
}
|
// addActiveDialogFragment(fragment) // 添加到管理列表
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2959,12 +2967,14 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
isSwith = false
|
isSwith = false
|
||||||
AgoraManager.getInstance(this).muteLocalAudioStream(false)
|
AgoraManager.getInstance(this).muteLocalAudioStream(false)
|
||||||
AgoraManager.getInstance(this).ClientRole(true)
|
AgoraManager.getInstance(this).ClientRole(true)
|
||||||
|
CommonAppContext.getInstance().isMai = true
|
||||||
} else {
|
} else {
|
||||||
mBinding!!.ivMic.setImageResource(com.xscm.moduleutil.R.mipmap.room_microphone_off)
|
mBinding!!.ivMic.setImageResource(com.xscm.moduleutil.R.mipmap.room_microphone_off)
|
||||||
AgoraManager.getInstance(this)
|
AgoraManager.getInstance(this)
|
||||||
.setLocalAudioEnabled(false, SpUtil.getUserId().toString() + "")
|
.setLocalAudioEnabled(false, SpUtil.getUserId().toString() + "")
|
||||||
isSwith = true
|
isSwith = true
|
||||||
isMute(1)
|
isMute(1)
|
||||||
|
CommonAppContext.getInstance().isMai = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3389,10 +3399,14 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
mBinding!!.xlhRk.visibility = View.INVISIBLE
|
mBinding!!.xlhRk.visibility = View.INVISIBLE
|
||||||
releaseCountDownTimer1()
|
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() {
|
protected fun tzblChanged() {
|
||||||
// mBinding.dhv9.updateTzbl(SpUtil.getTzbl(roomId));
|
// mBinding.dhv9.updateTzbl(SpUtil.getTzbl(roomId));
|
||||||
|
|
||||||
@@ -3674,7 +3688,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
// customMusicFloatingView.initView();
|
// customMusicFloatingView.initView();
|
||||||
customMusicFloatingView!!.show()
|
customMusicFloatingView!!.show()
|
||||||
// 等待 View 创建完成后才绑定点击事件
|
// 等待 View 创建完成后才绑定点击事件
|
||||||
ViewUtils.waitUntilViewReady(musicWindowControl!!,
|
ViewUtils.waitUntilViewReady(
|
||||||
|
musicWindowControl!!,
|
||||||
OnViewCreatedListener { view: View? ->
|
OnViewCreatedListener { view: View? ->
|
||||||
customMusicFloatingView!!.initView() // 这里 fxControl.getView() 不再为 null
|
customMusicFloatingView!!.initView() // 这里 fxControl.getView() 不再为 null
|
||||||
customMusicFloatingView!!.updatePlayState(false)
|
customMusicFloatingView!!.updatePlayState(false)
|
||||||
@@ -3692,15 +3707,20 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
CommonAppContext.getInstance().isRoomJoininj = false
|
CommonAppContext.getInstance().isRoomJoininj = false
|
||||||
// 当Activity恢复时,重置标记
|
// 当Activity恢复时,重置标记
|
||||||
userLeaving = true
|
userLeaving = true
|
||||||
RetrofitClient.getInstance().roomUserReconnect(CommonAppContext.getInstance().playId)
|
// RetrofitClient.getInstance().roomUserReconnect(CommonAppContext.getInstance().playId)//重连腾讯IM
|
||||||
if(CommonAppContext.getInstance().onConnectFailed){//判断是否有有过断开腾讯IM
|
// if(CommonAppContext.getInstance().onConnectFailed){//判断是否有有过断开腾讯IM
|
||||||
CommonAppContext.getInstance().onConnectFailed=false
|
// CommonAppContext.getInstance().onConnectFailed=false
|
||||||
if (CommonAppContext.getInstance().playId!=null && !CommonAppContext.getInstance().playId.isEmpty()) { //判断是否有roomId
|
// if (CommonAppContext.getInstance().playId!=null && !CommonAppContext.getInstance().playId.isEmpty()) { //判断是否有roomId
|
||||||
LogUtils.e("RoomActivity", "onResume playId:"+CommonAppContext.getInstance().playId)
|
// LogUtils.e("RoomActivity", "onResume playId:"+CommonAppContext.getInstance().playId)
|
||||||
MvpPre!!.postRoomInfo(CommonAppContext.getInstance().playId)//当有过断开,然后重新连接
|
// MvpPre!!.postRoomInfo(CommonAppContext.getInstance().playId)//当有过断开,然后重新连接
|
||||||
LogUtils.e("RoomActivity", "onResume playId:"+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()
|
AgoraManager.stopMuisc()
|
||||||
|
if (!CommonAppContext.getInstance().isMai) {
|
||||||
initializeAudio()
|
initializeAudio()
|
||||||
|
}
|
||||||
|
|
||||||
if (mRoomInfoResp!!.room_info.label_id == "2" || mRoomInfoResp!!.room_info.type_id == "7") {
|
if (mRoomInfoResp!!.room_info.label_id == "2" || mRoomInfoResp!!.room_info.type_id == "7") {
|
||||||
mBinding!!.rlMore.visibility = View.GONE
|
mBinding!!.rlMore.visibility = View.GONE
|
||||||
@@ -3979,6 +4001,12 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
mBinding!!.rlMore.visibility = View.GONE
|
mBinding!!.rlMore.visibility = View.GONE
|
||||||
mBinding!!.rlMisc.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() {
|
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.IPresenter;
|
||||||
import com.xscm.moduleutil.activity.IView;
|
import com.xscm.moduleutil.activity.IView;
|
||||||
|
import com.xscm.moduleutil.bean.room.RoomHourBean;
|
||||||
|
|
||||||
public class HourlyChartContacts {
|
public class HourlyChartContacts {
|
||||||
public interface View extends IView<Activity> {
|
public interface View extends IView<Activity> {
|
||||||
|
void getRoomHourRanking(RoomHourBean roomHourBean);
|
||||||
|
|
||||||
|
void findView();
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IRoomPre extends IPresenter {
|
public interface IRoomPre extends IPresenter {
|
||||||
|
void getRoomHourRanking(String page,String page_limit);// 房间小时榜
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,37 @@
|
|||||||
package com.example.moduleroom.dialog;
|
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.R;
|
||||||
|
import com.example.moduleroom.adapter.RoomHourlyAdapter;
|
||||||
import com.example.moduleroom.contacts.HourlyChartContacts;
|
import com.example.moduleroom.contacts.HourlyChartContacts;
|
||||||
import com.example.moduleroom.databinding.DialogHourlyChartFragmentBinding;
|
import com.example.moduleroom.databinding.DialogHourlyChartFragmentBinding;
|
||||||
import com.example.moduleroom.presenter.HourlyChartPresenter;
|
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.activity.IPresenter;
|
||||||
|
import com.xscm.moduleutil.adapter.CirleListAdapter;
|
||||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
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
|
*@author qx
|
||||||
*@data 2025/9/29
|
*@data 2025/9/29
|
||||||
*@description:小时榜
|
*@description:小时榜
|
||||||
*/
|
*/
|
||||||
public class HourlyChartDialog extends BaseMvpDialogFragment<HourlyChartPresenter, DialogHourlyChartFragmentBinding> implements HourlyChartContacts.View {
|
public class HourlyChartDialog extends BaseMvpDialogFragment<HourlyChartPresenter, DialogHourlyChartFragmentBinding> implements HourlyChartContacts.View {
|
||||||
|
private int page;
|
||||||
|
|
||||||
|
private RoomHourlyAdapter roomHourlyAdapter;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected HourlyChartPresenter bindPresenter() {
|
protected HourlyChartPresenter bindPresenter() {
|
||||||
return new HourlyChartPresenter( this, getActivity());
|
return new HourlyChartPresenter( this, getActivity());
|
||||||
@@ -27,14 +47,98 @@ public class HourlyChartDialog extends BaseMvpDialogFragment<HourlyChartPresente
|
|||||||
protected void initData() {
|
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
|
@Override
|
||||||
protected void initView() {
|
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
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
return R.layout.dialog_hourly_chart_fragment;
|
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.BidListContacts;
|
||||||
import com.example.moduleroom.contacts.HourlyChartContacts;
|
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 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{
|
public class HourlyChartPresenter extends BasePresenter<HourlyChartContacts.View> implements HourlyChartContacts.IRoomPre{
|
||||||
|
|
||||||
|
HourlyChartContacts.View mView;
|
||||||
public HourlyChartPresenter(HourlyChartContacts.View view, Context context) {
|
public HourlyChartPresenter(HourlyChartContacts.View view, Context context) {
|
||||||
super(view, 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();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,11 +34,11 @@
|
|||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:background="@color/color_40000000"
|
android:background="@color/color_40000000"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"/>
|
||||||
android:visibility="gone"/>
|
|
||||||
|
|
||||||
|
|
||||||
<include
|
<include
|
||||||
@@ -408,8 +408,6 @@
|
|||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/cl_first_charge"
|
android:id="@+id/cl_first_charge"
|
||||||
android:layout_width="@dimen/dp_98"
|
android:layout_width="@dimen/dp_98"
|
||||||
@@ -468,10 +466,10 @@
|
|||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
android:layout_marginBottom="@dimen/dp_14"
|
android:layout_marginBottom="@dimen/dp_14"
|
||||||
android:src="@mipmap/room_sound_effects"
|
android:src="@mipmap/room_sound_effects"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/iv_wheat_feeding"
|
app:layout_constraintBottom_toTopOf="@+id/iv_wheat_feeding"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
tools:visibility="visible"
|
tools:visibility="visible"/>
|
||||||
android:visibility="gone"/>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_wheat_feeding"
|
android:id="@+id/iv_wheat_feeding"
|
||||||
@@ -487,22 +485,18 @@
|
|||||||
<!--https://tmd.xscmmidi.site/data/avatar/head_pic.png-->
|
<!--https://tmd.xscmmidi.site/data/avatar/head_pic.png-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.DropViewRoom
|
<com.xscm.moduleutil.widget.DropViewRoom
|
||||||
android:id="@+id/xlh_rk"
|
android:id="@+id/xlh_rk"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="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_marginStart="@dimen/dp_10"
|
||||||
|
android:layout_marginBottom="@dimen/dp_100"
|
||||||
|
android:background="@color/transparent"
|
||||||
android:gravity="center_vertical|center"
|
android:gravity="center_vertical|center"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
android:background="@color/transparent"
|
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:visibility="visible">
|
tools:visibility="visible">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -518,10 +512,40 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/dp_18"
|
android:layout_height="@dimen/dp_18"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
tools:text="倒计时:12:12"
|
|
||||||
android:textColor="#FFEBBD"
|
android:textColor="#FFEBBD"
|
||||||
android:textSize="@dimen/sp_12"
|
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>
|
</com.xscm.moduleutil.widget.DropViewRoom>
|
||||||
@@ -550,8 +574,8 @@
|
|||||||
android:layout_gravity="end|bottom"
|
android:layout_gravity="end|bottom"
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
android:layout_marginBottom="@dimen/dp_5"
|
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>
|
</com.xscm.moduleutil.widget.floatingView.Floa>
|
||||||
|
|
||||||
|
|||||||
@@ -6,19 +6,39 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="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
|
<ImageView
|
||||||
android:id="@+id/im_bj"
|
android:id="@+id/im_bj"
|
||||||
android:layout_width="@dimen/dp_256"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_281"
|
android:layout_height="@dimen/dp_281"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:src="@mipmap/hourly_top_bj"
|
android:src="@mipmap/hourly_top_bj"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"/>
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tv_hourly_djs"
|
||||||
android:layout_width="@dimen/dp_150"
|
android:layout_width="@dimen/dp_150"
|
||||||
android:layout_height="@dimen/dp_23"
|
android:layout_height="@dimen/dp_23"
|
||||||
app:layout_constraintStart_toStartOf="@+id/im_bj"
|
app:layout_constraintStart_toStartOf="@+id/im_bj"
|
||||||
@@ -29,14 +49,15 @@
|
|||||||
android:text="榜单时间 10:00-10:59"
|
android:text="榜单时间 10:00-10:59"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="@color/color_FFFFFF99"
|
android:textColor="@color/color_FFFFFF99"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"/>
|
||||||
/>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/im_hourly_wf"
|
||||||
android:layout_width="@dimen/dp_24"
|
android:layout_width="@dimen/dp_24"
|
||||||
android:layout_height="@dimen/dp_24"
|
android:layout_height="@dimen/dp_24"
|
||||||
android:src="@mipmap/hourly_wh"
|
android:src="@mipmap/hourly_wh"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
|
android:layout_marginEnd="@dimen/dp_10"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
android:layout_marginTop="@dimen/dp_40"/>
|
android:layout_marginTop="@dimen/dp_40"/>
|
||||||
@@ -44,23 +65,25 @@
|
|||||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||||
android:id="@+id/smart_refresh_layout"
|
android:id="@+id/smart_refresh_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
app:srlEnableLoadMore="true"
|
app:srlEnableLoadMore="true"
|
||||||
app:srlEnableRefresh="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_constraintTop_toBottomOf="@+id/im_bj"
|
||||||
app:layout_constraintEnd_toEndOf="parent">
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recycler_view"
|
android:id="@+id/recycler_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:paddingTop="@dimen/dp_12"
|
android:paddingTop="@dimen/dp_12"
|
||||||
tools:listitem="@layout/item_hourly"
|
tools:listitem="@layout/item_hourly"
|
||||||
android:paddingBottom="@dimen/dp_12"/>
|
android:paddingBottom="@dimen/dp_12"/>
|
||||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?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_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_88"
|
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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:background="#32057F"
|
android:background="#430C93"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<com.makeramen.roundedimageview.RoundedImageView
|
<com.makeramen.roundedimageview.RoundedImageView
|
||||||
@@ -25,6 +28,9 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:layout_marginStart="@dimen/dp_7"
|
android:layout_marginStart="@dimen/dp_7"
|
||||||
|
android:textColor="#A6A77E"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
android:gravity="center"
|
||||||
android:background="@mipmap/hourly_num"/>
|
android:background="@mipmap/hourly_num"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -36,7 +42,6 @@
|
|||||||
android:background="@mipmap/hourly_d"/>
|
android:background="@mipmap/hourly_d"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/im_xlh"
|
android:id="@+id/im_xlh"
|
||||||
android:layout_width="@dimen/dp_44"
|
android:layout_width="@dimen/dp_44"
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/btn_ranking"
|
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_height="@dimen/dp_22"
|
||||||
android:layout_below="@id/group_1"
|
android:layout_below="@id/group_1"
|
||||||
android:layout_marginStart="@dimen/dp_16"
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/btn_notice"
|
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_height="@dimen/dp_22"
|
||||||
android:layout_alignTop="@id/btn_ranking"
|
android:layout_alignTop="@id/btn_ranking"
|
||||||
android:layout_marginStart="@dimen/dp_8"
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/rl"
|
android:id="@+id/rl"
|
||||||
android:layout_width="@dimen/dp_60"
|
android:layout_width="@dimen/dp_80"
|
||||||
android:layout_height="@dimen/dp_22"
|
android:layout_height="@dimen/dp_22"
|
||||||
android:layout_alignTop="@id/btn_notice"
|
android:layout_alignTop="@id/btn_notice"
|
||||||
android:layout_marginStart="@dimen/dp_8"
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
@@ -257,42 +257,42 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||||
android:id="@+id/cl_xsb"
|
<!-- android:id="@+id/cl_xsb"-->
|
||||||
android:layout_width="@dimen/dp_60"
|
<!-- android:layout_width="@dimen/dp_60"-->
|
||||||
android:layout_height="@dimen/dp_25"
|
<!-- android:layout_height="@dimen/dp_25"-->
|
||||||
android:layout_marginStart="@dimen/dp_8"
|
<!-- android:layout_marginStart="@dimen/dp_8"-->
|
||||||
android:layout_alignParentEnd="true"
|
<!-- android:layout_alignParentEnd="true"-->
|
||||||
android:layout_alignTop="@id/btn_notice"
|
<!-- android:layout_alignTop="@id/btn_notice"-->
|
||||||
tools:visibility="visible">
|
<!-- tools:visibility="visible">-->
|
||||||
|
|
||||||
<ImageView
|
<!-- <ImageView-->
|
||||||
android:id="@+id/iv_first_charge"
|
<!-- android:id="@+id/iv_first_charge"-->
|
||||||
android:layout_width="match_parent"
|
<!-- android:layout_width="match_parent"-->
|
||||||
android:layout_height="match_parent"
|
<!-- android:layout_height="match_parent"-->
|
||||||
android:scaleType="fitCenter"
|
<!-- android:scaleType="fitCenter"-->
|
||||||
android:src="@mipmap/room_xsb"
|
<!-- android:src="@mipmap/room_xsb"-->
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<!-- <TextView-->
|
||||||
android:id="@+id/tv_first"
|
<!-- android:id="@+id/tv_first"-->
|
||||||
android:layout_width="wrap_content"
|
<!-- android:layout_width="wrap_content"-->
|
||||||
android:layout_height="wrap_content"
|
<!-- android:layout_height="wrap_content"-->
|
||||||
android:textColor="#FFFFFF"
|
<!-- android:textColor="#FFFFFF"-->
|
||||||
android:paddingEnd="@dimen/dp_2"
|
<!-- android:paddingEnd="@dimen/dp_2"-->
|
||||||
android:textSize="11sp"
|
<!-- android:textSize="11sp"-->
|
||||||
android:gravity="center"
|
<!-- android:gravity="center"-->
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||||
android:text="小时榜" />
|
<!-- android:text="小时榜" />-->
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,64 +1,153 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?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_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_marginStart="@dimen/dp_16"
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
|
<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
|
<TextView
|
||||||
android:id="@+id/tv_name"
|
android:id="@+id/tv_amount_value"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/dp_20"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
android:textSize="@dimen/sp_14"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
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:textSize="@dimen/sp_14"
|
||||||
android:textColor="@color/color_FF333333"
|
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
|
<TextView
|
||||||
android:id="@+id/tv_time"
|
android:id="@+id/tv_time"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/dp_17"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_name"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
android:textColor="@color/color_FF999999"
|
android:textColor="@color/color_FF999999"
|
||||||
tools:text="2025-5-27 16:43:09"
|
android:layout_marginTop="@dimen/dp_7"
|
||||||
/>
|
app:layout_constraintTop_toBottomOf="@id/tv_expected"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/tv_expected"
|
||||||
<TextView
|
tools:text="2024.12.14 11:21:45"/>
|
||||||
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"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
<!-- 状态 -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_status"
|
android:id="@+id/tv_status"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/dp_24"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:textSize="@dimen/sp_12"
|
||||||
|
android:textColor="#0DFFB9"
|
||||||
|
android:layout_marginEnd="@dimen/dp_13"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:textSize="@dimen/sp_16"
|
app:layout_constraintTop_toTopOf="@+id/tv_time"
|
||||||
android:textColor="@color/color_ff2727"
|
tools:text="待处理"/>
|
||||||
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>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||