1.添加巡乐会房间展示
This commit is contained in:
@@ -113,7 +113,7 @@ public class RealNameActivity extends BaseMvpActivity<RealNamePresenter, Activit
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
Log.d("@@@", "刷脸失败!");
|
Log.d("@@@", "刷脸失败!");
|
||||||
queren1();
|
// queren1();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//刷脸结束后,及时释放资源
|
//刷脸结束后,及时释放资源
|
||||||
@@ -127,7 +127,7 @@ public class RealNameActivity extends BaseMvpActivity<RealNamePresenter, Activit
|
|||||||
Log.d("@@@", "刷脸失败!");
|
Log.d("@@@", "刷脸失败!");
|
||||||
//刷脸结束后,及时释放资源
|
//刷脸结束后,及时释放资源
|
||||||
WbCloudFaceVerifySdk.getInstance().release();
|
WbCloudFaceVerifySdk.getInstance().release();
|
||||||
queren1();
|
// queren1();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -135,7 +135,8 @@ public class RealNameActivity extends BaseMvpActivity<RealNamePresenter, Activit
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendCodeSuccess() {
|
public void sendCodeSuccess() {
|
||||||
queren();
|
// queren();
|
||||||
|
finish();
|
||||||
}
|
}
|
||||||
private void queren() {
|
private void queren() {
|
||||||
// 创建并显示确认对话框
|
// 创建并显示确认对话框
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ isBuildModule=false
|
|||||||
#org.gradle.deamon=false
|
#org.gradle.deamon=false
|
||||||
android.injected.testOnly=false
|
android.injected.testOnly=false
|
||||||
|
|
||||||
APP_VERSION_NAME=1.0.6
|
APP_VERSION_NAME=1.1.0
|
||||||
APP_VERSION_CODE=159
|
APP_VERSION_CODE=163
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ import com.xscm.moduleutil.listener.MessageListenerSingleton;
|
|||||||
import com.xscm.moduleutil.rtc.AgoraManager;
|
import com.xscm.moduleutil.rtc.AgoraManager;
|
||||||
import com.xscm.moduleutil.service.MqttConnect;
|
import com.xscm.moduleutil.service.MqttConnect;
|
||||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||||
|
import com.xscm.moduleutil.utils.CrashHandler;
|
||||||
import com.xscm.moduleutil.utils.SpUtil;
|
import com.xscm.moduleutil.utils.SpUtil;
|
||||||
import com.xscm.moduleutil.utils.UtilConfig;
|
import com.xscm.moduleutil.utils.UtilConfig;
|
||||||
import com.xscm.moduleutil.utils.config.EnvironmentEnum;
|
import com.xscm.moduleutil.utils.config.EnvironmentEnum;
|
||||||
@@ -99,6 +100,8 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
|||||||
|
|
||||||
public boolean isShowAg;
|
public boolean isShowAg;
|
||||||
|
|
||||||
|
public boolean isRoomJoininj=false;
|
||||||
|
|
||||||
public String playCover;
|
public String playCover;
|
||||||
public boolean showSelf;//盲盒是否能送自己
|
public boolean showSelf;//盲盒是否能送自己
|
||||||
public String playName;
|
public String playName;
|
||||||
@@ -143,6 +146,8 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
|||||||
startListeningUnreadMessageCount();
|
startListeningUnreadMessageCount();
|
||||||
// 全局设置字体不缩放
|
// 全局设置字体不缩放
|
||||||
adjustFontScale(getResources().getConfiguration());
|
adjustFontScale(getResources().getConfiguration());
|
||||||
|
CrashHandler.init(this);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,6 +221,67 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
|||||||
CommonAppContext.getInstance().setUnreadCountEvent(event);
|
CommonAppContext.getInstance().setUnreadCountEvent(event);
|
||||||
EventBus.getDefault().post(event);
|
EventBus.getDefault().post(event);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 检查网络是否可用
|
||||||
|
* @return true表示网络可用,false表示网络不可用
|
||||||
|
*/
|
||||||
|
public boolean isNetworkAvailable() {
|
||||||
|
try {
|
||||||
|
// 获取网络连接管理器
|
||||||
|
android.net.ConnectivityManager connectivityManager =
|
||||||
|
(android.net.ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||||
|
|
||||||
|
if (connectivityManager != null) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
|
// Android 6.0及以上版本
|
||||||
|
android.net.Network network = connectivityManager.getActiveNetwork();
|
||||||
|
if (network != null) {
|
||||||
|
android.net.NetworkCapabilities capabilities =
|
||||||
|
connectivityManager.getNetworkCapabilities(network);
|
||||||
|
if (capabilities != null) {
|
||||||
|
// 检查是否有网络连接并且可以访问互联网
|
||||||
|
return capabilities.hasCapability(android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET) &&
|
||||||
|
capabilities.hasCapability(android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Android 6.0以下版本
|
||||||
|
android.net.NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
|
||||||
|
return activeNetworkInfo != null && activeNetworkInfo.isConnected();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
LogUtils.e("Network availability check failed: " + e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查网络是否可用(简化版本)
|
||||||
|
* @return true表示网络可用,false表示网络不可用
|
||||||
|
*/
|
||||||
|
public boolean isNetworkConnected() {
|
||||||
|
try {
|
||||||
|
android.net.ConnectivityManager connectivityManager =
|
||||||
|
(android.net.ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||||
|
|
||||||
|
if (connectivityManager != null) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
|
android.net.Network network = connectivityManager.getActiveNetwork();
|
||||||
|
return network != null;
|
||||||
|
} else {
|
||||||
|
android.net.NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
|
||||||
|
return activeNetworkInfo != null && activeNetworkInfo.isConnected();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
LogUtils.e("Network connection check failed: " + e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 优化内存设置
|
* 优化内存设置
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -110,7 +110,10 @@ public class RoomManager {
|
|||||||
public void fetchRoomDataAndEnter(Context context, String roomId, String password) {
|
public void fetchRoomDataAndEnter(Context context, String roomId, String password) {
|
||||||
// 显示加载提示
|
// 显示加载提示
|
||||||
// 这里可以根据需要添加加载对话框
|
// 这里可以根据需要添加加载对话框
|
||||||
|
if (CommonAppContext.getInstance().isRoomJoininj){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
CommonAppContext.getInstance().isRoomJoininj=true;
|
||||||
// 检查是否有有效的缓存数据
|
// 检查是否有有效的缓存数据
|
||||||
// RoomInfoResp roomInfo = getCachedRoomData(roomId);
|
// RoomInfoResp roomInfo = getCachedRoomData(roomId);
|
||||||
// 检查是否是当前房间且用户在线
|
// 检查是否是当前房间且用户在线
|
||||||
@@ -119,6 +122,7 @@ public class RoomManager {
|
|||||||
fetchAndJoinRoom(context, roomId, password);
|
fetchAndJoinRoom(context, roomId, password);
|
||||||
} else {
|
} else {
|
||||||
if (!CommonAppContext.getInstance().playId.equals(roomId)) {
|
if (!CommonAppContext.getInstance().playId.equals(roomId)) {
|
||||||
|
MessageListenerSingleton.getInstance().joinGroup(roomId);
|
||||||
exitRoom(CommonAppContext.getInstance().playId);
|
exitRoom(CommonAppContext.getInstance().playId);
|
||||||
} else if (CommonAppContext.getInstance().lable_id.equals("6")) {
|
} else if (CommonAppContext.getInstance().lable_id.equals("6")) {
|
||||||
upInfo(context, roomId, password, true, null, true);
|
upInfo(context, roomId, password, true, null, true);
|
||||||
@@ -241,7 +245,7 @@ public class RoomManager {
|
|||||||
*/
|
*/
|
||||||
private void fetchAndJoinRoom(Context context, String roomId, String password) {
|
private void fetchAndJoinRoom(Context context, String roomId, String password) {
|
||||||
// 获取房间数据
|
// 获取房间数据
|
||||||
MessageListenerSingleton.getInstance().joinGroup(roomId);
|
|
||||||
// 等待一段时间确保退出完成
|
// 等待一段时间确保退出完成
|
||||||
try {
|
try {
|
||||||
Thread.sleep(300);
|
Thread.sleep(300);
|
||||||
@@ -394,11 +398,11 @@ public class RoomManager {
|
|||||||
// 可以通过检查Agora是否还在房间中,或者通过服务端接口查询用户状态等方式实现
|
// 可以通过检查Agora是否还在房间中,或者通过服务端接口查询用户状态等方式实现
|
||||||
// 目前返回false,需要根据实际需求实现具体逻辑
|
// 目前返回false,需要根据实际需求实现具体逻辑
|
||||||
// boolean isCurrentRoom=isCurrentRoom(roomId);
|
// boolean isCurrentRoom=isCurrentRoom(roomId);
|
||||||
try {
|
// try {
|
||||||
Thread.sleep(300);
|
// Thread.sleep(300);
|
||||||
} catch (InterruptedException e) {
|
// } catch (InterruptedException e) {
|
||||||
Thread.currentThread().interrupt();
|
// Thread.currentThread().interrupt();
|
||||||
}
|
// }
|
||||||
final boolean[] isOnline = {false};
|
final boolean[] isOnline = {false};
|
||||||
RetrofitClient.getInstance().getRoomOnline(roomId, "1", "50", new BaseObserver<RoomOnline>() {
|
RetrofitClient.getInstance().getRoomOnline(roomId, "1", "50", new BaseObserver<RoomOnline>() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.xscm.moduleutil.bean;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
/**
|
||||||
|
*@author qx
|
||||||
|
*@data 2025/9/25
|
||||||
|
*@description: 绑定详情
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BindDetail {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String alipay_name;//支付宝姓名
|
||||||
|
private String alipay_account;//支付宝账户
|
||||||
|
|
||||||
|
private String bank_card_number;//银行卡号
|
||||||
|
|
||||||
|
private String bank_user_name;//姓名
|
||||||
|
private String bank_card;//所属行
|
||||||
|
private String open_bank;//开户行
|
||||||
|
|
||||||
|
}
|
||||||
@@ -26,6 +26,7 @@ public class BlindBoxBean {
|
|||||||
private int is_xlh; ///是否开启巡乐会 0 关闭 1 开启
|
private int is_xlh; ///是否开启巡乐会 0 关闭 1 开启
|
||||||
private Object xlh_data;
|
private Object xlh_data;
|
||||||
private List<GiftBean> gift_list;
|
private List<GiftBean> gift_list;
|
||||||
|
private String end_time;//巡乐会结束时间
|
||||||
|
|
||||||
private GiveGift give_homeowner_gift;//房主礼物
|
private GiveGift give_homeowner_gift;//房主礼物
|
||||||
private GiveGift locking_gift;//锁定礼物
|
private GiveGift locking_gift;//锁定礼物
|
||||||
@@ -95,6 +96,14 @@ public class BlindBoxBean {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Object endTime = map.get("end_time");
|
||||||
|
if (endTime != null) {
|
||||||
|
if (endTime instanceof String){
|
||||||
|
xlhData.setEnd_time(endTime.toString());
|
||||||
|
}else {
|
||||||
|
xlhData.setEnd_time(endTime.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return xlhData;
|
return xlhData;
|
||||||
}
|
}
|
||||||
@@ -118,6 +127,9 @@ public class BlindBoxBean {
|
|||||||
if (jsonObject.has("status")) {
|
if (jsonObject.has("status")) {
|
||||||
xlhData.setStatus(jsonObject.get("status").getAsInt());
|
xlhData.setStatus(jsonObject.get("status").getAsInt());
|
||||||
}
|
}
|
||||||
|
if (jsonObject.has("end_time")){
|
||||||
|
xlhData.setEnd_time(jsonObject.get("end_time").getAsString());
|
||||||
|
}
|
||||||
|
|
||||||
return xlhData;
|
return xlhData;
|
||||||
}
|
}
|
||||||
@@ -130,6 +142,7 @@ public class BlindBoxBean {
|
|||||||
private String start_num;//巡乐会开启需要达到的次数
|
private String start_num;//巡乐会开启需要达到的次数
|
||||||
private int current_num;//当前已抽奖次数
|
private int current_num;//当前已抽奖次数
|
||||||
private int status;
|
private int status;
|
||||||
|
private String end_time;
|
||||||
}
|
}
|
||||||
@Data
|
@Data
|
||||||
public static class GiveGift {
|
public static class GiveGift {
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ public class RoomInfoResp implements Serializable {
|
|||||||
private PkRoomInfo pk_info;
|
private PkRoomInfo pk_info;
|
||||||
private List<RoomPitBean> song_pit_list;
|
private List<RoomPitBean> song_pit_list;
|
||||||
private FriendInfo friend_info;
|
private FriendInfo friend_info;
|
||||||
|
private GiftXlh gift_cycle;
|
||||||
|
|
||||||
|
|
||||||
//弹出麦位操作弹出
|
//弹出麦位操作弹出
|
||||||
@@ -114,4 +115,18 @@ public class RoomInfoResp implements Serializable {
|
|||||||
public boolean isFreedomMode() {
|
public boolean isFreedomMode() {
|
||||||
return "1".equals(room_info.getWheat());
|
return "1".equals(room_info.getWheat());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class GiftXlh implements Serializable{
|
||||||
|
private XlhInfo xlh_info ;
|
||||||
|
}
|
||||||
|
@Data
|
||||||
|
public class XlhInfo implements Serializable{
|
||||||
|
private String activities_name;
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
private String xlh_status;
|
||||||
|
|
||||||
|
private String end_time;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -453,17 +453,17 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
|
|
||||||
if (icon > 0 && box_price > 0) {
|
if (icon > 0 && box_price > 0) {
|
||||||
if (type == 10) {
|
if (type == 10) {
|
||||||
updateBackground(mBinding.mirroeSky.llOne, icon > box_price, drawableX, drawableW);
|
updateBackground(mBinding.mirroeSky.llOne, icon >= box_price, drawableX, drawableW);
|
||||||
updateBackground(mBinding.mirroeSky.llTen, icon > box_price * 6, drawableX, drawableW);
|
updateBackground(mBinding.mirroeSky.llTen, icon >= box_price * 6, drawableX, drawableW);
|
||||||
updateBackground(mBinding.mirroeSky.llHundred, icon > box_price * 9, drawableX, drawableW);
|
updateBackground(mBinding.mirroeSky.llHundred, icon >= box_price * 9, drawableX, drawableW);
|
||||||
} else if (type == 11) {
|
} else if (type == 11) {
|
||||||
updateBackground(mBinding.cityTime.llOne, icon > box_price, drawableX, drawableW);
|
updateBackground(mBinding.cityTime.llOne, icon >= box_price, drawableX, drawableW);
|
||||||
updateBackground(mBinding.cityTime.llTen, icon > box_price * 6, drawableX, drawableW);
|
updateBackground(mBinding.cityTime.llTen, icon >= box_price * 6, drawableX, drawableW);
|
||||||
updateBackground(mBinding.cityTime.llHundred, icon > box_price * 9, drawableX, drawableW);
|
updateBackground(mBinding.cityTime.llHundred, icon > box_price * 9, drawableX, drawableW);
|
||||||
} else if (type == 12) {
|
} else if (type == 12) {
|
||||||
updateBackground(mBinding.pinnacleTime.llOne, icon > box_price, drawableX, drawableW);
|
updateBackground(mBinding.pinnacleTime.llOne, icon >= box_price, drawableX, drawableW);
|
||||||
updateBackground(mBinding.pinnacleTime.llTen, icon > box_price * 6, drawableX, drawableW);
|
updateBackground(mBinding.pinnacleTime.llTen, icon >= box_price * 6, drawableX, drawableW);
|
||||||
updateBackground(mBinding.pinnacleTime.llHundred, icon > box_price * 9, drawableX, drawableW);
|
updateBackground(mBinding.pinnacleTime.llHundred, icon >= box_price * 9, drawableX, drawableW);
|
||||||
} else {
|
} else {
|
||||||
// 兜底处理:未知 type 时全部设为不可点击 + 默认背景
|
// 兜底处理:未知 type 时全部设为不可点击 + 默认背景
|
||||||
setAllBackgroundToDefault(drawableW);
|
setAllBackgroundToDefault(drawableW);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.xscm.moduleutil.bean.AlbumBean;
|
|||||||
import com.xscm.moduleutil.bean.AppPay;
|
import com.xscm.moduleutil.bean.AppPay;
|
||||||
import com.xscm.moduleutil.bean.AppUpdateModel;
|
import com.xscm.moduleutil.bean.AppUpdateModel;
|
||||||
import com.xscm.moduleutil.bean.BannerModel;
|
import com.xscm.moduleutil.bean.BannerModel;
|
||||||
|
import com.xscm.moduleutil.bean.BindDetail;
|
||||||
import com.xscm.moduleutil.bean.BindType;
|
import com.xscm.moduleutil.bean.BindType;
|
||||||
import com.xscm.moduleutil.bean.BlackUserBean;
|
import com.xscm.moduleutil.bean.BlackUserBean;
|
||||||
import com.xscm.moduleutil.bean.CharmRankingResp;
|
import com.xscm.moduleutil.bean.CharmRankingResp;
|
||||||
@@ -165,9 +166,13 @@ public interface ApiServer {
|
|||||||
@GET(Constants.GET_WITHDRAWAL_LIST)
|
@GET(Constants.GET_WITHDRAWAL_LIST)
|
||||||
Observable<BaseModel<List<WithdrawalBean>>> withdrawalList(@Query("page") String page, @Query("page_limit") String page_limit, @Query("search_stime") String search_stime, @Query("search_etime") String search_etime);
|
Observable<BaseModel<List<WithdrawalBean>>> withdrawalList(@Query("page") String page, @Query("page_limit") String page_limit, @Query("search_stime") String search_stime, @Query("search_etime") String search_etime);
|
||||||
|
|
||||||
|
@FormUrlEncoded
|
||||||
|
@POST(Constants.POST_BIND_DETAIL)
|
||||||
|
Call<BaseModel<BindDetail>> bindDetai(@Field("user_id") String user_id, @Field("type") String type);
|
||||||
|
|
||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
@POST(Constants.POST_MESSAGE_LIST)
|
@POST(Constants.POST_MESSAGE_LIST)
|
||||||
Observable<BaseModel<List<NewsMessageList>>> getMessagetitle(@Field("type") String type, @Field("page") String page, @Field("page_limit") String page_limit);
|
Call<BaseModel<List<NewsMessageList>>> getMessagetitle(@Field("type") String type, @Field("page") String page, @Field("page_limit") String page_limit);
|
||||||
|
|
||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
@POST(Constants.POST_ROOM_RANK)
|
@POST(Constants.POST_ROOM_RANK)
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import com.xscm.moduleutil.bean.AlbumBean;
|
|||||||
import com.xscm.moduleutil.bean.AppPay;
|
import com.xscm.moduleutil.bean.AppPay;
|
||||||
import com.xscm.moduleutil.bean.AppUpdateModel;
|
import com.xscm.moduleutil.bean.AppUpdateModel;
|
||||||
import com.xscm.moduleutil.bean.BannerModel;
|
import com.xscm.moduleutil.bean.BannerModel;
|
||||||
|
import com.xscm.moduleutil.bean.BindDetail;
|
||||||
import com.xscm.moduleutil.bean.BindType;
|
import com.xscm.moduleutil.bean.BindType;
|
||||||
import com.xscm.moduleutil.bean.BlackUserBean;
|
import com.xscm.moduleutil.bean.BlackUserBean;
|
||||||
import com.xscm.moduleutil.bean.CharmRankingResp;
|
import com.xscm.moduleutil.bean.CharmRankingResp;
|
||||||
@@ -450,13 +451,51 @@ public class RetrofitClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void getMessagetitle(String type, String page, String page_limit, BaseObserver<List<NewsMessageList>> observer) {
|
public void getMessagetitle(String type, String page, String page_limit, BaseObserver<List<NewsMessageList>> observer) {
|
||||||
sApiServer.getMessagetitle(type, page, page_limit).compose(new DefaultTransformer<>()).subscribe(observer);
|
sApiServer.getMessagetitle(type, page, page_limit).enqueue(new Callback<BaseModel<List<NewsMessageList>>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<BaseModel<List<NewsMessageList>>> call, Response<BaseModel<List<NewsMessageList>>> response) {
|
||||||
|
if (response.code() == 200){
|
||||||
|
BaseModel<List<NewsMessageList>> baseModel = response.body();
|
||||||
|
if (baseModel.getCode()==1){
|
||||||
|
observer.onNext(baseModel.getData());
|
||||||
|
}else {
|
||||||
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<BaseModel<List<NewsMessageList>>> call, Throwable t) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void withdrawalList(String page, String page_limit, String search_stime, String search_etime, BaseObserver<List<WithdrawalBean>> observer) {
|
public void withdrawalList(String page, String page_limit, String search_stime, String search_etime, BaseObserver<List<WithdrawalBean>> observer) {
|
||||||
sApiServer.withdrawalList(page, page_limit, search_stime, search_etime).compose(new DefaultTransformer<>()).subscribe(observer);
|
sApiServer.withdrawalList(page, page_limit, search_stime, search_etime).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void bindDetai(String userId, String type,BaseObserver<BindDetail> observer){
|
||||||
|
sApiServer.bindDetai(userId, type).enqueue(new Callback<BaseModel<BindDetail>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<BaseModel<BindDetail>> call, Response<BaseModel<BindDetail>> response) {
|
||||||
|
if (response.code() == 200){
|
||||||
|
BaseModel<BindDetail> baseModel = response.body();
|
||||||
|
if (baseModel.getCode()==1){
|
||||||
|
observer.onNext(baseModel.getData());
|
||||||
|
}else {
|
||||||
|
observer.onNext(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<BaseModel<BindDetail>> call, Throwable t) {
|
||||||
|
t.printStackTrace();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public void getRoomRank(String roomId, String type, String time_type, String page, String page_limit, BaseObserver<List<CharmRankingResp>> observer) {
|
public void getRoomRank(String roomId, String type, String time_type, String page, String page_limit, BaseObserver<List<CharmRankingResp>> observer) {
|
||||||
// sApiServer.getRoomRank(roomId, type, time_type, page, page_limit).compose(new DefaultTransformer<>()).subscribe(observer);
|
// sApiServer.getRoomRank(roomId, type, time_type, page, page_limit).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||||
sApiServer.getRoomRank(roomId, type, time_type, page, page_limit).enqueue(new Callback<BaseModel<List<CharmRankingResp>>>() {
|
sApiServer.getRoomRank(roomId, type, time_type, page, page_limit).enqueue(new Callback<BaseModel<List<CharmRankingResp>>>() {
|
||||||
@@ -1067,6 +1106,8 @@ public class RetrofitClient {
|
|||||||
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
||||||
if (baseModel.getCode() == 1) {
|
if (baseModel.getCode() == 1) {
|
||||||
observer.onNext(baseModel.getData());
|
observer.onNext(baseModel.getData());
|
||||||
|
}else {
|
||||||
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1086,6 +1127,8 @@ public class RetrofitClient {
|
|||||||
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
||||||
if (baseModel.getCode() == 1) {
|
if (baseModel.getCode() == 1) {
|
||||||
observer.onNext(baseModel.getData());
|
observer.onNext(baseModel.getData());
|
||||||
|
}else {
|
||||||
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1105,6 +1148,8 @@ public class RetrofitClient {
|
|||||||
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
||||||
if (baseModel.getCode() == 1) {
|
if (baseModel.getCode() == 1) {
|
||||||
observer.onNext(baseModel.getData());
|
observer.onNext(baseModel.getData());
|
||||||
|
}else {
|
||||||
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1124,6 +1169,8 @@ public class RetrofitClient {
|
|||||||
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
||||||
if (baseModel.getCode() == 1) {
|
if (baseModel.getCode() == 1) {
|
||||||
observer.onNext(baseModel.getData());
|
observer.onNext(baseModel.getData());
|
||||||
|
}else {
|
||||||
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1700,12 +1747,12 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void roomGetIn(String roomId, String
|
public void roomGetIn(String roomId, String password, BaseObserver<RoomInfoResp> observer) {
|
||||||
password, BaseObserver<RoomInfoResp> observer) {
|
|
||||||
sApiServer.roomGetIn(roomId, password).enqueue(new Callback<BaseModel<RoomInfoResp>>() {
|
sApiServer.roomGetIn(roomId, password).enqueue(new Callback<BaseModel<RoomInfoResp>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<RoomInfoResp>> call, Response<BaseModel<RoomInfoResp>> response) {
|
public void onResponse(Call<BaseModel<RoomInfoResp>> call, Response<BaseModel<RoomInfoResp>> response) {
|
||||||
|
CommonAppContext.getInstance().isRoomJoininj=false;
|
||||||
if (response.code() == 200) {
|
if (response.code() == 200) {
|
||||||
BaseModel<RoomInfoResp> roomInfoRespBaseModel = response.body();
|
BaseModel<RoomInfoResp> roomInfoRespBaseModel = response.body();
|
||||||
if (roomInfoRespBaseModel.getCode() == 1) {
|
if (roomInfoRespBaseModel.getCode() == 1) {
|
||||||
@@ -1718,7 +1765,8 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<RoomInfoResp>> call, Throwable t) {
|
public void onFailure(Call<BaseModel<RoomInfoResp>> call, Throwable t) {
|
||||||
|
MessageListenerSingleton.getInstance().quitGroup(roomId);
|
||||||
|
CommonAppContext.getInstance().isRoomJoininj=false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1846,8 +1894,7 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void appPay(String user_id, String money, String coin, String
|
public void appPay(String user_id, String money, String coin, String type, BaseObserver<AppPay> observer) {
|
||||||
type, BaseObserver<AppPay> observer) {
|
|
||||||
sApiServer.appPay(user_id, money, coin, type).enqueue(new Callback<BaseModel<AppPay>>() {
|
sApiServer.appPay(user_id, money, coin, type).enqueue(new Callback<BaseModel<AppPay>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<AppPay>> call, Response<BaseModel<AppPay>> response) {
|
public void onResponse(Call<BaseModel<AppPay>> call, Response<BaseModel<AppPay>> response) {
|
||||||
@@ -1855,6 +1902,8 @@ public class RetrofitClient {
|
|||||||
BaseModel<AppPay> appPayBaseModel = response.body();
|
BaseModel<AppPay> appPayBaseModel = response.body();
|
||||||
if (appPayBaseModel.getCode() == 1) {
|
if (appPayBaseModel.getCode() == 1) {
|
||||||
observer.onNext(appPayBaseModel.getData());
|
observer.onNext(appPayBaseModel.getData());
|
||||||
|
}else {
|
||||||
|
ToastUtils.showShort(appPayBaseModel.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1904,8 +1953,7 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void bind(String userId, String type, String alipayAccount, String
|
public void bind(String userId, String type, String alipayAccount, String bank_card_number, String bank_card, String open_bank, BaseObserver<String> observer) {
|
||||||
bank_card_number, String bank_card, String open_bank, BaseObserver<String> observer) {
|
|
||||||
sApiServer.bind(userId, type, alipayAccount, bank_card_number, bank_card, open_bank).enqueue(new Callback<BaseModel<String>>() {
|
sApiServer.bind(userId, type, alipayAccount, bank_card_number, bank_card, open_bank).enqueue(new Callback<BaseModel<String>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||||
@@ -3128,8 +3176,7 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void userOnlineStatus(String user_id, String
|
public void userOnlineStatus(String user_id, String roomId, BaseObserver<List<UserOnlineStatusBean>> observer) {
|
||||||
roomId, BaseObserver<List<UserOnlineStatusBean>> observer) {
|
|
||||||
sApiServer.userOnlineStatus(user_id, roomId).enqueue(new Callback<BaseModel<List<UserOnlineStatusBean>>>() {
|
sApiServer.userOnlineStatus(user_id, roomId).enqueue(new Callback<BaseModel<List<UserOnlineStatusBean>>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<List<UserOnlineStatusBean>>> call, Response<BaseModel<List<UserOnlineStatusBean>>> response) {
|
public void onResponse(Call<BaseModel<List<UserOnlineStatusBean>>> call, Response<BaseModel<List<UserOnlineStatusBean>>> response) {
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.xscm.moduleutil.utils;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
|
|
||||||
|
public class CrashHandler implements Thread.UncaughtExceptionHandler {
|
||||||
|
private static CrashHandler instance;
|
||||||
|
private Thread.UncaughtExceptionHandler defaultHandler;
|
||||||
|
|
||||||
|
private CrashHandler(Context context) {
|
||||||
|
defaultHandler = Thread.getDefaultUncaughtExceptionHandler();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void init(Context context) {
|
||||||
|
if (instance == null) {
|
||||||
|
instance = new CrashHandler(context);
|
||||||
|
Thread.setDefaultUncaughtExceptionHandler(instance);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uncaughtException(Thread t, Throwable e) {
|
||||||
|
// 记录崩溃日志
|
||||||
|
Log.e("CrashHandler", "未捕获异常: " + e.getMessage());
|
||||||
|
// 简单处理空指针
|
||||||
|
if (e instanceof NullPointerException) {
|
||||||
|
// 重启应用或跳转错误页
|
||||||
|
restartApp();
|
||||||
|
} else {
|
||||||
|
// 交给系统默认处理
|
||||||
|
defaultHandler.uncaughtException(t, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void restartApp() {
|
||||||
|
// 实现应用重启逻辑
|
||||||
|
ARouter.getInstance().build(ARouteConstants.ME).navigation();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,20 +15,20 @@ public enum EnvironmentEnum {
|
|||||||
"tcp://81.70.45.221",
|
"tcp://81.70.45.221",
|
||||||
"https://md.xscmmidi.site/h5"),
|
"https://md.xscmmidi.site/h5"),
|
||||||
TEST(//测试环境
|
TEST(//测试环境
|
||||||
"http://md.qxmier.com/",
|
"http://tmd.xscmmidi.site/",
|
||||||
"6rdWuz058oq5OahdbFiGEybUcdahd12J83L34Uc7MrPIrxtFG+rXiwDvRcqNvjwbClbbmvMrmxKVkIysFByBsl0Qe9kqd2w8T/nhK5G6eXXlk2V9AjYCieIU+jRnjZBB+Cfechr6rCGJ2aeBARIsXcRPW7wm9WFK9euh5T+v6Pyte68yNaNdcYCll3+U4/uCEog7HygCnMIbAU+kqoPdmn2H+51YOHW+VsnsHd4w1+I3f8Tt0xLIXGM4GWnQueZ5GR46GTWiSYMy8dCIh9SPIMRyC91GosVcfGPMJSdcXqc=",
|
"6rdWuz058oq5OahdbFiGEybUcdahd12J83L34Uc7MrPIrxtFG+rXiwDvRcqNvjwbClbbmvMrmxKVkIysFByBsl0Qe9kqd2w8T/nhK5G6eXXlk2V9AjYCieIU+jRnjZBB+Cfechr6rCGJ2aeBARIsXcRPW7wm9WFK9euh5T+v6Pyte68yNaNdcYCll3+U4/uCEog7HygCnMIbAU+kqoPdmn2H+51YOHW+VsnsHd4w1+I3f8Tt0xLIXGM4GWnQueZ5GR46GTWiSYMy8dCIh9SPIMRyC91GosVcfGPMJSdcXqc=",
|
||||||
"https://oss-cn-hangzhou.aliyuncs.com/",
|
"https://oss-cn-beijing.aliyuncs.com/",
|
||||||
"LTAI5tJ2UYfFNF7K3F4e1siv",
|
"LTAI5tKgrfcFQxH46ZwWYgFW",
|
||||||
"DhpCS82gaigZljYqsWsUWUAZ20dREz",
|
"ZOjTqAJmUL563EKFKySrUwAHtx4hKt",
|
||||||
"qx-yusheng",
|
"midi01",
|
||||||
"https://qx-yusheng.oss-cn-hangzhou.aliyuncs.com/",
|
"https://midi01.oss-cn-beijing.aliyuncs.com/",
|
||||||
"wxc7681513be9f926b",
|
"wxc7681513be9f926b",
|
||||||
1600101474,
|
1600106397,
|
||||||
"05b406b4541e413887d8d2bf9be8642c",
|
"05b406b4541e413887d8d2bf9be8642c",
|
||||||
"tcp://47.120.21.132",
|
"tcp://1.13.181.248",
|
||||||
"https://chatvespa.qxmier.com");
|
"https://chatvespa.qxmier.com");
|
||||||
|
|
||||||
private final String serverUrl;
|
private final String serverUrl;//服务器地址
|
||||||
private final String ALI_AUTH_KEY;//阿里云授权key
|
private final String ALI_AUTH_KEY;//阿里云授权key
|
||||||
|
|
||||||
private final String ossEndPoint;
|
private final String ossEndPoint;
|
||||||
@@ -37,15 +37,15 @@ public enum EnvironmentEnum {
|
|||||||
private final String ossBucketName;
|
private final String ossBucketName;
|
||||||
private final String ossBaseUrl;
|
private final String ossBaseUrl;
|
||||||
|
|
||||||
private final String wxAppId;
|
private final String wxAppId;//微信appId
|
||||||
|
|
||||||
private final int sdkAppId;//腾讯云sdkAppId im
|
private final int sdkAppId;//腾讯云sdkAppId im
|
||||||
|
|
||||||
private final String swSdkAppId;
|
private final String swSdkAppId;//声网sdkAppId
|
||||||
|
|
||||||
private final String mqttUrl;
|
private final String mqttUrl;//MQTT服务器地址
|
||||||
|
|
||||||
private final String H5Url;
|
private final String H5Url;//h5地址
|
||||||
|
|
||||||
EnvironmentEnum(String serverUrl, String ALI_AUTH_KEY, String ossEndPoint, String ossaAcessKeyId,
|
EnvironmentEnum(String serverUrl, String ALI_AUTH_KEY, String ossEndPoint, String ossaAcessKeyId,
|
||||||
String ossAccessKeySecret, String ossBucketName, String ossBaseUrl, String wxAppId,
|
String ossAccessKeySecret, String ossBucketName, String ossBaseUrl, String wxAppId,
|
||||||
|
|||||||
@@ -27,11 +27,11 @@ public class EnvironmentPrefs {
|
|||||||
|
|
||||||
// 获取当前选择的环境,默认为 PRODUCTION
|
// 获取当前选择的环境,默认为 PRODUCTION
|
||||||
public EnvironmentEnum getSelectedEnvironment() {
|
public EnvironmentEnum getSelectedEnvironment() {
|
||||||
String envName = sharedPreferences.getString(KEY_ENV, EnvironmentEnum.PRODUCTION.name());
|
String envName = sharedPreferences.getString(KEY_ENV, EnvironmentEnum.TEST.name());
|
||||||
try {
|
try {
|
||||||
return EnvironmentEnum.valueOf(envName);
|
return EnvironmentEnum.valueOf(envName);
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
return EnvironmentEnum.PRODUCTION; // 出错时默认返回生产环境
|
return EnvironmentEnum.TEST; // 出错时默认返回生产环境
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public class ClearEditText extends AppCompatEditText implements View.OnFocusChan
|
|||||||
//获取EditText的DrawableRight,假如没有设置我们就使用默认的图片
|
//获取EditText的DrawableRight,假如没有设置我们就使用默认的图片
|
||||||
mClearDrawable = getCompoundDrawables()[2];
|
mClearDrawable = getCompoundDrawables()[2];
|
||||||
if (mClearDrawable == null) {
|
if (mClearDrawable == null) {
|
||||||
mClearDrawable = getResources().getDrawable(R.mipmap.common_et_clear_icon);
|
mClearDrawable = getResources().getDrawable(R.mipmap.index_icon_close);
|
||||||
}
|
}
|
||||||
mClearDrawable.setBounds(0, 0, mClearDrawable.getIntrinsicWidth(),
|
mClearDrawable.setBounds(0, 0, mClearDrawable.getIntrinsicWidth(),
|
||||||
mClearDrawable.getIntrinsicHeight());
|
mClearDrawable.getIntrinsicHeight());
|
||||||
|
|||||||
@@ -356,6 +356,7 @@ public class Constants {
|
|||||||
public static final String GET_APP_UPDATE = "/api/Version/get_app_version";//版本更新
|
public static final String GET_APP_UPDATE = "/api/Version/get_app_version";//版本更新
|
||||||
public static final String POST_CLEAR_USER_CHARM = "/api/Room/clear_user_charm";//清除魅力值
|
public static final String POST_CLEAR_USER_CHARM = "/api/Room/clear_user_charm";//清除魅力值
|
||||||
public static final String POST_MESSAGE_LIST = "/api/UserMessage/get_user_message_list";//消息列表
|
public static final String POST_MESSAGE_LIST = "/api/UserMessage/get_user_message_list";//消息列表
|
||||||
|
public static final String POST_BIND_DETAIL = "/api/Bind/bind_detail";//绑定详情
|
||||||
public static final String POST_USER_WALL = "/api/User/user_gift_wall";//礼物墙
|
public static final String POST_USER_WALL = "/api/User/user_gift_wall";//礼物墙
|
||||||
public static final String POST_USER_OLINE_STATUS = "/api/Room/user_online_status";//用户在线状态
|
public static final String POST_USER_OLINE_STATUS = "/api/Room/user_online_status";//用户在线状态
|
||||||
public static final String DELETE_ROOM_HISTORY = "/api/Room/delete_room_history";//删除历史足迹
|
public static final String DELETE_ROOM_HISTORY = "/api/Room/delete_room_history";//删除历史足迹
|
||||||
|
|||||||
@@ -0,0 +1,184 @@
|
|||||||
|
package com.xscm.moduleutil.widget;
|
||||||
|
|
||||||
|
import android.animation.Animator;
|
||||||
|
import android.animation.AnimatorListenerAdapter;
|
||||||
|
import android.animation.ObjectAnimator;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.MotionEvent;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewAnimationUtils;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
|
import com.blankj.utilcode.util.ScreenUtils;
|
||||||
|
|
||||||
|
public class DropViewRoom extends LinearLayout {
|
||||||
|
|
||||||
|
private int rightMargin = 0;
|
||||||
|
private float lastX, lastY;
|
||||||
|
private int screenWidth;
|
||||||
|
|
||||||
|
public DropViewRoom(Context context) {
|
||||||
|
super(context);
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
public DropViewRoom(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
public DropViewRoom(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||||
|
super(context, attrs, defStyleAttr);
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void init() {
|
||||||
|
|
||||||
|
post(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
//设置初始位置
|
||||||
|
int sh = ScreenUtils.getScreenHeight();
|
||||||
|
int sw = ScreenUtils.getScreenWidth()-100;
|
||||||
|
// setBackgroundResource(R.drawable.bg_home_drop_view);
|
||||||
|
int y = (int) (0.5f * sh) - getHeight();
|
||||||
|
int x = sw - getWidth();
|
||||||
|
setTranslationX(x);
|
||||||
|
setTranslationY(y);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
boolean starDrap = false;
|
||||||
|
float X1;
|
||||||
|
float X2;
|
||||||
|
float Y1;
|
||||||
|
float Y2;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onInterceptTouchEvent(MotionEvent event) {
|
||||||
|
if (starDrap) return true;
|
||||||
|
switch (event.getAction()) {
|
||||||
|
case MotionEvent.ACTION_DOWN:
|
||||||
|
X1 = event.getX();
|
||||||
|
Y1 = event.getY();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MotionEvent.ACTION_MOVE:
|
||||||
|
X2 = event.getX();//当手指抬起时,再次获取屏幕位置的X值
|
||||||
|
Y2 = event.getY();//同理
|
||||||
|
Action(X1, X2, Y1, Y2);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
return starDrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
String TAG = "DropView";
|
||||||
|
|
||||||
|
public boolean Action(float X1, float X2, float Y1, float Y2) {
|
||||||
|
float ComparedX = X2 - X1;//第二次的X坐标的位置减去第一次X坐标的位置,代表X坐标上的变化情况
|
||||||
|
float ComparedY = Y2 - Y1;//同理
|
||||||
|
//当X坐标的变化量的绝对值大于Y坐标的变化量的绝对值,以X坐标的变化情况作为判断依据
|
||||||
|
//上下左右的判断,都在一条直线上,但手指的操作不可能划直线,所有选择变化量大的方向上的量
|
||||||
|
//作为判断依据
|
||||||
|
if (Math.abs(ComparedX) > 30 || Math.abs(ComparedY) > 30) {
|
||||||
|
Log.i(TAG, "Action: 拖动");
|
||||||
|
starDrap = true;
|
||||||
|
// setBackgroundResource(R.drawable.bg_home_drop_view);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
starDrap = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onTouchEvent(MotionEvent event) {
|
||||||
|
switch (event.getAction()) {
|
||||||
|
|
||||||
|
case MotionEvent.ACTION_MOVE:
|
||||||
|
// setBackgroundResource(R.drawable.bg_home_drop_view);
|
||||||
|
setTranslationX(getX() + (event.getX() - X1));
|
||||||
|
setTranslationY(getY() + (event.getY() - Y1));
|
||||||
|
X2 = event.getX();
|
||||||
|
break;
|
||||||
|
case MotionEvent.ACTION_UP:
|
||||||
|
starDrap = false;
|
||||||
|
int sw = ScreenUtils.getScreenWidth();
|
||||||
|
Log.i(TAG, "onTouchEvent: " + sw + "," + X2);
|
||||||
|
boolean isR = getTranslationX() + getWidth() / 2 >= sw / 2;//贴边方向
|
||||||
|
ObjectAnimator anim = ObjectAnimator.ofFloat(this, "translationX", isR ? sw - getWidth()+10 : 0f).setDuration(200);
|
||||||
|
anim.start();
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void doRevealAnimation(View mPuppet, boolean flag) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
|
int[] vLocation = new int[2];
|
||||||
|
getLocationInWindow(vLocation);
|
||||||
|
int centerX = vLocation[0] + getMeasuredWidth() / 2;
|
||||||
|
int centerY = vLocation[1] + getMeasuredHeight() / 2;
|
||||||
|
|
||||||
|
int height = ScreenUtils.getScreenHeight();
|
||||||
|
int width = ScreenUtils.getScreenWidth();
|
||||||
|
int maxRradius = (int) Math.hypot(height, width);
|
||||||
|
Log.e("hei", maxRradius + "");
|
||||||
|
|
||||||
|
if (flag) {
|
||||||
|
mPuppet.setVisibility(VISIBLE);
|
||||||
|
Animator animator = ViewAnimationUtils.createCircularReveal(mPuppet, centerX, centerY, maxRradius, 0);
|
||||||
|
animator.setDuration(600);
|
||||||
|
animator.addListener(new AnimatorListenerAdapter() {
|
||||||
|
@Override
|
||||||
|
public void onAnimationEnd(Animator animation) {
|
||||||
|
super.onAnimationEnd(animation);
|
||||||
|
mPuppet.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
animator.start();
|
||||||
|
flag = false;
|
||||||
|
} else {
|
||||||
|
Animator animator = ViewAnimationUtils.createCircularReveal(mPuppet, centerX, centerY, 0, maxRradius);
|
||||||
|
animator.setDuration(1000);
|
||||||
|
animator.addListener(new Animator.AnimatorListener() {
|
||||||
|
@Override
|
||||||
|
public void onAnimationStart(Animator animation) {
|
||||||
|
mPuppet.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAnimationEnd(Animator animation) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAnimationCancel(Animator animation) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAnimationRepeat(Animator animation) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
animator.start();
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -59,7 +59,7 @@ public class RoomMessageInputMenu extends ConstraintLayout {
|
|||||||
}
|
}
|
||||||
String text = etContent.getText().toString();
|
String text = etContent.getText().toString();
|
||||||
if (TextUtils.isEmpty(text)) {
|
if (TextUtils.isEmpty(text)) {
|
||||||
ToastUtils.show("请输入评论内容");
|
ToastUtils.show("请输入内容");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// ApiClient.getInstance().sendTxtFilter(text,new BaseObserver<String>() {
|
// ApiClient.getInstance().sendTxtFilter(text,new BaseObserver<String>() {
|
||||||
|
|||||||
@@ -97,8 +97,8 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_close"
|
android:id="@+id/iv_close"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/dp_30"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp_30"
|
||||||
android:layout_marginTop="@dimen/dp_40"
|
android:layout_marginTop="@dimen/dp_40"
|
||||||
android:src="@mipmap/index_close_youth"
|
android:src="@mipmap/index_close_youth"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|||||||
BIN
moduleUtil/src/main/res/mipmap-hdpi/xlh_rk_bj.webp
Normal file
BIN
moduleUtil/src/main/res/mipmap-hdpi/xlh_rk_bj.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 231 KiB |
@@ -7,8 +7,7 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".activity.MainActivity"
|
android:name=".activity.MainActivity"
|
||||||
android:configChanges="fontScale"
|
android:configChanges="fontScale"
|
||||||
android:exported="true"
|
|
||||||
android:launchMode="singleTask"
|
|
||||||
android:screenOrientation="portrait">
|
android:screenOrientation="portrait">
|
||||||
</activity>
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="com.example.moduleroom">
|
package="com.example.moduleroom">
|
||||||
|
|
||||||
<application>
|
<application>
|
||||||
@@ -16,14 +17,13 @@
|
|||||||
android:name=".activity.RoomActivity"
|
android:name=".activity.RoomActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
android:taskAffinity=".RoomTaskAffinity"
|
|
||||||
android:excludeFromRecents="true"
|
android:excludeFromRecents="true"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:windowSoftInputMode="adjustPan"
|
android:windowSoftInputMode="adjustPan"
|
||||||
android:enableOnBackInvokedCallback="false"
|
android:enableOnBackInvokedCallback="false"
|
||||||
android:theme="@style/TransparentActivityTheme"
|
android:theme="@style/TransparentActivityTheme"
|
||||||
android:configChanges="orientation|screenSize|keyboardHidden"
|
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||||
/>
|
tools:targetApi="tiramisu" />
|
||||||
<!-- <activity-->
|
<!-- <activity-->
|
||||||
<!-- android:name=".activity.RoomActivity"-->
|
<!-- android:name=".activity.RoomActivity"-->
|
||||||
<!-- android:launchMode="singleInstancePerTask"-->
|
<!-- android:launchMode="singleInstancePerTask"-->
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
|
|||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.fragment.app.DialogFragment;
|
import androidx.fragment.app.DialogFragment;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.fragment.app.FragmentTransaction;
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
@@ -81,6 +82,7 @@ import com.example.moduleroom.fragment.PublicScreenEaseChatFragment;
|
|||||||
import com.example.moduleroom.fragment.RoomCabinFragment;
|
import com.example.moduleroom.fragment.RoomCabinFragment;
|
||||||
import com.example.moduleroom.fragment.RoomChartsFragment;
|
import com.example.moduleroom.fragment.RoomChartsFragment;
|
||||||
import com.example.moduleroom.fragment.RoomNoticeDialogFragment;
|
import com.example.moduleroom.fragment.RoomNoticeDialogFragment;
|
||||||
|
import com.orhanobut.logger.Logger;
|
||||||
import com.petterp.floatingx.assist.helper.FxScopeHelper;
|
import com.petterp.floatingx.assist.helper.FxScopeHelper;
|
||||||
import com.petterp.floatingx.listener.control.IFxControl;
|
import com.petterp.floatingx.listener.control.IFxControl;
|
||||||
import com.tencent.imsdk.v2.V2TIMValueCallback;
|
import com.tencent.imsdk.v2.V2TIMValueCallback;
|
||||||
@@ -517,7 +519,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
@Override
|
@Override
|
||||||
public void onExitRoom() {
|
public void onExitRoom() {
|
||||||
// 调用退出房间方法
|
// 调用退出房间方法
|
||||||
MvpPre.quitRoom(roomId, SpUtil.getUserId() + "");
|
// MvpPre.quitRoom(roomId, SpUtil.getUserId() + "");
|
||||||
|
|
||||||
// 真正退出房间
|
// 真正退出房间
|
||||||
performExitRoom(1);
|
performExitRoom(1);
|
||||||
@@ -1034,6 +1036,18 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
// MP4PlaybackCallback mp4PlaybackCallback=MP4PlaybackCallback.getInstance();
|
// MP4PlaybackCallback mp4PlaybackCallback=MP4PlaybackCallback.getInstance();
|
||||||
// mp4PlaybackCallback.setAvatarFrameView(mBinding.svgaGift);
|
// mp4PlaybackCallback.setAvatarFrameView(mBinding.svgaGift);
|
||||||
// mBinding.svgaGift.setAnimListener(mp4PlaybackCallback);
|
// mBinding.svgaGift.setAnimListener(mp4PlaybackCallback);
|
||||||
|
|
||||||
|
mBinding.xlhIm.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
FragmentManager fm = getSupportFragmentManager();
|
||||||
|
if (fm != null && !fm.isDestroyed()) {
|
||||||
|
TourClubDialogFragment newDialog = TourClubDialogFragment.newInstance(
|
||||||
|
roomId);
|
||||||
|
newDialog.show(fm, "TourClubDialogFragment");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onGiftGiveProgressClcik() {
|
private void onGiftGiveProgressClcik() {
|
||||||
@@ -1168,6 +1182,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
enterLandscapeMode();
|
enterLandscapeMode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void enterLandscapeMode() {
|
private void enterLandscapeMode() {
|
||||||
isFullScreen = true;
|
isFullScreen = true;
|
||||||
|
|
||||||
@@ -1218,11 +1233,11 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
ivQuan.setVisibility(View.VISIBLE);
|
ivQuan.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void enterFullScreen() {
|
private void enterFullScreen() {
|
||||||
isFullScreen = true;
|
isFullScreen = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 隐藏系统UI
|
// 隐藏系统UI
|
||||||
View decorView = getWindow().getDecorView();
|
View decorView = getWindow().getDecorView();
|
||||||
decorView.setSystemUiVisibility(
|
decorView.setSystemUiVisibility(
|
||||||
@@ -1426,7 +1441,13 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
|
|
||||||
public void roomInfoEvent(RoomMessageEvent messageEvent) {
|
public void roomInfoEvent(RoomMessageEvent messageEvent) {
|
||||||
if (messageEvent == null) return;
|
if (messageEvent == null) return;
|
||||||
|
if (roomFragment == null) {
|
||||||
|
roomFragment = RoomFragment.newInstance();
|
||||||
|
getSupportFragmentManager()
|
||||||
|
.beginTransaction()
|
||||||
|
.replace(R.id.vp_room_pager, roomFragment)
|
||||||
|
.commitAllowingStateLoss();
|
||||||
|
}
|
||||||
|
|
||||||
int msgType = messageEvent.getMsgType();
|
int msgType = messageEvent.getMsgType();
|
||||||
RoomMessageEvent.T text = messageEvent.getText();
|
RoomMessageEvent.T text = messageEvent.getText();
|
||||||
@@ -1458,31 +1479,10 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
} else if (msgType == 1024) {
|
} else if (msgType == 1024) {
|
||||||
handleMsgType1024(messageEvent, text);
|
handleMsgType1024(messageEvent, text);
|
||||||
} else if (msgType == 1025) {
|
} else if (msgType == 1025) {
|
||||||
if (roomFragment == null) {
|
|
||||||
roomFragment = RoomFragment.newInstance();
|
|
||||||
getSupportFragmentManager()
|
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.vp_room_pager, roomFragment)
|
|
||||||
.commitAllowingStateLoss();
|
|
||||||
}
|
|
||||||
roomFragment.handleAuctionMessageEvent(messageEvent);
|
roomFragment.handleAuctionMessageEvent(messageEvent);
|
||||||
} else if (msgType == 1026) {
|
} else if (msgType == 1026) {
|
||||||
if (roomFragment == null) {
|
|
||||||
roomFragment = RoomFragment.newInstance();
|
|
||||||
getSupportFragmentManager()
|
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.vp_room_pager, roomFragment)
|
|
||||||
.commitAllowingStateLoss();
|
|
||||||
}
|
|
||||||
roomFragment.handleAuctionMessageEvent(messageEvent);
|
roomFragment.handleAuctionMessageEvent(messageEvent);
|
||||||
} else if (msgType == 1027) {
|
} else if (msgType == 1027) {
|
||||||
if (roomFragment == null) {
|
|
||||||
roomFragment = RoomFragment.newInstance();
|
|
||||||
getSupportFragmentManager()
|
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.vp_room_pager, roomFragment)
|
|
||||||
.commitAllowingStateLoss();
|
|
||||||
}
|
|
||||||
roomFragment.handleAuctionMessageEvent(messageEvent);
|
roomFragment.handleAuctionMessageEvent(messageEvent);
|
||||||
} else if (msgType == 1020) {
|
} else if (msgType == 1020) {
|
||||||
handleMsgType1020(messageEvent, text);
|
handleMsgType1020(messageEvent, text);
|
||||||
@@ -1505,13 +1505,6 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
} else if (msgType == 1051) {
|
} else if (msgType == 1051) {
|
||||||
handleMsgType1051(messageEvent, text);
|
handleMsgType1051(messageEvent, text);
|
||||||
} else if (msgType == 1052) {
|
} else if (msgType == 1052) {
|
||||||
if (roomFragment == null) {
|
|
||||||
roomFragment = RoomFragment.newInstance();
|
|
||||||
getSupportFragmentManager()
|
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.vp_room_pager, roomFragment)
|
|
||||||
.commitAllowingStateLoss();
|
|
||||||
}
|
|
||||||
roomFragment.upCabinFragment(text.getTime_day());
|
roomFragment.upCabinFragment(text.getTime_day());
|
||||||
} else if (msgType == 1053) {
|
} else if (msgType == 1053) {
|
||||||
handleMsgType1053(messageEvent, text);
|
handleMsgType1053(messageEvent, text);
|
||||||
@@ -1522,22 +1515,21 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
} else if (msgType == 1035) {
|
} else if (msgType == 1035) {
|
||||||
handleMsgType1035(messageEvent, text);
|
handleMsgType1035(messageEvent, text);
|
||||||
} else if (msgType == 1030 || msgType == 1031 || msgType == 1032 || msgType == 1033 || msgType == 1015 || msgType == 1037) {
|
} else if (msgType == 1030 || msgType == 1031 || msgType == 1032 || msgType == 1033 || msgType == 1015 || msgType == 1037) {
|
||||||
if (roomFragment == null) {
|
|
||||||
roomFragment = RoomFragment.newInstance();
|
|
||||||
getSupportFragmentManager()
|
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.vp_room_pager, roomFragment)
|
|
||||||
.commitAllowingStateLoss();
|
|
||||||
}
|
|
||||||
roomFragment.SingSongEvent(messageEvent);
|
roomFragment.SingSongEvent(messageEvent);
|
||||||
if (msgType == 1032 || msgType == 1033) {
|
if (msgType == 1032 || msgType == 1033) {
|
||||||
setRoleType(3, -11);
|
setRoleType(3, -11);
|
||||||
}
|
}
|
||||||
} else if (msgType == 125) {
|
} else if (msgType == 125) {
|
||||||
handleMsgType125(messageEvent, text);
|
handleMsgType125(messageEvent, text);
|
||||||
|
}else if (msgType==1006){
|
||||||
|
handleMsgType1006();
|
||||||
} else if (msgType == 1007) {
|
} else if (msgType == 1007) {
|
||||||
handleMsgType1007();
|
handleMsgType1007();
|
||||||
} else if (msgType == 1018) {
|
}else if (msgType == 1017){
|
||||||
|
handleMsgType1017();
|
||||||
|
}
|
||||||
|
else if (msgType == 1018) {
|
||||||
handleMsgType1018();
|
handleMsgType1018();
|
||||||
} else if (msgType == 126) {
|
} else if (msgType == 126) {
|
||||||
handleMsgType126(messageEvent, text);
|
handleMsgType126(messageEvent, text);
|
||||||
@@ -1548,22 +1540,8 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
} else if (msgType == 1039) {
|
} else if (msgType == 1039) {
|
||||||
handleMsgType1039(messageEvent, text);
|
handleMsgType1039(messageEvent, text);
|
||||||
} else if (msgType == 1028) {
|
} else if (msgType == 1028) {
|
||||||
if (roomFragment == null) {
|
|
||||||
roomFragment = RoomFragment.newInstance();
|
|
||||||
getSupportFragmentManager()
|
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.vp_room_pager, roomFragment)
|
|
||||||
.commitAllowingStateLoss();
|
|
||||||
}
|
|
||||||
roomFragment.handleMsgType1028(messageEvent);
|
roomFragment.handleMsgType1028(messageEvent);
|
||||||
} else if (msgType == 1058) {
|
} else if (msgType == 1058) {
|
||||||
if (roomFragment == null) {
|
|
||||||
roomFragment = RoomFragment.newInstance();
|
|
||||||
getSupportFragmentManager()
|
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.vp_room_pager, roomFragment)
|
|
||||||
.commitAllowingStateLoss();
|
|
||||||
}
|
|
||||||
if (mRoomInfoResp != null && mRoomInfoResp.getRoom_info() != null) {
|
if (mRoomInfoResp != null && mRoomInfoResp.getRoom_info() != null) {
|
||||||
if (mRoomInfoResp.getRoom_info().getType_id().equals("1") || mRoomInfoResp.getRoom_info().getType_id().equals("3") ||
|
if (mRoomInfoResp.getRoom_info().getType_id().equals("1") || mRoomInfoResp.getRoom_info().getType_id().equals("3") ||
|
||||||
mRoomInfoResp.getRoom_info().getType_id().equals("4") || mRoomInfoResp.getRoom_info().getType_id().equals("8")) {
|
mRoomInfoResp.getRoom_info().getType_id().equals("4") || mRoomInfoResp.getRoom_info().getType_id().equals("8")) {
|
||||||
@@ -1579,13 +1557,6 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (msgType == 1059) {// 1059清除个人魅力 1058在离线
|
} else if (msgType == 1059) {// 1059清除个人魅力 1058在离线
|
||||||
if (roomFragment == null) {
|
|
||||||
roomFragment = RoomFragment.newInstance();
|
|
||||||
getSupportFragmentManager()
|
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.vp_room_pager, roomFragment)
|
|
||||||
.commitAllowingStateLoss();
|
|
||||||
}
|
|
||||||
if (mRoomInfoResp != null && mRoomInfoResp.getRoom_info() != null) {
|
if (mRoomInfoResp != null && mRoomInfoResp.getRoom_info() != null) {
|
||||||
if (mRoomInfoResp.getRoom_info().getType_id().equals("1") || mRoomInfoResp.getRoom_info().getType_id().equals("3") ||
|
if (mRoomInfoResp.getRoom_info().getType_id().equals("1") || mRoomInfoResp.getRoom_info().getType_id().equals("3") ||
|
||||||
mRoomInfoResp.getRoom_info().getType_id().equals("4") || mRoomInfoResp.getRoom_info().getType_id().equals("8")) {
|
mRoomInfoResp.getRoom_info().getType_id().equals("4") || mRoomInfoResp.getRoom_info().getType_id().equals("8")) {
|
||||||
@@ -1600,7 +1571,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
roomFragment.friendshipRoomFragmentEvent(messageEvent);
|
roomFragment.friendshipRoomFragmentEvent(messageEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (msgType == 1056) {
|
} else if (msgType == 1056) {// 1056 抽奖结果
|
||||||
GiftLotteryDialog dialog = (GiftLotteryDialog) getSupportFragmentManager()
|
GiftLotteryDialog dialog = (GiftLotteryDialog) getSupportFragmentManager()
|
||||||
.findFragmentByTag("GiftLotteryDialog");
|
.findFragmentByTag("GiftLotteryDialog");
|
||||||
if (dialog != null && dialog.isVisible()) {
|
if (dialog != null && dialog.isVisible()) {
|
||||||
@@ -1608,6 +1579,17 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
} else {
|
} else {
|
||||||
EventBus.getDefault().post(messageEvent.getText().getXlh_data());
|
EventBus.getDefault().post(messageEvent.getText().getXlh_data());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (messageEvent.getText().getXlh_data() != null) {
|
||||||
|
if (messageEvent.getText().getXlh_data().getStatus() == 1) {
|
||||||
|
mBinding.xlhRk.setVisibility(View.VISIBLE);
|
||||||
|
xlhDjs(messageEvent.getText().getXlh_data().getEnd_time());
|
||||||
|
} else {
|
||||||
|
mBinding.xlhRk.setVisibility(INVISIBLE);
|
||||||
|
releaseCountDownTimer1();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else if (msgType == 1057) {
|
} else if (msgType == 1057) {
|
||||||
TourClubDialogFragment existingFragment = (TourClubDialogFragment) getSupportFragmentManager().findFragmentByTag("TourClubDialogFragment");
|
TourClubDialogFragment existingFragment = (TourClubDialogFragment) getSupportFragmentManager().findFragmentByTag("TourClubDialogFragment");
|
||||||
if (existingFragment != null && existingFragment.isVisible()) {
|
if (existingFragment != null && existingFragment.isVisible()) {
|
||||||
@@ -1616,10 +1598,105 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
LogUtils.e("TourClubDialogFragment", "巡乐会界面未打开");
|
LogUtils.e("TourClubDialogFragment", "巡乐会界面未打开");
|
||||||
EventBus.getDefault().post(messageEvent);
|
EventBus.getDefault().post(messageEvent);
|
||||||
}
|
}
|
||||||
|
xlhDjs(messageEvent.getText().getEnd_time());
|
||||||
|
// if (messageEvent.getText().getXlh_data() != null) {
|
||||||
|
// if (messageEvent.getText().getXlh_data().getStatus() == 1) {
|
||||||
|
// mBinding.xlhRk.setVisibility(View.VISIBLE);
|
||||||
|
// xlhDjs(messageEvent.getText().getEnd_time());
|
||||||
|
// } else {
|
||||||
|
// mBinding.xlhRk.setVisibility(View.GONE);
|
||||||
|
// releaseCountDownTimer1();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private long endTime;
|
||||||
|
|
||||||
|
private void xlhDjs(String endTimeStr) {
|
||||||
|
// 获取结束时间并启动倒计时
|
||||||
|
if (endTimeStr != null && !endTimeStr.isEmpty()) {
|
||||||
|
try {
|
||||||
|
// 假设 end_time 是时间戳字符串
|
||||||
|
endTime = Long.parseLong(endTimeStr);
|
||||||
|
countDownTime(endTime);
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
// 如果不是时间戳,可能是日期字符串,需要相应解析
|
||||||
|
// 例如:2025-08-26 19:10:47
|
||||||
|
// 可以使用 SimpleDateFormat 解析
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void countDownTime(long time) {
|
||||||
|
try {
|
||||||
|
if (time <= 0) {
|
||||||
|
setTime(0);
|
||||||
|
|
||||||
|
releaseCountDownTimer1();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
releaseCountDownTimer1();
|
||||||
|
// 获取当前时间的毫秒值
|
||||||
|
long currentTime = System.currentTimeMillis() / 1000L;
|
||||||
|
// 计算倒计时的总秒数
|
||||||
|
long countDownTime = (time - currentTime);
|
||||||
|
Logger.d("@@@", "countDownTime = " + countDownTime);
|
||||||
|
if (countDownTime <= 0) {
|
||||||
|
setTime(0);
|
||||||
|
releaseCountDownTimer1();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mCountDownTimer2 = new CountDownTimer(countDownTime * 1000L, 1000L) {
|
||||||
|
@Override
|
||||||
|
public void onTick(long millisUntilFinished) {
|
||||||
|
int time1 = (int) (millisUntilFinished / 1000);
|
||||||
|
setTime(time1);
|
||||||
|
// mBinding.tvDjs.setText(time1 + "");
|
||||||
|
if (time1 == 0) {
|
||||||
|
mBinding.xlhRk.setVisibility(INVISIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFinish() {
|
||||||
|
setTime(0);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
mCountDownTimer2.start();
|
||||||
|
} catch (Exception e) {
|
||||||
|
Logger.e("countDownTime", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String formatTime(int totalSeconds) {
|
||||||
|
int minutes = (totalSeconds % 3600) / 60;
|
||||||
|
int seconds = totalSeconds % 60;
|
||||||
|
|
||||||
|
return String.format("%02d:%02d", minutes, seconds);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("DefaultLocale")
|
||||||
|
public void setTime(int seconds) {
|
||||||
|
if (seconds == 0) {
|
||||||
|
mBinding.xlhRk.setVisibility(INVISIBLE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String formattedTime = formatTime(seconds);
|
||||||
|
mBinding.tvDjs.setText("倒计时" + formattedTime);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: 2025/3/19 释放倒计时器
|
||||||
|
private void releaseCountDownTimer1() {
|
||||||
|
if (mCountDownTimer2 != null) {
|
||||||
|
mCountDownTimer2.cancel();
|
||||||
|
mCountDownTimer2 = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private Map<String, RoomPitBean> pitMap = new HashMap<>();
|
private Map<String, RoomPitBean> pitMap = new HashMap<>();
|
||||||
|
|
||||||
public void handleMsgType1039(RoomMessageEvent messageEvent, RoomMessageEvent.T text) {
|
public void handleMsgType1039(RoomMessageEvent messageEvent, RoomMessageEvent.T text) {
|
||||||
@@ -2084,6 +2161,9 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
|
|
||||||
private void handleMsgType1002() {
|
private void handleMsgType1002() {
|
||||||
number--;
|
number--;
|
||||||
|
if (number<0){
|
||||||
|
number=0;
|
||||||
|
}
|
||||||
mBinding.roomTop.tvNum.setText(number + "");
|
mBinding.roomTop.tvNum.setText(number + "");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2314,6 +2394,13 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void handleMsgType1006(){
|
||||||
|
if (mRoomInfoResp!=null && mRoomInfoResp.getUser_info() != null){
|
||||||
|
mRoomInfoResp.getUser_info().setIs_management(1);
|
||||||
|
roomFragment.upRoomInfoData(mRoomInfoResp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void handleMsgType1018() {
|
private void handleMsgType1018() {
|
||||||
if (mRoomInfoResp != null && mRoomInfoResp.getUser_info() != null) {
|
if (mRoomInfoResp != null && mRoomInfoResp.getUser_info() != null) {
|
||||||
mRoomInfoResp.getUser_info().setIs_host(0);
|
mRoomInfoResp.getUser_info().setIs_host(0);
|
||||||
@@ -2322,6 +2409,13 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void handleMsgType1017(){
|
||||||
|
if (mRoomInfoResp!=null && mRoomInfoResp.getUser_info() != null){
|
||||||
|
mRoomInfoResp.getUser_info().setIs_management(0);
|
||||||
|
roomFragment.upRoomInfoData(mRoomInfoResp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void handleMsgType126(RoomMessageEvent messageEvent, RoomMessageEvent.T text) {
|
private void handleMsgType126(RoomMessageEvent messageEvent, RoomMessageEvent.T text) {
|
||||||
if (text == null) return;
|
if (text == null) return;
|
||||||
|
|
||||||
@@ -2532,6 +2626,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
private boolean canSend = true;
|
private boolean canSend = true;
|
||||||
private boolean aBoolean = true;//上下麦按钮
|
private boolean aBoolean = true;//上下麦按钮
|
||||||
private CountDownTimer mCountDownTimer;
|
private CountDownTimer mCountDownTimer;
|
||||||
|
private CountDownTimer mCountDownTimer2;
|
||||||
|
|
||||||
private void onClick(View view) {
|
private void onClick(View view) {
|
||||||
int id = view.getId();
|
int id = view.getId();
|
||||||
@@ -2586,6 +2681,10 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
}
|
}
|
||||||
} else if (id == R.id.rl_sett) {//房间设置
|
} else if (id == R.id.rl_sett) {//房间设置
|
||||||
// RoomSettingFragment.show(mRoomInfoResp, getSupportFragmentManager());
|
// RoomSettingFragment.show(mRoomInfoResp, getSupportFragmentManager());
|
||||||
|
if (mRoomInfoResp==null){
|
||||||
|
ToastUtils.showShort("请稍后再试");
|
||||||
|
return;
|
||||||
|
}
|
||||||
RoomSettingFragment fragment = RoomSettingFragment.show(mRoomInfoResp, getSupportFragmentManager());
|
RoomSettingFragment fragment = RoomSettingFragment.show(mRoomInfoResp, getSupportFragmentManager());
|
||||||
if (fragment != null) {
|
if (fragment != null) {
|
||||||
addActiveDialogFragment(fragment); // 添加到管理列表
|
addActiveDialogFragment(fragment); // 添加到管理列表
|
||||||
@@ -2698,6 +2797,9 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
|
|
||||||
// 添加前后台状态检测
|
// 添加前后台状态检测
|
||||||
private boolean isAppInForeground() {
|
private boolean isAppInForeground() {
|
||||||
|
if (mRoomInfoResp==null){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (!mRoomInfoResp.getRoom_info().getLabel_id().equals("6")) {
|
if (!mRoomInfoResp.getRoom_info().getLabel_id().equals("6")) {
|
||||||
ActivityManager activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
|
ActivityManager activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
|
||||||
List<ActivityManager.RunningAppProcessInfo> appProcesses = activityManager.getRunningAppProcesses();
|
List<ActivityManager.RunningAppProcessInfo> appProcesses = activityManager.getRunningAppProcesses();
|
||||||
@@ -2780,7 +2882,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
// 隐藏Activity而不是销毁它
|
// 隐藏Activity而不是销毁它
|
||||||
// moveTaskToBack(true);
|
// moveTaskToBack(true);
|
||||||
// 使用 moveTaskToBack 将应用最小化
|
// 使用 moveTaskToBack 将应用最小化
|
||||||
moveTaskToBack(true);
|
// moveTaskToBack(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveMinimizeState() {
|
private void saveMinimizeState() {
|
||||||
@@ -3052,7 +3154,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
}
|
}
|
||||||
String text = etContent.getText().toString();
|
String text = etContent.getText().toString();
|
||||||
if (TextUtils.isEmpty(text)) {
|
if (TextUtils.isEmpty(text)) {
|
||||||
com.hjq.toast.ToastUtils.show("请输入评论内容");
|
com.hjq.toast.ToastUtils.show("发送消息不哪呢过为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
EventBus.getDefault().post(new RoomInputEvent(text));
|
EventBus.getDefault().post(new RoomInputEvent(text));
|
||||||
@@ -3123,7 +3225,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void roomOut(RoomOutEvent roomOutEvent) {
|
public void roomOut(RoomOutEvent roomOutEvent) {
|
||||||
MvpPre.quitRoom(roomId, SpUtil.getUserId() + "");
|
// MvpPre.quitRoom(roomId, SpUtil.getUserId() + "");
|
||||||
performExitRoom(2);
|
performExitRoom(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3242,6 +3344,14 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
}
|
}
|
||||||
setupEffectView();
|
setupEffectView();
|
||||||
|
|
||||||
|
if (mRoomInfoResp.getGift_cycle()!=null && mRoomInfoResp.getGift_cycle().getXlh_info()!=null && mRoomInfoResp.getGift_cycle().getXlh_info().getXlh_status()!=null && mRoomInfoResp.getGift_cycle().getXlh_info().getXlh_status().equals("1")){
|
||||||
|
mBinding.xlhRk.setVisibility(View.VISIBLE);
|
||||||
|
xlhDjs(mRoomInfoResp.getGift_cycle().getXlh_info().getEnd_time());
|
||||||
|
} else {
|
||||||
|
mBinding.xlhRk.setVisibility(INVISIBLE);
|
||||||
|
releaseCountDownTimer1();
|
||||||
|
}
|
||||||
|
|
||||||
// sharedViewModel.setDataForFragment(mRoomInfoResp);
|
// sharedViewModel.setDataForFragment(mRoomInfoResp);
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
@@ -3510,6 +3620,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
super.onResume();
|
super.onResume();
|
||||||
CommonAppContext.getInstance().isShow = true;
|
CommonAppContext.getInstance().isShow = true;
|
||||||
CommonAppContext.getInstance().isPlaying = true;
|
CommonAppContext.getInstance().isPlaying = true;
|
||||||
|
CommonAppContext.getInstance().isRoomJoininj=false;
|
||||||
// 当Activity恢复时,重置标记
|
// 当Activity恢复时,重置标记
|
||||||
userLeaving = true;
|
userLeaving = true;
|
||||||
// // 正常启动或从后台恢复
|
// // 正常启动或从后台恢复
|
||||||
@@ -4043,6 +4154,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
|
|
||||||
// 3. 清理 CountDownTimer
|
// 3. 清理 CountDownTimer
|
||||||
releaseCountDownTimer();
|
releaseCountDownTimer();
|
||||||
|
releaseCountDownTimer1();
|
||||||
if (giftCountTimer != null) {
|
if (giftCountTimer != null) {
|
||||||
giftCountTimer.cancel();
|
giftCountTimer.cancel();
|
||||||
giftCountTimer = null;
|
giftCountTimer = null;
|
||||||
|
|||||||
@@ -83,6 +83,10 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
|||||||
super.onAttach(context);
|
super.onAttach(context);
|
||||||
// roomId=getArguments().getString("roomId");
|
// roomId=getArguments().getString("roomId");
|
||||||
roomInfoResp = (RoomInfoResp) getArguments().getSerializable("roomInfoResp");
|
roomInfoResp = (RoomInfoResp) getArguments().getSerializable("roomInfoResp");
|
||||||
|
if (roomInfoResp==null){
|
||||||
|
ToastUtils.show("房间信息为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
roomId = roomInfoResp.getRoom_info().getRoom_id();
|
roomId = roomInfoResp.getRoom_info().getRoom_id();
|
||||||
if (roomInfoResp.getUser_info().getIs_room_owner() != 0) {
|
if (roomInfoResp.getUser_info().getIs_room_owner() != 0) {
|
||||||
read = 1;
|
read = 1;
|
||||||
@@ -280,9 +284,17 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
|||||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeHUYU) {
|
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeHUYU) {
|
||||||
queren("8");
|
queren("8");
|
||||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomSetting) {
|
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomSetting) {
|
||||||
|
if (roomInfoResp != null) {
|
||||||
ARouter.getInstance().build(ARouteConstants.CREATED_ROOM).withSerializable("roomInfoResp", roomInfoResp).navigation();
|
ARouter.getInstance().build(ARouteConstants.CREATED_ROOM).withSerializable("roomInfoResp", roomInfoResp).navigation();
|
||||||
|
} else {
|
||||||
|
com.blankj.utilcode.util.ToastUtils.showShort("数据错误,请关闭重试");
|
||||||
|
}
|
||||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomReport) {
|
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomReport) {
|
||||||
|
if (roomId != null) {
|
||||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/report?id=" + SpUtil.getToken() + "&fromType=" + 2 + "&fromId=" + roomId).navigation();
|
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/report?id=" + SpUtil.getToken() + "&fromType=" + 2 + "&fromId=" + roomId).navigation();
|
||||||
|
}else {
|
||||||
|
com.blankj.utilcode.util.ToastUtils.showShort("数据错误,请关闭重试");
|
||||||
|
}
|
||||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomSubsidy) {
|
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomSubsidy) {
|
||||||
ARouter.getInstance().build(ARouteConstants.ROOM_ALLOWANCE).withString("from", "我的界面").withString("roomId", roomInfoResp.getRoom_info().getRoom_id() + "").navigation();
|
ARouter.getInstance().build(ARouteConstants.ROOM_ALLOWANCE).withString("from", "我的界面").withString("roomId", roomInfoResp.getRoom_info().getRoom_id() + "").navigation();
|
||||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomFloatingScreen) {//2025年9月22日14:10:25,添加飘屏关闭打开按钮
|
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomFloatingScreen) {//2025年9月22日14:10:25,添加飘屏关闭打开按钮
|
||||||
|
|||||||
@@ -863,15 +863,15 @@ public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEa
|
|||||||
postAndAddMessage(message);
|
postAndAddMessage(message);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1002:
|
// case 1002:
|
||||||
postAndAddMessage(message);
|
// postAndAddMessage(message);
|
||||||
break;
|
// break;
|
||||||
|
|
||||||
case 123:
|
case 123:
|
||||||
easeChatAdapter.clearData();
|
easeChatAdapter.clearData();
|
||||||
postAndAddMessage(message);
|
postAndAddMessage(message);
|
||||||
break;
|
break;
|
||||||
|
case 1002:
|
||||||
case 1012:
|
case 1012:
|
||||||
case 1014:
|
case 1014:
|
||||||
case 1013:
|
case 1013:
|
||||||
|
|||||||
@@ -333,6 +333,9 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (userIds.length() > 0 && roomId != null) {
|
if (userIds.length() > 0 && roomId != null) {
|
||||||
|
if (MvpPre==null){
|
||||||
|
MvpPre = new SingSongPresenter(this, getContext());
|
||||||
|
}
|
||||||
MvpPre.userOnlineStatus(userIds.toString(), roomId);
|
MvpPre.userOnlineStatus(userIds.toString(), roomId);
|
||||||
} else {
|
} else {
|
||||||
// updateWheatData();
|
// updateWheatData();
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import com.xscm.moduleutil.bean.PkSwTokenBean;
|
|||||||
import com.xscm.moduleutil.bean.UserOnlineStatusBean;
|
import com.xscm.moduleutil.bean.UserOnlineStatusBean;
|
||||||
import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
||||||
import com.xscm.moduleutil.http.BaseObserver;
|
import com.xscm.moduleutil.http.BaseObserver;
|
||||||
|
import com.xscm.moduleutil.http.RetrofitClient;
|
||||||
import com.xscm.moduleutil.rtc.AgoraManager;
|
import com.xscm.moduleutil.rtc.AgoraManager;
|
||||||
import com.xscm.moduleutil.utils.SpUtil;
|
import com.xscm.moduleutil.utils.SpUtil;
|
||||||
|
|
||||||
@@ -26,7 +27,7 @@ public class SingSongPresenter extends BaseRoomPresenter<SingSongContacts.View>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void applyPit(String roomId, String pitNumber) {
|
public void applyPit(String roomId, String pitNumber) {
|
||||||
api.applyPit(roomId, pitNumber, new BaseObserver<String>() {
|
RetrofitClient.getInstance().applyPit(roomId, pitNumber, new BaseObserver<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
addDisposable(d);
|
addDisposable(d);
|
||||||
@@ -44,7 +45,7 @@ public class SingSongPresenter extends BaseRoomPresenter<SingSongContacts.View>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setMutePit(String roomId, String pitNumber, String is_mute) {
|
public void setMutePit(String roomId, String pitNumber, String is_mute) {
|
||||||
api.setMutePit(roomId, pitNumber, is_mute, new BaseObserver<String>() {
|
RetrofitClient.getInstance().setMutePit(roomId, pitNumber, is_mute, new BaseObserver<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
addDisposable(d);
|
addDisposable(d);
|
||||||
@@ -62,7 +63,7 @@ public class SingSongPresenter extends BaseRoomPresenter<SingSongContacts.View>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setLockPit(String roomId, String pitNumber, String is_lock) {
|
public void setLockPit(String roomId, String pitNumber, String is_lock) {
|
||||||
api.setLockPit(roomId, pitNumber, is_lock, new BaseObserver<String>() {
|
RetrofitClient.getInstance().setLockPit(roomId, pitNumber, is_lock, new BaseObserver<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
addDisposable(d);
|
addDisposable(d);
|
||||||
@@ -81,7 +82,7 @@ public class SingSongPresenter extends BaseRoomPresenter<SingSongContacts.View>
|
|||||||
/// 请求房间信息,当pk同意的时候,获取对方房间信息,同时请求自己房间信息,做页面的更新 添加一type:1:请求对方信息 2:请求自己房间信息 3:是否接受PK
|
/// 请求房间信息,当pk同意的时候,获取对方房间信息,同时请求自己房间信息,做页面的更新 添加一type:1:请求对方信息 2:请求自己房间信息 3:是否接受PK
|
||||||
@Override
|
@Override
|
||||||
public void postRoomInfo(String roomId, String number,int type) {
|
public void postRoomInfo(String roomId, String number,int type) {
|
||||||
api.postRoomInfo(roomId, new BaseObserver<RoomInfoResp>() {
|
RetrofitClient.getInstance().postRoomInfo(roomId, new BaseObserver<RoomInfoResp>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
addDisposable(d);
|
addDisposable(d);
|
||||||
@@ -121,7 +122,7 @@ public class SingSongPresenter extends BaseRoomPresenter<SingSongContacts.View>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void endPk(String pk_id, String type, String user_id) {
|
public void endPk(String pk_id, String type, String user_id) {
|
||||||
api.endPk(pk_id, type, user_id, new BaseObserver<String>() {
|
RetrofitClient.getInstance().endPk(pk_id, type, user_id, new BaseObserver<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
addDisposable(d);
|
addDisposable(d);
|
||||||
@@ -139,7 +140,7 @@ public class SingSongPresenter extends BaseRoomPresenter<SingSongContacts.View>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void userOnlineStatus(String userId, String roomid) {
|
public void userOnlineStatus(String userId, String roomid) {
|
||||||
api.userOnlineStatus(userId, roomid, new BaseObserver<List<UserOnlineStatusBean>>() {
|
RetrofitClient.getInstance().userOnlineStatus(userId, roomid, new BaseObserver<List<UserOnlineStatusBean>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
addDisposable(d);
|
addDisposable(d);
|
||||||
@@ -156,7 +157,7 @@ public class SingSongPresenter extends BaseRoomPresenter<SingSongContacts.View>
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void postRoomSwToken(String roomId,int uid) {
|
public void postRoomSwToken(String roomId,int uid) {
|
||||||
api.postRoomSwToken(roomId, new BaseObserver<PkSwTokenBean>() {
|
RetrofitClient.getInstance().postRoomSwToken(roomId, new BaseObserver<PkSwTokenBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
addDisposable(d);
|
addDisposable(d);
|
||||||
|
|||||||
@@ -483,6 +483,43 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<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:gravity="center_vertical|center"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:background="@color/transparent"
|
||||||
|
android:visibility="invisible"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/xlh_im"
|
||||||
|
android:layout_width="@dimen/dp_80"
|
||||||
|
android:layout_height="@dimen/dp_80"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:src="@mipmap/xlh_rk_bj"
|
||||||
|
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"/>
|
||||||
|
|
||||||
|
|
||||||
|
</com.xscm.moduleutil.widget.DropViewRoom>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.floatingView.Floa
|
<com.xscm.moduleutil.widget.floatingView.Floa
|
||||||
android:id="@+id/flaoat"
|
android:id="@+id/flaoat"
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.example.modulevocal.conacts.WithdrawalConacts;
|
|||||||
import com.example.modulevocal.databinding.ActivityBindCardBinding;
|
import com.example.modulevocal.databinding.ActivityBindCardBinding;
|
||||||
import com.example.modulevocal.presenter.WithdrawalPresenter;
|
import com.example.modulevocal.presenter.WithdrawalPresenter;
|
||||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||||
|
import com.xscm.moduleutil.bean.BindDetail;
|
||||||
import com.xscm.moduleutil.bean.BindType;
|
import com.xscm.moduleutil.bean.BindType;
|
||||||
import com.xscm.moduleutil.bean.WalletBean;
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
import com.xscm.moduleutil.bean.WalletConfig;
|
import com.xscm.moduleutil.bean.WalletConfig;
|
||||||
@@ -75,6 +76,11 @@ public class BindCardActivity extends BaseMvpActivity<WithdrawalPresenter, Activ
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindDetai(BindDetail bindDetail) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.example.modulevocal.databinding.ActivityBindCardDetailsBinding;
|
|||||||
import com.example.modulevocal.presenter.WithdrawalPresenter;
|
import com.example.modulevocal.presenter.WithdrawalPresenter;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||||
|
import com.xscm.moduleutil.bean.BindDetail;
|
||||||
import com.xscm.moduleutil.bean.BindType;
|
import com.xscm.moduleutil.bean.BindType;
|
||||||
import com.xscm.moduleutil.bean.WalletBean;
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
import com.xscm.moduleutil.bean.WalletConfig;
|
import com.xscm.moduleutil.bean.WalletConfig;
|
||||||
@@ -32,6 +33,7 @@ public class BindCardDetailsActivity extends BaseMvpActivity<WithdrawalPresenter
|
|||||||
protected void initData() {
|
protected void initData() {
|
||||||
type=getIntent().getStringExtra("type");
|
type=getIntent().getStringExtra("type");
|
||||||
|
|
||||||
|
MvpPre.bindDetai(SpUtil.getUserId()+"",type);
|
||||||
if (type.equals("1")){
|
if (type.equals("1")){
|
||||||
mBinding.topBar.setTitle("微信绑卡");
|
mBinding.topBar.setTitle("微信绑卡");
|
||||||
mBinding.cet1.setVisibility(VISIBLE);
|
mBinding.cet1.setVisibility(VISIBLE);
|
||||||
@@ -58,6 +60,7 @@ public class BindCardDetailsActivity extends BaseMvpActivity<WithdrawalPresenter
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mBinding.tvSend.setOnClickListener(new View.OnClickListener() {
|
mBinding.tvSend.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
@@ -127,6 +130,47 @@ public class BindCardDetailsActivity extends BaseMvpActivity<WithdrawalPresenter
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindDetai(BindDetail bindDetail) {
|
||||||
|
if (bindDetail!=null){
|
||||||
|
if (type.equals("2")){
|
||||||
|
mBinding.cet1.setText(bindDetail.getAlipay_account());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (type.equals("3")){
|
||||||
|
mBinding.cet2.setText(bindDetail.getBank_card_number());
|
||||||
|
mBinding.cet3.setText(bindDetail.getBank_card());
|
||||||
|
mBinding.cet4.setText(bindDetail.getOpen_bank());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (type.equals("1")){
|
||||||
|
mBinding.topBar.setTitle("微信绑卡");
|
||||||
|
mBinding.cet1.setVisibility(VISIBLE);
|
||||||
|
mBinding.cet2.setVisibility(GONE);
|
||||||
|
mBinding.cet3.setVisibility(GONE);
|
||||||
|
mBinding.cet4.setVisibility(GONE);
|
||||||
|
mBinding.cet1.setHint("微信账户");
|
||||||
|
}else if (type.equals("2")){
|
||||||
|
mBinding.topBar.setTitle("支付宝绑卡");
|
||||||
|
mBinding.cet1.setVisibility(VISIBLE);
|
||||||
|
mBinding.cet2.setVisibility(GONE);
|
||||||
|
mBinding.cet3.setVisibility(GONE);
|
||||||
|
mBinding.cet4.setVisibility(GONE);
|
||||||
|
mBinding.cet1.setHint("支付宝账户");
|
||||||
|
} else if (type.equals("3")) {
|
||||||
|
mBinding.topBar.setTitle("银行卡绑卡");
|
||||||
|
mBinding.cet1.setVisibility(GONE);
|
||||||
|
mBinding.cet2.setVisibility(VISIBLE);
|
||||||
|
mBinding.cet3.setVisibility(VISIBLE);
|
||||||
|
mBinding.cet4.setVisibility(VISIBLE);
|
||||||
|
mBinding.cet2.setHint("银行卡号");
|
||||||
|
mBinding.cet3.setHint("所属银行");
|
||||||
|
mBinding.cet4.setHint("银行卡开户行");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected WithdrawalPresenter bindPresenter() {
|
protected WithdrawalPresenter bindPresenter() {
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import com.example.modulevocal.presenter.WithdrawalPresenter;
|
|||||||
import com.google.android.material.textfield.TextInputEditText;
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||||
|
import com.xscm.moduleutil.bean.BindDetail;
|
||||||
import com.xscm.moduleutil.bean.BindType;
|
import com.xscm.moduleutil.bean.BindType;
|
||||||
import com.xscm.moduleutil.bean.WalletBean;
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
import com.xscm.moduleutil.bean.WalletConfig;
|
import com.xscm.moduleutil.bean.WalletConfig;
|
||||||
@@ -339,4 +340,9 @@ public class WithdrawalActivity extends BaseMvpActivity<WithdrawalPresenter, Act
|
|||||||
public void withdrawalList(List<WithdrawalBean> list) {
|
public void withdrawalList(List<WithdrawalBean> list) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindDetai(BindDetail bindDetail) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -10,6 +10,7 @@ import com.example.modulevocal.conacts.WithdrawalConacts;
|
|||||||
import com.example.modulevocal.databinding.ActivityWithdrawalListBinding;
|
import com.example.modulevocal.databinding.ActivityWithdrawalListBinding;
|
||||||
import com.example.modulevocal.presenter.WithdrawalPresenter;
|
import com.example.modulevocal.presenter.WithdrawalPresenter;
|
||||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||||
|
import com.xscm.moduleutil.bean.BindDetail;
|
||||||
import com.xscm.moduleutil.bean.BindType;
|
import com.xscm.moduleutil.bean.BindType;
|
||||||
import com.xscm.moduleutil.bean.WalletBean;
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
import com.xscm.moduleutil.bean.WalletConfig;
|
import com.xscm.moduleutil.bean.WalletConfig;
|
||||||
@@ -89,4 +90,9 @@ public class WithdrawalListActivity extends BaseMvpActivity<WithdrawalPresenter,
|
|||||||
public void withdrawalList(List<WithdrawalBean> list) {
|
public void withdrawalList(List<WithdrawalBean> list) {
|
||||||
adapter.setNewData(list);
|
adapter.setNewData(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindDetai(BindDetail bindDetail) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,7 @@ 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.BindDetail;
|
||||||
import com.xscm.moduleutil.bean.BindType;
|
import com.xscm.moduleutil.bean.BindType;
|
||||||
import com.xscm.moduleutil.bean.WalletBean;
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
import com.xscm.moduleutil.bean.WalletConfig;
|
import com.xscm.moduleutil.bean.WalletConfig;
|
||||||
@@ -22,6 +23,8 @@ public final class WithdrawalConacts {
|
|||||||
|
|
||||||
void withdrawal(String s);
|
void withdrawal(String s);
|
||||||
void withdrawalList(List<WithdrawalBean> list);
|
void withdrawalList(List<WithdrawalBean> list);
|
||||||
|
|
||||||
|
void bindDetai(BindDetail bindDetail);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IMePre extends IPresenter {
|
public interface IMePre extends IPresenter {
|
||||||
@@ -37,5 +40,7 @@ public final class WithdrawalConacts {
|
|||||||
void withdrawal(String number,String type,String sms_code);
|
void withdrawal(String number,String type,String sms_code);
|
||||||
|
|
||||||
void withdrawalList(String page,String page_limit,String search_stime,String search_etime);
|
void withdrawalList(String page,String page_limit,String search_stime,String search_etime);
|
||||||
|
|
||||||
|
void bindDetai(String userId,String type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class MyFollowFragment extends BaseMvpFragment<MyRoomPresenter, RoomFragm
|
|||||||
mBinding.recycleView.setAdapter(followAdapter = new ChatRoomMyFollowAdapter());
|
mBinding.recycleView.setAdapter(followAdapter = new ChatRoomMyFollowAdapter());
|
||||||
followAdapter.bindToRecyclerView(mBinding.recycleView);
|
followAdapter.bindToRecyclerView(mBinding.recycleView);
|
||||||
CommonEmptyView commonEmptyView = new CommonEmptyView(getContext());
|
CommonEmptyView commonEmptyView = new CommonEmptyView(getContext());
|
||||||
commonEmptyView.setEmptyText("亲亲,你还没管理任何房间哦~赶快动起来吧!");
|
commonEmptyView.setEmptyText("亲亲,你还没关注任何房间哦~赶快动起来吧!");
|
||||||
commonEmptyView.setTextColor(getResources().getColor(com.xscm.moduleutil.R.color.color_FFBDBDBC));
|
commonEmptyView.setTextColor(getResources().getColor(com.xscm.moduleutil.R.color.color_FFBDBDBC));
|
||||||
followAdapter.setEmptyView(commonEmptyView);
|
followAdapter.setEmptyView(commonEmptyView);
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.example.modulevocal.presenter;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import com.example.modulevocal.conacts.WithdrawalConacts;
|
import com.example.modulevocal.conacts.WithdrawalConacts;
|
||||||
|
import com.xscm.moduleutil.bean.BindDetail;
|
||||||
import com.xscm.moduleutil.bean.BindType;
|
import com.xscm.moduleutil.bean.BindType;
|
||||||
import com.xscm.moduleutil.bean.WalletBean;
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
import com.xscm.moduleutil.bean.WalletConfig;
|
import com.xscm.moduleutil.bean.WalletConfig;
|
||||||
@@ -10,13 +11,17 @@ import com.xscm.moduleutil.bean.WithdrawalBean;
|
|||||||
import com.xscm.moduleutil.http.BaseObserver;
|
import com.xscm.moduleutil.http.BaseObserver;
|
||||||
import com.xscm.moduleutil.presenter.BasePresenter;
|
import com.xscm.moduleutil.presenter.BasePresenter;
|
||||||
|
|
||||||
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import io.reactivex.disposables.Disposable;
|
import io.reactivex.disposables.Disposable;
|
||||||
|
|
||||||
public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> implements WithdrawalConacts.IMePre {
|
public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> implements WithdrawalConacts.IMePre {
|
||||||
|
|
||||||
|
WithdrawalConacts.View mView;
|
||||||
public WithdrawalPresenter(WithdrawalConacts.View view, Context context) {
|
public WithdrawalPresenter(WithdrawalConacts.View view, Context context) {
|
||||||
super(view, context);
|
super(view, context);
|
||||||
|
this.mView = view;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -29,6 +34,9 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(WalletBean walletBean) {
|
public void onNext(WalletBean walletBean) {
|
||||||
|
if (MvpRef == null){
|
||||||
|
MvpRef=new WeakReference<>(mView);
|
||||||
|
}
|
||||||
MvpRef.get().wallet(walletBean);
|
MvpRef.get().wallet(walletBean);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -44,6 +52,9 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(BindType bindType) {
|
public void onNext(BindType bindType) {
|
||||||
|
if (MvpRef == null){
|
||||||
|
MvpRef=new WeakReference<>(mView);
|
||||||
|
}
|
||||||
MvpRef.get().bindType(bindType);
|
MvpRef.get().bindType(bindType);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -59,6 +70,9 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(WalletConfig walletConfig) {
|
public void onNext(WalletConfig walletConfig) {
|
||||||
|
if (MvpRef == null){
|
||||||
|
MvpRef=new WeakReference<>(mView);
|
||||||
|
}
|
||||||
MvpRef.get().getWalletConfig(walletConfig);
|
MvpRef.get().getWalletConfig(walletConfig);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -74,6 +88,9 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(String s) {
|
public void onNext(String s) {
|
||||||
|
if (MvpRef == null){
|
||||||
|
MvpRef=new WeakReference<>(mView);
|
||||||
|
}
|
||||||
MvpRef.get().bind();
|
MvpRef.get().bind();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -107,6 +124,9 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(String s) {
|
public void onNext(String s) {
|
||||||
|
if (MvpRef == null){
|
||||||
|
MvpRef=new WeakReference<>(mView);
|
||||||
|
}
|
||||||
MvpRef.get().withdrawal(s);
|
MvpRef.get().withdrawal(s);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -122,8 +142,29 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(List<WithdrawalBean> withdrawalBeans) {
|
public void onNext(List<WithdrawalBean> withdrawalBeans) {
|
||||||
|
if (MvpRef == null){
|
||||||
|
MvpRef=new WeakReference<>(mView);
|
||||||
|
}
|
||||||
MvpRef.get().withdrawalList(withdrawalBeans);
|
MvpRef.get().withdrawalList(withdrawalBeans);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindDetai(String userId, String type) {
|
||||||
|
api.bindDetai(userId, type, new BaseObserver<BindDetail>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(Disposable d) {
|
||||||
|
addDisposable(d);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(BindDetail bindDetail) {
|
||||||
|
if (MvpRef == null){
|
||||||
|
MvpRef=new WeakReference<>(mView);
|
||||||
|
}
|
||||||
|
MvpRef.get().bindDetai(bindDetail);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ public class HotListFragment extends BaseMvpFragment<HotListPresenter, FragmentH
|
|||||||
if ( ClickUtils.isFastDoubleClick()){
|
if ( ClickUtils.isFastDoubleClick()){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加索引有效性检查
|
// 添加索引有效性检查
|
||||||
if (position < 0 || position >= mAdapter.getData().size()) {
|
if (position < 0 || position >= mAdapter.getData().size()) {
|
||||||
return;
|
return;
|
||||||
@@ -127,11 +128,11 @@ public class HotListFragment extends BaseMvpFragment<HotListPresenter, FragmentH
|
|||||||
MessageListenerSingleton.getInstance().joinGroup(item.getRoom_id());
|
MessageListenerSingleton.getInstance().joinGroup(item.getRoom_id());
|
||||||
|
|
||||||
// 等待一段时间确保退出完成
|
// 等待一段时间确保退出完成
|
||||||
try {
|
// try {
|
||||||
Thread.sleep(500);
|
// Thread.sleep(500);
|
||||||
} catch (InterruptedException e) {
|
// } catch (InterruptedException e) {
|
||||||
Thread.currentThread().interrupt();
|
// Thread.currentThread().interrupt();
|
||||||
}
|
// }
|
||||||
RoomManager.getInstance().fetchRoomDataAndEnter(getActivity(), item.getRoom_id(), "");
|
RoomManager.getInstance().fetchRoomDataAndEnter(getActivity(), item.getRoom_id(), "");
|
||||||
// MvpPre.getRoomIn(item.getRoom_id(), "");
|
// MvpPre.getRoomIn(item.getRoom_id(), "");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -255,6 +255,21 @@ public class InputView extends LinearLayout implements View.OnClickListener, Tex
|
|||||||
return userInd;
|
return userInd;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isChock(){
|
||||||
|
userInd userInfo = getUserInfo();
|
||||||
|
|
||||||
|
if (userInfo != null) {
|
||||||
|
if (userInfo.getIs_can_chat() == 0) {
|
||||||
|
Toast.makeText(getContext(), "充值不足"+userInfo.getCan_chat_money()+"元,您无法发送消息", Toast.LENGTH_LONG).show();
|
||||||
|
ARouter.getInstance().build("/modulevocal/RechargeActivity").navigation();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
protected void init() {
|
protected void init() {
|
||||||
mAudioInputSwitchButton.setOnClickListener(this);
|
mAudioInputSwitchButton.setOnClickListener(this);
|
||||||
mEmojiInputButton.setOnClickListener(this);
|
mEmojiInputButton.setOnClickListener(this);
|
||||||
@@ -266,23 +281,13 @@ public class InputView extends LinearLayout implements View.OnClickListener, Tex
|
|||||||
public boolean onTouch(View view, MotionEvent motionEvent) {
|
public boolean onTouch(View view, MotionEvent motionEvent) {
|
||||||
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
|
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
|
||||||
|
|
||||||
userInd userInfo = getUserInfo();
|
if (isChock()) {
|
||||||
|
|
||||||
if (userInfo != null) {
|
|
||||||
if (userInfo.getIs_can_chat() == 0) {
|
|
||||||
Toast.makeText(getContext(), "充值不足"+userInfo.getCan_chat_money()+"元,您无法发送消息", Toast.LENGTH_LONG).show();
|
|
||||||
ARouter.getInstance().build("/modulevocal/RechargeActivity").navigation();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (presenter != null) {
|
if (presenter != null) {
|
||||||
presenter.scrollToNewestMessage();
|
presenter.scrollToNewestMessage();
|
||||||
}
|
}
|
||||||
showSoftInput();
|
showSoftInput();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -696,6 +701,7 @@ public class InputView extends LinearLayout implements View.OnClickListener, Tex
|
|||||||
"onClick id:" + view.getId() + "|voice_input_switch:" + R.id.voice_input_switch + "|face_btn:" + R.id.face_btn + "|more_btn:" + R.id.more_btn
|
"onClick id:" + view.getId() + "|voice_input_switch:" + R.id.voice_input_switch + "|face_btn:" + R.id.face_btn + "|more_btn:" + R.id.more_btn
|
||||||
+ "|send_btn:" + R.id.send_btn + "|mCurrentState:" + mCurrentState + "|mSendEnable:" + mSendEnable + "|mMoreInputEvent:" + mMoreInputEvent);
|
+ "|send_btn:" + R.id.send_btn + "|mCurrentState:" + mCurrentState + "|mSendEnable:" + mSendEnable + "|mMoreInputEvent:" + mMoreInputEvent);
|
||||||
if (view.getId() == R.id.voice_input_switch) {
|
if (view.getId() == R.id.voice_input_switch) {
|
||||||
|
if (isChock()) {
|
||||||
if (mCurrentState == STATE_FACE_INPUT || mCurrentState == STATE_ACTION_INPUT) {
|
if (mCurrentState == STATE_FACE_INPUT || mCurrentState == STATE_ACTION_INPUT) {
|
||||||
mCurrentState = STATE_VOICE_INPUT;
|
mCurrentState = STATE_VOICE_INPUT;
|
||||||
mInputMoreView.setVisibility(View.GONE);
|
mInputMoreView.setVisibility(View.GONE);
|
||||||
@@ -717,7 +723,9 @@ public class InputView extends LinearLayout implements View.OnClickListener, Tex
|
|||||||
mTextInput.setVisibility(VISIBLE);
|
mTextInput.setVisibility(VISIBLE);
|
||||||
showSoftInput();
|
showSoftInput();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (view.getId() == R.id.face_btn) {
|
} else if (view.getId() == R.id.face_btn) {
|
||||||
|
if (isChock()) {
|
||||||
mAudioInputSwitchButton.setImageResource(R.drawable.action_audio_selector);
|
mAudioInputSwitchButton.setImageResource(R.drawable.action_audio_selector);
|
||||||
if (mCurrentState == STATE_VOICE_INPUT) {
|
if (mCurrentState == STATE_VOICE_INPUT) {
|
||||||
mCurrentState = STATE_NONE_INPUT;
|
mCurrentState = STATE_NONE_INPUT;
|
||||||
@@ -734,7 +742,9 @@ public class InputView extends LinearLayout implements View.OnClickListener, Tex
|
|||||||
mEmojiInputButton.setImageResource(R.drawable.chat_input_keyboard);
|
mEmojiInputButton.setImageResource(R.drawable.chat_input_keyboard);
|
||||||
showFaceViewGroup();
|
showFaceViewGroup();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (view.getId() == R.id.more_btn) {
|
} else if (view.getId() == R.id.more_btn) {
|
||||||
|
if (isChock()) {
|
||||||
hideSoftInput();
|
hideSoftInput();
|
||||||
if (mMoreInputEvent instanceof View.OnClickListener) {
|
if (mMoreInputEvent instanceof View.OnClickListener) {
|
||||||
((View.OnClickListener) mMoreInputEvent).onClick(view);
|
((View.OnClickListener) mMoreInputEvent).onClick(view);
|
||||||
@@ -753,10 +763,13 @@ public class InputView extends LinearLayout implements View.OnClickListener, Tex
|
|||||||
mTextInput.setVisibility(VISIBLE);
|
mTextInput.setVisibility(VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (view.getId() == R.id.send_btn) {
|
} else if (view.getId() == R.id.send_btn) {
|
||||||
|
if (isChock()) {
|
||||||
sendTextMessage();
|
sendTextMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void sendTextMessage() {
|
private void sendTextMessage() {
|
||||||
if (mSendEnable) {
|
if (mSendEnable) {
|
||||||
|
|||||||
Reference in New Issue
Block a user