1:添加背包一键全清功能
2:添加查看心动值列表 3:修改进入小黑屋出现不能收到消息的问题
This commit is contained in:
@@ -149,10 +149,10 @@
|
|||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<!-- <intent-filter>-->
|
<intent-filter>
|
||||||
<!-- <action android:name="com.xscm.action.LAUNCH_PAGE" />-->
|
<action android:name="com.xscm.action.LAUNCH_PAGE" />
|
||||||
<!-- <category android:name="android.intent.category.DEFAULT" />-->
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<!-- </intent-filter>-->
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<!-- 配置APP ID -->
|
<!-- 配置APP ID -->
|
||||||
<meta-data
|
<meta-data
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ isBuildModule=false
|
|||||||
android.injected.testOnly=false
|
android.injected.testOnly=false
|
||||||
|
|
||||||
APP_VERSION_NAME=1.0.0
|
APP_VERSION_NAME=1.0.0
|
||||||
APP_VERSION_CODE=118
|
APP_VERSION_CODE=119
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -395,9 +395,7 @@ public class CommonAppContext extends MultiDexApplication {
|
|||||||
SpUtil.saveUserId(-1);
|
SpUtil.saveUserId(-1);
|
||||||
SpUtil.saveUserBean(new UserBean());
|
SpUtil.saveUserBean(new UserBean());
|
||||||
SpUtil.putToken("");
|
SpUtil.putToken("");
|
||||||
Intent intent = new Intent("com.xscm.action.LAUNCH_PAGE");
|
|
||||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
||||||
getApplicationContext().startActivity(intent);
|
|
||||||
// piaoPingManager.unsubscribe();
|
// piaoPingManager.unsubscribe();
|
||||||
FileUtils.deleteAllInDir(getCacheDir());
|
FileUtils.deleteAllInDir(getCacheDir());
|
||||||
FileUtils.deleteAllInDir(getExternalCacheDir());
|
FileUtils.deleteAllInDir(getExternalCacheDir());
|
||||||
@@ -408,7 +406,9 @@ public class CommonAppContext extends MultiDexApplication {
|
|||||||
// 发送广播通知所有Activity刷新状态
|
// 发送广播通知所有Activity刷新状态
|
||||||
Intent refreshIntent = new Intent("com.xscm.moduleutil.ACTION_USER_LOGOUT");
|
Intent refreshIntent = new Intent("com.xscm.moduleutil.ACTION_USER_LOGOUT");
|
||||||
sendBroadcast(refreshIntent);
|
sendBroadcast(refreshIntent);
|
||||||
|
Intent intent = new Intent("com.xscm.action.LAUNCH_PAGE");
|
||||||
|
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
getApplicationContext().startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isAlipayInstalled(Context context) {
|
public static boolean isAlipayInstalled(Context context) {
|
||||||
|
|||||||
@@ -100,6 +100,10 @@ public class EMMessageInfo implements MultiItemEntity {
|
|||||||
public static final int QXRoomMessageTypeMangH = 1056;
|
public static final int QXRoomMessageTypeMangH = 1056;
|
||||||
///巡乐会
|
///巡乐会
|
||||||
public static final int QXRoomMessageTypeXlh = 1057;
|
public static final int QXRoomMessageTypeXlh = 1057;
|
||||||
|
///在离线
|
||||||
|
public static final int QXRoomMessageTypezailx = 1058;
|
||||||
|
///清除个人魅力值
|
||||||
|
public static final int QXRoomMessageTypeQingGRMl = 1059;
|
||||||
|
|
||||||
///房间内换麦
|
///房间内换麦
|
||||||
public static final int QXRoomMessageTypehm = 1039;
|
public static final int QXRoomMessageTypehm = 1039;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class GiftLotteryContacts {
|
|||||||
public interface IRoomPre extends IPresenter {
|
public interface IRoomPre extends IPresenter {
|
||||||
void getGiftList(String giftBagId,String roomId);
|
void getGiftList(String giftBagId,String roomId);
|
||||||
|
|
||||||
void drawGiftList(String giftBagId,String gift_user_ids,String roomId,String num);
|
void drawGiftList(String giftBagId,String gift_user_ids,String roomId,String num,String heart_id);
|
||||||
|
|
||||||
void getMyRecord(String giftBagId,String page,String pageSize,int type);//我的抽奖记录 type: 1:我的抽奖 2:全服抽奖
|
void getMyRecord(String giftBagId,String page,String pageSize,int type);//我的抽奖记录 type: 1:我的抽奖 2:全服抽奖
|
||||||
|
|
||||||
|
|||||||
@@ -90,18 +90,20 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
private String blind_box_turntable_id = "";//本次抽奖标识id
|
private String blind_box_turntable_id = "";//本次抽奖标识id
|
||||||
private BlindBoxBean.XlhData xlhData;
|
private BlindBoxBean.XlhData xlhData;
|
||||||
private int icon;//金币金额
|
private int icon;//金币金额
|
||||||
|
private String heart_id="";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected GiftLotteryPresenter bindPresenter() {
|
protected GiftLotteryPresenter bindPresenter() {
|
||||||
return new GiftLotteryPresenter(this, getActivity());
|
return new GiftLotteryPresenter(this, getActivity());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GiftLotteryDialog newInstance(String giftBagId, String roomId, String userIds) {
|
public static GiftLotteryDialog newInstance(String giftBagId, String roomId, String userIds,String heart_id) {
|
||||||
GiftLotteryDialog dialog = new GiftLotteryDialog();
|
GiftLotteryDialog dialog = new GiftLotteryDialog();
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
args.putString("giftBagId", giftBagId);
|
args.putString("giftBagId", giftBagId);
|
||||||
args.putString("roomId", roomId);
|
args.putString("roomId", roomId);
|
||||||
args.putString("userIds", userIds);
|
args.putString("userIds", userIds);
|
||||||
|
args.putString("heart_id", heart_id);
|
||||||
dialog.setArguments(args);
|
dialog.setArguments(args);
|
||||||
return dialog;
|
return dialog;
|
||||||
}
|
}
|
||||||
@@ -126,6 +128,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
userIds = getArguments().getString("userIds");
|
userIds = getArguments().getString("userIds");
|
||||||
// 根据userIds确定类型
|
// 根据userIds确定类型
|
||||||
userIdType = LotteryEvent.fromLotteryEvent(giftBagId);
|
userIdType = LotteryEvent.fromLotteryEvent(giftBagId);
|
||||||
|
heart_id=getArguments().getString("heart_id");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -309,7 +312,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
isDrawing = true;
|
isDrawing = true;
|
||||||
// init(1);
|
// init(1);
|
||||||
startType = 1;
|
startType = 1;
|
||||||
MvpPre.drawGiftList(giftBagId, userIds, roomId, "1");
|
MvpPre.drawGiftList(giftBagId, userIds, roomId, "1",heart_id);
|
||||||
} else {
|
} else {
|
||||||
com.hjq.toast.ToastUtils.show("正在抽奖中...");
|
com.hjq.toast.ToastUtils.show("正在抽奖中...");
|
||||||
return;
|
return;
|
||||||
@@ -319,7 +322,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
isDrawing = true;
|
isDrawing = true;
|
||||||
// init(2);
|
// init(2);
|
||||||
startType = 2;
|
startType = 2;
|
||||||
MvpPre.drawGiftList(giftBagId, userIds, roomId, "10");
|
MvpPre.drawGiftList(giftBagId, userIds, roomId, "10",heart_id);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
com.hjq.toast.ToastUtils.show("正在抽奖中...");
|
com.hjq.toast.ToastUtils.show("正在抽奖中...");
|
||||||
@@ -329,7 +332,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
isDrawing = true;
|
isDrawing = true;
|
||||||
// init(3);
|
// init(3);
|
||||||
startType = 3;
|
startType = 3;
|
||||||
MvpPre.drawGiftList(giftBagId, userIds, roomId, "100");
|
MvpPre.drawGiftList(giftBagId, userIds, roomId, "100",heart_id);
|
||||||
} else {
|
} else {
|
||||||
com.hjq.toast.ToastUtils.show("正在抽奖中...");
|
com.hjq.toast.ToastUtils.show("正在抽奖中...");
|
||||||
}
|
}
|
||||||
@@ -811,7 +814,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
GiftBean giftBean = giftLists.get(j);
|
GiftBean giftBean = giftLists.get(j);
|
||||||
giftBean.setCount(reslutList.getCount());
|
giftBean.setCount(reslutList.getCount());
|
||||||
|
|
||||||
if (!isOpenSpecial) {
|
if (!isOpenSpecial || !isOpenSound) {
|
||||||
giftCardView.setVisibilitymResultTextView(true);
|
giftCardView.setVisibilitymResultTextView(true);
|
||||||
giftCardView.setSelected(true);
|
giftCardView.setSelected(true);
|
||||||
playSound("xuanz.mp3");
|
playSound("xuanz.mp3");
|
||||||
@@ -883,25 +886,25 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroyView() {
|
public void onDestroyView() {
|
||||||
super.onDestroyView();
|
super.onDestroyView();
|
||||||
releaseResources();
|
// releaseResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||||
super.onDismiss(dialog);
|
super.onDismiss(dialog);
|
||||||
releaseResources();
|
// releaseResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCancel(@NonNull DialogInterface dialog) {
|
public void onCancel(@NonNull DialogInterface dialog) {
|
||||||
super.onCancel(dialog);
|
super.onCancel(dialog);
|
||||||
releaseResources();
|
// releaseResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
releaseResources();
|
// releaseResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ public class GiftLotteryPresenter extends BasePresenter<GiftLotteryContacts.View
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGiftList(String giftBagId, String gift_user_ids, String roomId, String num) {
|
public void drawGiftList(String giftBagId, String gift_user_ids, String roomId, String num,String heart_id) {
|
||||||
api.drawGiftList(giftBagId, gift_user_ids, roomId, num, new BaseObserver<BlindReslutBean>() {
|
api.drawGiftList(giftBagId, gift_user_ids, roomId, num,heart_id, new BaseObserver<BlindReslutBean>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ import com.xscm.moduleutil.bean.RoomSearchResp;
|
|||||||
import com.xscm.moduleutil.bean.RoomSubsidy;
|
import com.xscm.moduleutil.bean.RoomSubsidy;
|
||||||
import com.xscm.moduleutil.bean.RoomTime;
|
import com.xscm.moduleutil.bean.RoomTime;
|
||||||
import com.xscm.moduleutil.bean.RoomTypeModel;
|
import com.xscm.moduleutil.bean.RoomTypeModel;
|
||||||
|
import com.xscm.moduleutil.bean.RoomUserCharmListBean;
|
||||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||||
import com.xscm.moduleutil.bean.SongMusicBean;
|
import com.xscm.moduleutil.bean.SongMusicBean;
|
||||||
import com.xscm.moduleutil.bean.ThemeBean;
|
import com.xscm.moduleutil.bean.ThemeBean;
|
||||||
@@ -738,7 +739,7 @@ public interface ApiServer {
|
|||||||
|
|
||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
@POST(Constants.POST_DRAW_GIFT_LIST)
|
@POST(Constants.POST_DRAW_GIFT_LIST)
|
||||||
Call<BaseModel<BlindReslutBean>> drawGiftList(@Field("gift_bag_id") String gift_bag_id, @Field("gift_user_ids") String gift_user_ids,@Field("room_id")String room_id,@Field("num")String num);
|
Call<BaseModel<BlindReslutBean>> drawGiftList(@Field("gift_bag_id") String gift_bag_id, @Field("gift_user_ids") String gift_user_ids,@Field("room_id")String room_id,@Field("num")String num,@Field("heart_id") String heart_id);
|
||||||
|
|
||||||
@GET(Constants.GET_MY_RECORD)
|
@GET(Constants.GET_MY_RECORD)
|
||||||
Call<BaseModel<List<GiftBean>>> getMyRecord(@Query("gift_bag_id")String gift_bag_id,@Query("page")String page,@Query("page_size")String page_size);
|
Call<BaseModel<List<GiftBean>>> getMyRecord(@Query("gift_bag_id")String gift_bag_id,@Query("page")String page,@Query("page_size")String page_size);
|
||||||
@@ -766,6 +767,10 @@ public interface ApiServer {
|
|||||||
|
|
||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
@POST(Constants.POST_GIFT_ALL_CLEAR)
|
@POST(Constants.POST_GIFT_ALL_CLEAR)
|
||||||
Call<BaseModel<String>> getGiftPack(@Field("room_id") String roomId,@Field("to_uid") String user_id);
|
Call<BaseModel<String>> getGiftPack(@Field("room_id") String roomId,@Field("to_uid") String user_id,@Field("heart_id") String heart_id);
|
||||||
|
|
||||||
|
@FormUrlEncoded
|
||||||
|
@POST(Constants.POST_ROOM_USER_CHARM_LIST)
|
||||||
|
Call<BaseModel<List<RoomUserCharmListBean>>> roomUserCharmList(@Field("room_id") String roomId,@Field("user_id") String user_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ import com.xscm.moduleutil.bean.RoomSubsidy;
|
|||||||
import com.xscm.moduleutil.bean.RoomSubsidyDetails;
|
import com.xscm.moduleutil.bean.RoomSubsidyDetails;
|
||||||
import com.xscm.moduleutil.bean.RoomTime;
|
import com.xscm.moduleutil.bean.RoomTime;
|
||||||
import com.xscm.moduleutil.bean.RoomTypeModel;
|
import com.xscm.moduleutil.bean.RoomTypeModel;
|
||||||
|
import com.xscm.moduleutil.bean.RoomUserCharmListBean;
|
||||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||||
import com.xscm.moduleutil.bean.SongMusicBean;
|
import com.xscm.moduleutil.bean.SongMusicBean;
|
||||||
import com.xscm.moduleutil.bean.ThemeBean;
|
import com.xscm.moduleutil.bean.ThemeBean;
|
||||||
@@ -457,8 +458,8 @@ public class RetrofitClient {
|
|||||||
sApiServer.giftPack().compose(new DefaultTransformer<>()).subscribe(observer);
|
sApiServer.giftPack().compose(new DefaultTransformer<>()).subscribe(observer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getGiftPack(String roomId, String userId,BaseObserver<String> observer){
|
public void getGiftPack(String roomId, String userId, String heart_id,BaseObserver<String> observer){
|
||||||
sApiServer.getGiftPack(roomId,userId).enqueue(new Callback<BaseModel<String>>() {
|
sApiServer.getGiftPack(roomId,userId,heart_id).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) {
|
||||||
if (response.code() == 200){
|
if (response.code() == 200){
|
||||||
@@ -2334,8 +2335,8 @@ public class RetrofitClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
///盲盒转盘抽奖
|
///盲盒转盘抽奖
|
||||||
public void drawGiftList(String giftBagId, String gift_user_ids, String roomId, String num,BaseObserver<BlindReslutBean> observer){
|
public void drawGiftList(String giftBagId, String gift_user_ids, String roomId, String num,String heart_id,BaseObserver<BlindReslutBean> observer){
|
||||||
sApiServer.drawGiftList(giftBagId, gift_user_ids, roomId, num).enqueue(new Callback<BaseModel<BlindReslutBean>>() {
|
sApiServer.drawGiftList(giftBagId, gift_user_ids, roomId, num,heart_id).enqueue(new Callback<BaseModel<BlindReslutBean>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<BlindReslutBean>> call, Response<BaseModel<BlindReslutBean>> response) {
|
public void onResponse(Call<BaseModel<BlindReslutBean>> call, Response<BaseModel<BlindReslutBean>> response) {
|
||||||
if (response.code() == 200) {
|
if (response.code() == 200) {
|
||||||
@@ -2441,4 +2442,25 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void roomUserCharmList(String room_id, String user_id, BaseObserver<List<RoomUserCharmListBean>> observer){
|
||||||
|
sApiServer.roomUserCharmList(room_id,user_id).enqueue(new Callback<BaseModel<List<RoomUserCharmListBean>>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<BaseModel<List<RoomUserCharmListBean>>> call, Response<BaseModel<List<RoomUserCharmListBean>>> response) {
|
||||||
|
if (response.code()==200){
|
||||||
|
BaseModel<List<RoomUserCharmListBean>> baseModel = response.body();
|
||||||
|
if (baseModel.getCode()==1){
|
||||||
|
observer.onNext(baseModel.getData());
|
||||||
|
}else if (baseModel.getCode()==0){
|
||||||
|
observer.onNext(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<BaseModel<List<RoomUserCharmListBean>>> call, Throwable t) {
|
||||||
|
t.printStackTrace();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -293,13 +293,13 @@ public class MessageListenerSingleton {
|
|||||||
V2TIMManager.getInstance().quitGroup("room" + mRoomId, new V2TIMCallback() {
|
V2TIMManager.getInstance().quitGroup("room" + mRoomId, new V2TIMCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
LogUtils.d("退出群组成功");
|
LogUtils.d("@@@","退出群组成功"+mRoomId);
|
||||||
// removeAllListeners(); // 移除所有监听器
|
// removeAllListeners(); // 移除所有监听器
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(int code, String desc) {
|
public void onError(int code, String desc) {
|
||||||
LogUtils.d("退出群组失败", code, desc);
|
LogUtils.d("@@@","退出群组失败"+mRoomId, code, desc);
|
||||||
// removeAllListeners(); // 即使失败也移除监听器
|
// removeAllListeners(); // 即使失败也移除监听器
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -313,6 +313,7 @@ public class MessageListenerSingleton {
|
|||||||
isInitialized = false;
|
isInitialized = false;
|
||||||
// instance = null;
|
// instance = null;
|
||||||
quitGroup(roomId);
|
quitGroup(roomId);
|
||||||
|
LogUtils.e("@@@","重置成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,6 @@ public class RewardGiftContacts {
|
|||||||
void roomAuctionJoin(String auction_id,String user_id, String gift_id, String num,String type);
|
void roomAuctionJoin(String auction_id,String user_id, String gift_id, String num,String type);
|
||||||
void giftPack();
|
void giftPack();
|
||||||
|
|
||||||
void getGiftPack(String roomId,String userId);
|
void getGiftPack(String roomId,String userId,String heart_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -210,8 +210,8 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getGiftPack(String roomId,String userId) {
|
public void getGiftPack(String roomId,String userId,String heart_id) {
|
||||||
api.getGiftPack(roomId,userId, new BaseObserver<String>() {
|
api.getGiftPack(roomId,userId,heart_id, new BaseObserver<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
addDisposable(d);
|
addDisposable(d);
|
||||||
|
|||||||
@@ -411,17 +411,19 @@ public class AgoraManager {
|
|||||||
@SuppressLint("SuspiciousIndentation")
|
@SuppressLint("SuspiciousIndentation")
|
||||||
public void setLocalAudioEnabled(boolean enabled, String userId) {
|
public void setLocalAudioEnabled(boolean enabled, String userId) {
|
||||||
if (rtcEngine != null) {
|
if (rtcEngine != null) {
|
||||||
if (userId.equals(SpUtil.getUserId()+"")) {
|
if (userId != null) {
|
||||||
rtcEngine.enableLocalAudio(enabled); // 启用/禁用音频采集
|
if (userId.equals(SpUtil.getUserId() + "")) {
|
||||||
}
|
rtcEngine.enableLocalAudio(enabled); // 启用/禁用音频采集
|
||||||
this.isLocalAudioEnabled = enabled;
|
}
|
||||||
if (!enabled) {
|
this.isLocalAudioEnabled = enabled;
|
||||||
for (SoundLevelUpdateListener listener : soundLevelUpdateListeners) {
|
if (!enabled) {
|
||||||
if (listener != null) {
|
for (SoundLevelUpdateListener listener : soundLevelUpdateListeners) {
|
||||||
ThreadUtils.runOnUiThread(() -> {
|
if (listener != null) {
|
||||||
// 远程用户音量变化
|
ThreadUtils.runOnUiThread(() -> {
|
||||||
listener.onRemoteSoundLevelUpdate(userId, 0);
|
// 远程用户音量变化
|
||||||
});
|
listener.onRemoteSoundLevelUpdate(userId, 0);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -466,6 +468,7 @@ public class AgoraManager {
|
|||||||
if (rtcEngine == null) {
|
if (rtcEngine == null) {
|
||||||
init(CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId());
|
init(CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId());
|
||||||
}
|
}
|
||||||
|
// 正确做法
|
||||||
rtcEngine.muteLocalAudioStreamEx(enabled, connection);
|
rtcEngine.muteLocalAudioStreamEx(enabled, connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -248,16 +248,11 @@ public class AvatarFrameView extends FrameLayout implements IAnimListener {
|
|||||||
private void playNextFromQueue() {
|
private void playNextFromQueue() {
|
||||||
// if (isDestroyed) return;
|
// if (isDestroyed) return;
|
||||||
// 确保在主线程中执行
|
// 确保在主线程中执行
|
||||||
if (Looper.myLooper() != Looper.getMainLooper()) {
|
// if (Looper.myLooper() != Looper.getMainLooper()) {
|
||||||
mainHandler.post(this::playNextFromQueue);
|
// mainHandler.post(this::playNextFromQueue);
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 再次检查内存状态
|
|
||||||
// if (isMemoryLow()) {
|
|
||||||
// LogUtils.w(TAG, "Low memory, clearing queue");
|
|
||||||
// clearQueue();
|
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// 检查特效是否开启
|
// 检查特效是否开启
|
||||||
if (SpUtil.getOpenEffect() != 1) {
|
if (SpUtil.getOpenEffect() != 1) {
|
||||||
clearQueue();
|
clearQueue();
|
||||||
@@ -986,16 +981,14 @@ public class AvatarFrameView extends FrameLayout implements IAnimListener {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
private void clearPrevious() {
|
private void clearPrevious() {
|
||||||
// if (isDestroyed) return;
|
|
||||||
// 确保在主线程中执行
|
// 确保在主线程中执行
|
||||||
if (Looper.myLooper() != Looper.getMainLooper()) {
|
// if (Looper.myLooper() != Looper.getMainLooper()) {
|
||||||
mainHandler.post(() -> {
|
// mainHandler.post(() -> {
|
||||||
// if (!isDestroyed) {
|
// clearPrevious();
|
||||||
clearPrevious();
|
//// }
|
||||||
// }
|
// });
|
||||||
});
|
// return;
|
||||||
return;
|
// }
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
// 停止并清理 ExoPlayer
|
// 停止并清理 ExoPlayer
|
||||||
// if (exoPlayer != null) {
|
// if (exoPlayer != null) {
|
||||||
|
|||||||
@@ -385,6 +385,7 @@ public class Constants {
|
|||||||
public static final String POST_XLH_ALL_RECORD = "/api/BlindBoxTurntable/get_xlh_all_record";///巡乐会榜单
|
public static final String POST_XLH_ALL_RECORD = "/api/BlindBoxTurntable/get_xlh_all_record";///巡乐会榜单
|
||||||
public static final String GET_XLH_MY_RECORD = "/api/BlindBoxTurntable/get_xlh_my_record";///巡乐会记录
|
public static final String GET_XLH_MY_RECORD = "/api/BlindBoxTurntable/get_xlh_my_record";///巡乐会记录
|
||||||
public static final String POST_GIFT_ALL_CLEAR = "/api/Room/room_gift_all_clear";///背包礼物全清
|
public static final String POST_GIFT_ALL_CLEAR = "/api/Room/room_gift_all_clear";///背包礼物全清
|
||||||
|
public static final String POST_ROOM_USER_CHARM_LIST = "/api/Room/room_user_charm_list";///房间用户当前魅力值列表
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,16 @@ public class RoomFriendshipWheatView extends BaseWheatView {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mCharmView.setOnClickListener(new OnClickListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if (mOnCharmClickListener != null && pitBean != null){
|
||||||
|
mOnCharmClickListener.onCharmClick(RoomFriendshipWheatView.this, pitBean);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -303,6 +313,12 @@ public class RoomFriendshipWheatView extends BaseWheatView {
|
|||||||
this.mOnZhulClickListener = listener;
|
this.mOnZhulClickListener = listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private onCharmClickListener mOnCharmClickListener;
|
||||||
|
|
||||||
|
public void setmOnCharmClickListener(onCharmClickListener mOnCharmClickListener) {
|
||||||
|
this.mOnCharmClickListener = mOnCharmClickListener;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void unRegister(Object obj) {
|
public void unRegister(Object obj) {
|
||||||
|
|
||||||
@@ -311,4 +327,8 @@ public class RoomFriendshipWheatView extends BaseWheatView {
|
|||||||
public interface OnZhulClickListener {
|
public interface OnZhulClickListener {
|
||||||
void onZhulClick(RoomFriendshipWheatView view, RoomPitBean pitBean);
|
void onZhulClick(RoomFriendshipWheatView view, RoomPitBean pitBean);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public interface onCharmClickListener{
|
||||||
|
void onCharmClick(RoomFriendshipWheatView view, RoomPitBean pitBean);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,14 @@ public class RoomKtvWheatView extends BaseWheatView {
|
|||||||
public RoomKtvWheatView(Context context, AttributeSet attrs, int defStyleAttr) {
|
public RoomKtvWheatView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||||
super(context, attrs, defStyleAttr);
|
super(context, attrs, defStyleAttr);
|
||||||
}
|
}
|
||||||
|
private onCharmClickListener mOnCharmClickListener;
|
||||||
|
|
||||||
|
public void setmOnCharmClickListener(onCharmClickListener mOnCharmClickListener) {
|
||||||
|
this.mOnCharmClickListener = mOnCharmClickListener;
|
||||||
|
}
|
||||||
|
public interface onCharmClickListener{
|
||||||
|
void onCharmClick(RoomKtvWheatView view, RoomPitBean pitBean);
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void initPit(Context context, AttributeSet attrs) {
|
protected void initPit(Context context, AttributeSet attrs) {
|
||||||
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.RoomDefaultWheatView);
|
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.RoomDefaultWheatView);
|
||||||
@@ -45,6 +52,16 @@ public class RoomKtvWheatView extends BaseWheatView {
|
|||||||
mIvTagBoss = findViewById(R.id.iv_tag_boos);
|
mIvTagBoss = findViewById(R.id.iv_tag_boos);
|
||||||
mTvTime = findViewById(R.id.tv_time);
|
mTvTime = findViewById(R.id.tv_time);
|
||||||
tv_time_pk = findViewById(R.id.tv_time_pk);
|
tv_time_pk = findViewById(R.id.tv_time_pk);
|
||||||
|
|
||||||
|
mCharmView.setOnClickListener(new OnClickListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if (mOnCharmClickListener != null && pitBean != null){
|
||||||
|
mOnCharmClickListener.onCharmClick(RoomKtvWheatView.this, pitBean);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -51,8 +51,38 @@ public class RoomMakeWheatView extends BaseWheatView {
|
|||||||
iv_tag_type=findViewById(R.id.iv_tag_type);
|
iv_tag_type=findViewById(R.id.iv_tag_type);
|
||||||
mCharmView = findViewById(R.id.charm_view);
|
mCharmView = findViewById(R.id.charm_view);
|
||||||
mRiv.setImageResource(pitImageVId);
|
mRiv.setImageResource(pitImageVId);
|
||||||
|
|
||||||
|
if (mTvTime != null) {
|
||||||
|
mTvTime.setOnClickListener(v -> {
|
||||||
|
// 处理魅力值点击
|
||||||
|
if (mOnCharmClickListener != null && pitBean != null) {
|
||||||
|
mOnCharmClickListener.onCharmClick(this, pitBean);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void setOnClickListener(OnClickListener l) {
|
||||||
|
// // 保存外部设置的点击监听器
|
||||||
|
// this.onWholeViewClickListener = l;
|
||||||
|
// super.setOnClickListener(l);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 为子组件设置点击监听器时,确保不会拦截父容器的点击事件
|
||||||
|
public void setupChildClickListeners() {
|
||||||
|
if (mRiv != null) {
|
||||||
|
mRiv.setOnClickListener(v -> {
|
||||||
|
// 处理头像点击
|
||||||
|
if (onWholeViewClickListener != null) {
|
||||||
|
onWholeViewClickListener.onClick(this);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
private OnClickListener onWholeViewClickListener;
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
return R.layout.room_view_make_wheat;
|
return R.layout.room_view_make_wheat;
|
||||||
@@ -130,8 +160,27 @@ public class RoomMakeWheatView extends BaseWheatView {
|
|||||||
iv_tag_type.setVisibility(GONE);
|
iv_tag_type.setVisibility(GONE);
|
||||||
mCharmView.setVisibility(GONE);
|
mCharmView.setVisibility(GONE);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
// mCharmView.setOnClickListener(new OnClickListener() {
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onClick(View v) {
|
||||||
|
// if (mOnCharmClickListener != null && pitBean != null){
|
||||||
|
// mOnCharmClickListener.onCharmClick(RoomMakeWheatView.this, pitBean);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
}
|
||||||
|
private onCharmClickListener mOnCharmClickListener;
|
||||||
|
//
|
||||||
|
public void setmOnCharmClickListener(onCharmClickListener mOnCharmClickListener) {
|
||||||
|
this.mOnCharmClickListener = mOnCharmClickListener;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
public interface onCharmClickListener{
|
||||||
|
void onCharmClick(RoomMakeWheatView view, RoomPitBean pitBean);
|
||||||
|
}
|
||||||
public void setChe(String che){
|
public void setChe(String che){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import android.widget.LinearLayout;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.hjq.toast.ToastUtils;
|
||||||
import com.xscm.moduleutil.R;
|
import com.xscm.moduleutil.R;
|
||||||
import com.xscm.moduleutil.bean.UserOnlineStatusBean;
|
import com.xscm.moduleutil.bean.UserOnlineStatusBean;
|
||||||
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
||||||
@@ -36,6 +37,8 @@ public class WheatLayoutSingManager {
|
|||||||
|
|
||||||
void onMakeWheatClick(RoomSingSongWheatView view, int pitNumber);
|
void onMakeWheatClick(RoomSingSongWheatView view, int pitNumber);
|
||||||
|
|
||||||
|
void onMeilingClick(RoomSingSongWheatView view, int pitNumber);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private @Nullable OnWheatClickListener wheatClickListener;
|
private @Nullable OnWheatClickListener wheatClickListener;
|
||||||
@@ -101,14 +104,28 @@ public class WheatLayoutSingManager {
|
|||||||
params.setMargins(20, 20, 20, 20);
|
params.setMargins(20, 20, 20, 20);
|
||||||
singleWheatView.setLayoutParams(params);
|
singleWheatView.setLayoutParams(params);
|
||||||
|
|
||||||
// 添加点击事件
|
GifAvatarOvalView avatarView = (GifAvatarOvalView) singleWheatView.mRiv;
|
||||||
singleWheatView.setOnClickListener(v -> {
|
avatarView.setOnClickListener(v -> {
|
||||||
if (wheatClickListener != null) {
|
if (wheatClickListener != null) {
|
||||||
wheatClickListener.onWheatClick(singleWheatView, pitNumber);
|
wheatClickListener.onWheatClick(singleWheatView, pitNumber);
|
||||||
}
|
}
|
||||||
restoreMultiWheat();
|
restoreMultiWheat();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
WheatCharmView charmView = singleWheatView.mCharmView;
|
||||||
|
charmView.setOnClickListener(v -> {
|
||||||
|
if (wheatClickListener != null) {
|
||||||
|
wheatClickListener.onMeilingClick(singleWheatView, Integer.parseInt(singleWheatView.pitNumber));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// // 添加点击事件
|
||||||
|
singleWheatView.setOnClickListener(v -> {
|
||||||
|
if (wheatClickListener != null) {
|
||||||
|
wheatClickListener.onMakeWheatClick(singleWheatView, pitNumber);
|
||||||
|
}
|
||||||
|
restoreMultiWheat();
|
||||||
|
});
|
||||||
|
|
||||||
container.addView(singleWheatView);
|
container.addView(singleWheatView);
|
||||||
isSingleMode = true;
|
isSingleMode = true;
|
||||||
currentSinglePit = pitNumber;
|
currentSinglePit = pitNumber;
|
||||||
@@ -168,9 +185,26 @@ public class WheatLayoutSingManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
wheatView.setLayoutParams(params);
|
wheatView.setLayoutParams(params);
|
||||||
|
|
||||||
|
|
||||||
|
GifAvatarOvalView avatarView = (GifAvatarOvalView) wheatView.mRiv;
|
||||||
|
avatarView.setOnClickListener(v -> {
|
||||||
|
if (wheatClickListener != null) {
|
||||||
|
wheatClickListener.onWheatClick(wheatView, pitNumber);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
WheatCharmView charmView = wheatView.mCharmView;
|
||||||
|
charmView.setOnClickListener(v -> {
|
||||||
|
if (wheatClickListener != null) {
|
||||||
|
ToastUtils.show("点击了麦位");
|
||||||
|
wheatClickListener.onMeilingClick(wheatView, pitNumber);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
wheatView.setOnClickListener(v -> {
|
wheatView.setOnClickListener(v -> {
|
||||||
if (wheatClickListener != null) {
|
if (wheatClickListener != null) {
|
||||||
wheatClickListener.onWheatClick(wheatView, Integer.parseInt(wheatView.pitNumber));
|
wheatClickListener.onMeilingClick(wheatView, Integer.parseInt(wheatView.pitNumber));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,13 @@
|
|||||||
<!-- app:layout_constraintHeight_percent="0.5"-->
|
<!-- app:layout_constraintHeight_percent="0.5"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!--头像 - 占整体高度的一半-->
|
<!--头像 - 占整体高度的一半-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--头像框 - 比头像大2dp-->
|
||||||
|
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
||||||
android:id="@+id/riv"
|
android:id="@+id/riv"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -41,7 +48,22 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintDimensionRatio="1:1"
|
app:layout_constraintDimensionRatio="1:1"
|
||||||
app:layout_constraintHeight_default="percent"
|
app:layout_constraintHeight_default="percent"
|
||||||
app:layout_constraintHeight_percent="0.5" />
|
app:layout_constraintHeight_percent="0.52" />
|
||||||
|
|
||||||
|
<com.xscm.moduleutil.widget.AvatarFrameView
|
||||||
|
android:id="@+id/iv_frame"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:contentDescription="@null"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
app:autoPlay="true"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/riv"
|
||||||
|
app:layout_constraintDimensionRatio="1:1"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:loopCount="0"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<com.opensource.svgaplayer.SVGAImageView
|
<com.opensource.svgaplayer.SVGAImageView
|
||||||
android:id="@+id/iv_ripple"
|
android:id="@+id/iv_ripple"
|
||||||
@@ -57,25 +79,6 @@
|
|||||||
app:loopCount="0"
|
app:loopCount="0"
|
||||||
app:source="ripple3695.svga" />
|
app:source="ripple3695.svga" />
|
||||||
|
|
||||||
<!--头像框 - 比头像大2dp-->
|
|
||||||
<com.xscm.moduleutil.widget.AvatarFrameView
|
|
||||||
android:id="@+id/iv_frame"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:scaleType="fitCenter"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/riv"
|
|
||||||
app:layout_constraintStart_toStartOf="@id/riv"
|
|
||||||
app:layout_constraintEnd_toEndOf="@id/riv"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/riv"
|
|
||||||
android:layout_marginTop="-1dp"
|
|
||||||
android:layout_marginStart="-1dp"
|
|
||||||
android:layout_marginEnd="-1dp"
|
|
||||||
android:layout_marginBottom="-1dp" />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--离线状态 - 和头像框一样大,在标签下面-->
|
<!--离线状态 - 和头像框一样大,在标签下面-->
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|||||||
@@ -242,9 +242,13 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setLikeZone() {
|
public void setLikeZone(int type) {
|
||||||
// MvpPre.topicId(zone_id, 2);
|
if (type == 1){
|
||||||
finish();
|
finish();
|
||||||
|
}else {
|
||||||
|
MvpPre.topicId(zone_id, 2);
|
||||||
|
}
|
||||||
|
// finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ public class DynamicListActivity extends BaseMvpActivity<CirclePresenter, Activi
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setLikeZone() {
|
public void setLikeZone(int type) {
|
||||||
// ToastUtils.show("成功");
|
// ToastUtils.show("成功");
|
||||||
// MvpPre.topicId(heatedBean.getTopic_id(),1);
|
// MvpPre.topicId(heatedBean.getTopic_id(),1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class CircleContacts {
|
|||||||
|
|
||||||
void setExpandColumn(List<ExpandColumnBean> list);
|
void setExpandColumn(List<ExpandColumnBean> list);
|
||||||
|
|
||||||
void setLikeZone();
|
void setLikeZone(int type);
|
||||||
|
|
||||||
void setCircleDetail(CircleListBean bean);
|
void setCircleDetail(CircleListBean bean);
|
||||||
|
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setLikeZone() {
|
public void setLikeZone(int type) {
|
||||||
MvpPre.getCircleList(page + "", "10");
|
MvpPre.getCircleList(page + "", "10");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCir
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setLikeZone() {
|
public void setLikeZone(int type) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ public class ExpandColumnFragment extends BaseMvpFragment<CirclePresenter, Fragm
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setLikeZone() {
|
public void setLikeZone(int type) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public class CirclePresenter extends BasePresenter<CircleContacts.View> implemen
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(String s) {
|
public void onNext(String s) {
|
||||||
MvpRef.get().setLikeZone();
|
MvpRef.get().setLikeZone(2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -146,7 +146,7 @@ public class CirclePresenter extends BasePresenter<CircleContacts.View> implemen
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(String s) {
|
public void onNext(String s) {
|
||||||
MvpRef.get().setLikeZone();
|
MvpRef.get().setLikeZone(1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import android.graphics.drawable.ColorDrawable;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.CountDownTimer;
|
import android.os.CountDownTimer;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
|
import android.os.StrictMode;
|
||||||
import android.text.Spannable;
|
import android.text.Spannable;
|
||||||
import android.text.SpannableStringBuilder;
|
import android.text.SpannableStringBuilder;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
@@ -57,6 +58,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
|||||||
import com.alibaba.android.arouter.facade.annotation.Autowired;
|
import com.alibaba.android.arouter.facade.annotation.Autowired;
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
|
import com.blankj.utilcode.BuildConfig;
|
||||||
import com.blankj.utilcode.util.GsonUtils;
|
import com.blankj.utilcode.util.GsonUtils;
|
||||||
import com.blankj.utilcode.util.LogUtils;
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
import com.blankj.utilcode.util.ThreadUtils;
|
import com.blankj.utilcode.util.ThreadUtils;
|
||||||
@@ -213,7 +215,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
private PublicScreenEaseChatFragment publicScreenFragment; // 添加成员变量
|
private PublicScreenEaseChatFragment publicScreenFragment; // 添加成员变量
|
||||||
// 添加成员变量
|
// 添加成员变量
|
||||||
private boolean isLayoutAdjusted = false;
|
private boolean isLayoutAdjusted = false;
|
||||||
// private ViewStub stub;
|
// private ViewStub stub;
|
||||||
private static WeakReference<RoomActivity> sActivityRef;
|
private static WeakReference<RoomActivity> sActivityRef;
|
||||||
// 存储当前显示的弹框引用
|
// 存储当前显示的弹框引用
|
||||||
private List<DialogInterface> activeDialogs = new ArrayList<>();
|
private List<DialogInterface> activeDialogs = new ArrayList<>();
|
||||||
@@ -227,6 +229,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
public void addActiveDialogFragment(Fragment dialogFragment) {
|
public void addActiveDialogFragment(Fragment dialogFragment) {
|
||||||
activeDialogFragments.add(dialogFragment);
|
activeDialogFragments.add(dialogFragment);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onNewIntent(Intent intent) {
|
protected void onNewIntent(Intent intent) {
|
||||||
password = intent.getStringExtra("password");
|
password = intent.getStringExtra("password");
|
||||||
@@ -253,6 +256,37 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// @Override
|
||||||
|
// public boolean dispatchTouchEvent(MotionEvent ev) {
|
||||||
|
// // 获取触摸位置的坐标
|
||||||
|
// float x = ev.getX();
|
||||||
|
// float y = ev.getY();
|
||||||
|
//
|
||||||
|
// // 找到 BFragment
|
||||||
|
// Fragment fragment = getSupportFragmentManager().findFragmentByTag("RoomKtvFragment");
|
||||||
|
// if (fragment instanceof RoomKtvFragment) {
|
||||||
|
// // 获取负 margin 的视图
|
||||||
|
// View negativeMarginView = ((RoomKtvFragment) fragment).getNegativeMarginView();
|
||||||
|
// if (negativeMarginView != null) {
|
||||||
|
// // 计算视图在屏幕上的位置
|
||||||
|
// int[] location = new int[2];
|
||||||
|
// negativeMarginView.getLocationOnScreen(location);
|
||||||
|
// int viewX = location[0];
|
||||||
|
// int viewY = location[1];
|
||||||
|
// int viewWidth = negativeMarginView.getWidth();
|
||||||
|
// int viewHeight = negativeMarginView.getHeight();
|
||||||
|
//
|
||||||
|
// // 检查触摸点是否在视图范围内
|
||||||
|
// if (x >= viewX && x <= viewX + viewWidth &&
|
||||||
|
// y >= viewY && y <= viewY + viewHeight) {
|
||||||
|
// // 将事件传递给该视图
|
||||||
|
// return negativeMarginView.dispatchTouchEvent(ev);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return super.dispatchTouchEvent(ev);
|
||||||
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
||||||
@@ -263,7 +297,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearData(){
|
public void clearData() {
|
||||||
publicScreenFragment.someMethod();
|
publicScreenFragment.someMethod();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -350,6 +384,16 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
// MvpPre.getRoomOnline(roomId, "1", "10");
|
// MvpPre.getRoomOnline(roomId, "1", "10");
|
||||||
// 在子线程中执行网络请求
|
// 在子线程中执行网络请求
|
||||||
performNetworkRequestsAsync();
|
performNetworkRequestsAsync();
|
||||||
|
|
||||||
|
// if (BuildConfig.DEBUG) {
|
||||||
|
// StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
|
||||||
|
// .detectDiskReads()
|
||||||
|
// .detectDiskWrites()
|
||||||
|
// .detectNetwork()
|
||||||
|
// .penaltyLog()
|
||||||
|
// .build());
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -370,10 +414,8 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
// 切换到主线程执行实际的网络请求
|
// 切换到主线程执行实际的网络请求
|
||||||
runOnUiThread(() -> {
|
runOnUiThread(() -> {
|
||||||
// 使用Handler确保在主线程中调用
|
// 使用Handler确保在主线程中调用
|
||||||
new android.os.Handler(Looper.getMainLooper()).post(() -> {
|
MvpPre.getRoomIn(roomId, password);
|
||||||
MvpPre.getRoomIn(roomId, password);
|
MvpPre.getRoomOnline(roomId, "1", "10");
|
||||||
MvpPre.getRoomOnline(roomId, "1", "10");
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -470,7 +512,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
});
|
});
|
||||||
|
|
||||||
ViewGroup.LayoutParams layoutParams = mBinding.roomTop.getRoot().getLayoutParams();
|
ViewGroup.LayoutParams layoutParams = mBinding.roomTop.getRoot().getLayoutParams();
|
||||||
layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT; // 使用你定义的getWidth方法
|
layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT; // 使用你定义的getWidth方法
|
||||||
layoutParams.height = SystemUtils.getWidth(74); // 示例高度
|
layoutParams.height = SystemUtils.getWidth(74); // 示例高度
|
||||||
mBinding.roomTop.getRoot().setLayoutParams(layoutParams);
|
mBinding.roomTop.getRoot().setLayoutParams(layoutParams);
|
||||||
|
|
||||||
@@ -485,8 +527,8 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (giftGiveEvent.auction_id!=null && !giftGiveEvent.auction_id.isEmpty()){
|
if (giftGiveEvent.auction_id != null && !giftGiveEvent.auction_id.isEmpty()) {
|
||||||
RetrofitClient.getInstance().roomAuctionJoin(giftGiveEvent.getAuction_id(), giftGiveEvent.getUserId(),giftGiveEvent.getRoonGiftModel().getGift_id(), giftGiveEvent.getNum(), "1", new BaseObserver<RoomAuction.AuctionListBean>() {
|
RetrofitClient.getInstance().roomAuctionJoin(giftGiveEvent.getAuction_id(), giftGiveEvent.getUserId(), giftGiveEvent.getRoonGiftModel().getGift_id(), giftGiveEvent.getNum(), "1", new BaseObserver<RoomAuction.AuctionListBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
// showGiftGiveProgress();
|
// showGiftGiveProgress();
|
||||||
@@ -496,6 +538,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
public void onNext(RoomAuction.AuctionListBean auctionListBean) {
|
public void onNext(RoomAuction.AuctionListBean auctionListBean) {
|
||||||
showGiftGiveProgress();
|
showGiftGiveProgress();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e) {
|
public void onError(Throwable e) {
|
||||||
super.onError(e);
|
super.onError(e);
|
||||||
@@ -514,7 +557,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}else {
|
} else {
|
||||||
|
|
||||||
RetrofitClient.getInstance().roomGift(giftGiveEvent.getRoom_id(), giftGiveEvent.getRoonGiftModel().getGift_id(), giftGiveEvent.getNum(), giftGiveEvent.getUserId(), "1", giftGiveEvent.getPit(), giftGiveEvent.heart_id, new BaseObserver<String>() {
|
RetrofitClient.getInstance().roomGift(giftGiveEvent.getRoom_id(), giftGiveEvent.getRoonGiftModel().getGift_id(), giftGiveEvent.getNum(), giftGiveEvent.getUserId(), "1", giftGiveEvent.getPit(), giftGiveEvent.heart_id, new BaseObserver<String>() {
|
||||||
@Override
|
@Override
|
||||||
@@ -844,8 +887,20 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
handleMsgType1016(messageEvent, text);
|
handleMsgType1016(messageEvent, text);
|
||||||
} else if (msgType == 1039) {
|
} else if (msgType == 1039) {
|
||||||
handleMsgType1039(messageEvent, text);
|
handleMsgType1039(messageEvent, text);
|
||||||
}else if (msgType==1028){
|
} else if (msgType == 1028) {
|
||||||
roomFragment.handleMsgType1028(messageEvent);
|
roomFragment.handleMsgType1028(messageEvent);
|
||||||
|
} else if (msgType == 1059) {//清除个人魅力
|
||||||
|
if (mRoomInfoResp.getRoom_info().getType_id().equals("1") || mRoomInfoResp.getRoom_info().getType_id().equals("3") || mRoomInfoResp.getRoom_info().getType_id().equals("4")) {
|
||||||
|
if (mRoomInfoResp.getRoom_info().getLabel_id().equals("1")) {
|
||||||
|
roomFragment.SingSongEvent(messageEvent);
|
||||||
|
} else {
|
||||||
|
roomFragment.KtvFragmentEvent(messageEvent);
|
||||||
|
}
|
||||||
|
} else if (mRoomInfoResp.getRoom_info().getType_id().equals("2")) {
|
||||||
|
roomFragment.handleAuctionMessageEvent(messageEvent);
|
||||||
|
} else if (mRoomInfoResp.getRoom_info().getType_id().equals("7")) {
|
||||||
|
roomFragment.friendshipRoomFragmentEvent(messageEvent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -986,7 +1041,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
} else if ("1".equals(labelId)) {
|
} else if ("1".equals(labelId)) {
|
||||||
roomFragment.SingSongEvent(messageEvent);
|
roomFragment.SingSongEvent(messageEvent);
|
||||||
}
|
}
|
||||||
} else if ("7".equals(typeId)){
|
} else if ("7".equals(typeId)) {
|
||||||
for (RoomPitBean roomPitBean : pitList) {
|
for (RoomPitBean roomPitBean : pitList) {
|
||||||
if (roomPitBean.getUser_id().equals(toUserInfo.getUser_id() + "")) {
|
if (roomPitBean.getUser_id().equals(toUserInfo.getUser_id() + "")) {
|
||||||
roomPitBean.setCharm(toUserInfo.getCharm());
|
roomPitBean.setCharm(toUserInfo.getCharm());
|
||||||
@@ -1072,7 +1127,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
ivWheatFeeding(com.xscm.moduleutil.R.mipmap.room_wheat_feeding_up);
|
ivWheatFeeding(com.xscm.moduleutil.R.mipmap.room_wheat_feeding_up);
|
||||||
setBoolean(aBoolean);
|
setBoolean(aBoolean);
|
||||||
if (mRoomInfoResp.getUser_info() != null) {
|
if (mRoomInfoResp.getUser_info() != null) {
|
||||||
mRoomInfoResp.getUser_info().setPit_number(pitNumber != null ? Integer.parseInt(pitNumber) :-1);
|
mRoomInfoResp.getUser_info().setPit_number(pitNumber != null ? Integer.parseInt(pitNumber) : -1);
|
||||||
}
|
}
|
||||||
setRoleType(3, Integer.parseInt(pitNumber));
|
setRoleType(3, Integer.parseInt(pitNumber));
|
||||||
switchMic(2);
|
switchMic(2);
|
||||||
@@ -1101,6 +1156,8 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ("7".equals(typeId)) {
|
} else if ("7".equals(typeId)) {
|
||||||
|
mBinding.rlMore.setVisibility(GONE);
|
||||||
|
mBinding.rlMisc.setVisibility(GONE);
|
||||||
List<RoomPitBean> pitList = mRoomInfoResp.getRoom_info().getPit_list();
|
List<RoomPitBean> pitList = mRoomInfoResp.getRoom_info().getPit_list();
|
||||||
if (pitList != null && !pitList.isEmpty()) {
|
if (pitList != null && !pitList.isEmpty()) {
|
||||||
try {
|
try {
|
||||||
@@ -1376,11 +1433,15 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
}
|
}
|
||||||
|
|
||||||
pendingRoomId = text.getRoom_id();
|
pendingRoomId = text.getRoom_id();
|
||||||
|
LogUtils.e("需要加入的房间id:pendingRoomId: " + pendingRoomId);
|
||||||
roomSwitchRunnable = () -> {
|
roomSwitchRunnable = () -> {
|
||||||
if (!isFinishing() && !isDestroyed()) {
|
if (!isFinishing() && !isDestroyed()) {
|
||||||
if (!pendingRoomId.equals(lastSwitchedRoomId)) {
|
if (!pendingRoomId.equals(lastSwitchedRoomId)) {
|
||||||
|
|
||||||
MvpPre.quitRoom2(messageEvent.getRoomId(), SpUtil.getUserId() + "");
|
MvpPre.quitRoom2(messageEvent.getRoomId(), SpUtil.getUserId() + "");
|
||||||
|
quit();
|
||||||
|
MessageListenerSingleton.reset(messageEvent.getRoomId());
|
||||||
|
MessageListenerSingleton.getInstance().joinGroup(pendingRoomId);
|
||||||
MvpPre.getRoomIn(pendingRoomId, "");
|
MvpPre.getRoomIn(pendingRoomId, "");
|
||||||
lastSwitchedRoomId = pendingRoomId;
|
lastSwitchedRoomId = pendingRoomId;
|
||||||
AgoraManager.getInstance(context).setLastRoomId(messageEvent.getRoomId());
|
AgoraManager.getInstance(context).setLastRoomId(messageEvent.getRoomId());
|
||||||
@@ -1423,6 +1484,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
private void handleMsgType1055(RoomMessageEvent messageEvent) {
|
private void handleMsgType1055(RoomMessageEvent messageEvent) {
|
||||||
if (!isFinishing() && !isDestroyed()) {
|
if (!isFinishing() && !isDestroyed()) {
|
||||||
MvpPre.quitRoom2(messageEvent.getRoomId(), SpUtil.getUserId() + "");
|
MvpPre.quitRoom2(messageEvent.getRoomId(), SpUtil.getUserId() + "");
|
||||||
|
quit();
|
||||||
jiaR();
|
jiaR();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1630,7 +1692,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
|
|
||||||
private void querenPk(String text, String pk_id) {
|
private void querenPk(String text, String pk_id) {
|
||||||
// 创建并显示确认对话框
|
// 创建并显示确认对话框
|
||||||
ConfirmDialog dialog = new ConfirmDialog(this,
|
ConfirmDialog dialog = new ConfirmDialog(this,
|
||||||
"温馨提示",
|
"温馨提示",
|
||||||
text,
|
text,
|
||||||
"确认",
|
"确认",
|
||||||
@@ -1726,7 +1788,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
addActiveDialog(roomNoticeDialogFragment);
|
addActiveDialog(roomNoticeDialogFragment);
|
||||||
} else if (id == R.id.btn_ranking) {//排行榜
|
} else if (id == R.id.btn_ranking) {//排行榜
|
||||||
// RoomChartsFragment.newInstance(roomId).show(getSupportFragmentManager(), "RoomChartsFragment");
|
// RoomChartsFragment.newInstance(roomId).show(getSupportFragmentManager(), "RoomChartsFragment");
|
||||||
RoomChartsFragment fragment = RoomChartsFragment.newInstance(roomId,mRoomInfoResp);
|
RoomChartsFragment fragment = RoomChartsFragment.newInstance(roomId, mRoomInfoResp);
|
||||||
fragment.show(getSupportFragmentManager(), "RoomChartsFragment");
|
fragment.show(getSupportFragmentManager(), "RoomChartsFragment");
|
||||||
addActiveDialogFragment(fragment);
|
addActiveDialogFragment(fragment);
|
||||||
} else if (id == R.id.btn_close_live) {
|
} else if (id == R.id.btn_close_live) {
|
||||||
@@ -1870,7 +1932,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
|
|
||||||
private void queren() {
|
private void queren() {
|
||||||
// 创建并显示确认对话框
|
// 创建并显示确认对话框
|
||||||
ConfirmDialog dialog= new ConfirmDialog(this,
|
ConfirmDialog dialog = new ConfirmDialog(this,
|
||||||
"提示",
|
"提示",
|
||||||
"您将要发起点歌申请?",
|
"您将要发起点歌申请?",
|
||||||
"确认",
|
"确认",
|
||||||
@@ -1982,10 +2044,6 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
return; // 全部隐藏,无需继续处理
|
return; // 全部隐藏,无需继续处理
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("7".equals(typeId)) {
|
|
||||||
rl_more.setVisibility(View.GONE);
|
|
||||||
rl_misc.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 根据角色类型显示按钮
|
// 根据角色类型显示按钮
|
||||||
switch (roleType) {
|
switch (roleType) {
|
||||||
@@ -2043,6 +2101,11 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
switchMic(2);
|
switchMic(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ("7".equals(typeId)) {
|
||||||
|
rl_more.setVisibility(View.GONE);
|
||||||
|
rl_misc.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2563,8 +2626,10 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加成员变量来跟踪前后台状态
|
// 添加成员变量来跟踪前后台状态
|
||||||
private boolean isInBackground = false;
|
private boolean isInBackground = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
@@ -2599,7 +2664,9 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
isLayoutAdjusted = true;
|
isLayoutAdjusted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int maxHeightDp=333;
|
|
||||||
|
int maxHeightDp = 333;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动态调整布局高度以适配不同设备
|
* 动态调整布局高度以适配不同设备
|
||||||
*/
|
*/
|
||||||
@@ -2711,7 +2778,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postRoomInfo(RoomInfoResp resp) {
|
public void postRoomInfo(RoomInfoResp resp) {
|
||||||
if (resp == null){
|
if (resp == null) {
|
||||||
ARouter.getInstance().build(ARouteConstants.ME)
|
ARouter.getInstance().build(ARouteConstants.ME)
|
||||||
.withFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
.withFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||||
.navigation();
|
.navigation();
|
||||||
@@ -2773,10 +2840,10 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
AgoraManager.getInstance(this).stopMuisc();
|
AgoraManager.getInstance(this).stopMuisc();
|
||||||
initializeAudio();
|
initializeAudio();
|
||||||
|
|
||||||
if (mRoomInfoResp.getRoom_info().getLabel_id().equals("2") || mRoomInfoResp.getRoom_info().getType_id().equals("7")){
|
if (mRoomInfoResp.getRoom_info().getLabel_id().equals("2") || mRoomInfoResp.getRoom_info().getType_id().equals("7")) {
|
||||||
mBinding.rlMore.setVisibility(GONE);
|
mBinding.rlMore.setVisibility(GONE);
|
||||||
mBinding.rlMisc.setVisibility(GONE);
|
mBinding.rlMisc.setVisibility(GONE);
|
||||||
}else if (mRoomInfoResp.getRoom_info().getLabel_id().equals("1") || mRoomInfoResp.getRoom_info().getType_id().equals("3") || mRoomInfoResp.getRoom_info().getType_id().equals("4")){
|
} else if (mRoomInfoResp.getRoom_info().getLabel_id().equals("1") || mRoomInfoResp.getRoom_info().getType_id().equals("3") || mRoomInfoResp.getRoom_info().getType_id().equals("4")) {
|
||||||
mBinding.rlMore.setVisibility(VISIBLE);
|
mBinding.rlMore.setVisibility(VISIBLE);
|
||||||
mBinding.rlMisc.setVisibility(VISIBLE);
|
mBinding.rlMisc.setVisibility(VISIBLE);
|
||||||
}
|
}
|
||||||
@@ -2784,19 +2851,20 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
|
|
||||||
|
|
||||||
public void upHeight() {
|
public void upHeight() {
|
||||||
if (mRoomInfoResp.getRoom_info().getType_id().equals("1")){
|
if (mRoomInfoResp.getRoom_info().getType_id().equals("1")) {
|
||||||
if (mRoomInfoResp.getRoom_info().getLabel_id().equals("1")){
|
if (mRoomInfoResp.getRoom_info().getLabel_id().equals("1")) {
|
||||||
maxHeightDp=333;
|
maxHeightDp = 333;
|
||||||
}else {
|
} else {
|
||||||
maxHeightDp=287;
|
maxHeightDp = 287;
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if (mRoomInfoResp.getRoom_info().getType_id().equals("2")){
|
} else if (mRoomInfoResp.getRoom_info().getType_id().equals("2")) {
|
||||||
maxHeightDp=297;
|
maxHeightDp = 297;
|
||||||
} if (mRoomInfoResp.getRoom_info().getType_id().equals("6")){
|
}
|
||||||
maxHeightDp=333;
|
if (mRoomInfoResp.getRoom_info().getType_id().equals("6")) {
|
||||||
}else if (mRoomInfoResp.getRoom_info().getType_id().equals("7")){
|
maxHeightDp = 453;
|
||||||
maxHeightDp=333;
|
} else if (mRoomInfoResp.getRoom_info().getType_id().equals("7")) {
|
||||||
|
maxHeightDp = 333;
|
||||||
|
|
||||||
}
|
}
|
||||||
adjustLayoutHeights();
|
adjustLayoutHeights();
|
||||||
@@ -2833,22 +2901,17 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void quit(){
|
||||||
public void quitRoom2(String roomId) {
|
|
||||||
CommonAppContext.getInstance().isPlaying = false;
|
CommonAppContext.getInstance().isPlaying = false;
|
||||||
CommonAppContext.getInstance().isShow = false;
|
CommonAppContext.getInstance().isShow = false;
|
||||||
// AgoraManager.getInstance(this).destroy();
|
|
||||||
AgoraManager.getInstance(this).stopScreenCapture();
|
AgoraManager.getInstance(this).stopScreenCapture();
|
||||||
AgoraManager.getInstance(this).leaveRoom();
|
AgoraManager.getInstance(this).leaveRoom();
|
||||||
AgoraManager.getInstance(this).cleanup();
|
AgoraManager.getInstance(this).cleanup();
|
||||||
MyRoomSingleton.getInstance().onExitRoom();
|
MyRoomSingleton.getInstance().onExitRoom();
|
||||||
LogUtils.e("退出im:", roomId);
|
}
|
||||||
MessageListenerSingleton.reset(roomId);
|
|
||||||
// if (publicScreenFragment != null) {
|
@Override
|
||||||
// getSupportFragmentManager().beginTransaction().remove(publicScreenFragment).commitAllowingStateLoss();
|
public void quitRoom2(String roomId) {
|
||||||
// publicScreenFragment = null;
|
|
||||||
// }
|
|
||||||
// destroyAllFragments();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2993,6 +3056,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
LogUtils.e("cleanupResources error: " + e.getMessage());
|
LogUtils.e("cleanupResources error: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 清理所有弹框
|
// 清理所有弹框
|
||||||
private void dismissAllDialogs() {
|
private void dismissAllDialogs() {
|
||||||
// 关闭 AlertDialog 实例
|
// 关闭 AlertDialog 实例
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ public class RoomUserContacts {
|
|||||||
|
|
||||||
void topRelationCard(String s);
|
void topRelationCard(String s);
|
||||||
void deleteRelationCard(String s);
|
void deleteRelationCard(String s);
|
||||||
|
void clearUserCharm();
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface ViewGx extends IView<Activity> {
|
public interface ViewGx extends IView<Activity> {
|
||||||
@@ -51,5 +52,7 @@ public class RoomUserContacts {
|
|||||||
|
|
||||||
void topRelationCard(String id);
|
void topRelationCard(String id);
|
||||||
void deleteRelationCard(String id);
|
void deleteRelationCard(String id);
|
||||||
|
|
||||||
|
void clearUserCharm(String roomId,String userId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
|||||||
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
||||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||||
import com.xscm.moduleutil.dialog.RechargeDialogFragment;
|
import com.xscm.moduleutil.dialog.RechargeDialogFragment;
|
||||||
|
import com.xscm.moduleutil.dialog.WebViewDialog;
|
||||||
import com.xscm.moduleutil.dialog.giftLottery.GiftLotteryDialog;
|
import com.xscm.moduleutil.dialog.giftLottery.GiftLotteryDialog;
|
||||||
import com.xscm.moduleutil.event.GiftDoubleClickEvent;
|
import com.xscm.moduleutil.event.GiftDoubleClickEvent;
|
||||||
import com.xscm.moduleutil.event.GiftUserRefreshEvent;
|
import com.xscm.moduleutil.event.GiftUserRefreshEvent;
|
||||||
@@ -305,7 +306,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
|
|
||||||
ViewGroup.LayoutParams layoutParams = mBinding.llGiftRule.getLayoutParams();
|
ViewGroup.LayoutParams layoutParams = mBinding.llGiftRule.getLayoutParams();
|
||||||
layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT; // 使用你定义的getWidth方法
|
layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT; // 使用你定义的getWidth方法
|
||||||
layoutParams.height = SystemUtils.getWidth(74); // 示例高度
|
layoutParams.height = SystemUtils.getWidth(64); // 示例高度
|
||||||
mBinding.llGiftRule.setLayoutParams(layoutParams);
|
mBinding.llGiftRule.setLayoutParams(layoutParams);
|
||||||
|
|
||||||
|
|
||||||
@@ -377,7 +378,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
ToastUtils.show("一键全送只能选择一个用户");
|
ToastUtils.show("一键全送只能选择一个用户");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MvpPre.getGiftPack(roomId,gifyuseradapter.getUserIdToString());
|
MvpPre.getGiftPack(roomId,gifyuseradapter.getUserIdToString(),heart_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -433,7 +434,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
FragmentManager fm = getParentFragmentManager();
|
FragmentManager fm = getParentFragmentManager();
|
||||||
if (fm != null && !fm.isDestroyed()) {
|
if (fm != null && !fm.isDestroyed()) {
|
||||||
GiftLotteryDialog newDialog = GiftLotteryDialog.newInstance(
|
GiftLotteryDialog newDialog = GiftLotteryDialog.newInstance(
|
||||||
String.valueOf(gift.getGift_bag()), roomId, userId);
|
String.valueOf(gift.getGift_bag()), roomId, userId,heart_id);
|
||||||
newDialog.show(fm, "GiftLotteryDialog");
|
newDialog.show(fm, "GiftLotteryDialog");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
}else if (id==R.id.textView2){
|
}else if (id==R.id.textView2){
|
||||||
dianj(2);
|
dianj(2);
|
||||||
}else if (id==R.id.im_qml){
|
}else if (id==R.id.im_qml){
|
||||||
|
MvpPre.clearUserCharm(room_id, user_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -481,6 +481,8 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
mBinding.roomJb.setVisibility(View.GONE);
|
mBinding.roomJb.setVisibility(View.GONE);
|
||||||
mBinding.roomLh.setVisibility(View.GONE);
|
mBinding.roomLh.setVisibility(View.GONE);
|
||||||
mBinding.roomBo.setVisibility(View.VISIBLE);
|
mBinding.roomBo.setVisibility(View.VISIBLE);
|
||||||
|
mBinding.imQml.setVisibility(VISIBLE);
|
||||||
|
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||||
if (isSelf){
|
if (isSelf){
|
||||||
mBinding.roomDian.setVisibility(GONE);
|
mBinding.roomDian.setVisibility(GONE);
|
||||||
mBinding.roomJb.setVisibility(View.GONE);
|
mBinding.roomJb.setVisibility(View.GONE);
|
||||||
@@ -517,6 +519,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
mBinding.roomBo.setVisibility(GONE);
|
mBinding.roomBo.setVisibility(GONE);
|
||||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
mBinding.imQml.setVisibility(VISIBLE);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (close_type==1 ||close_type==2){ //主持查看房主或者管理员信息
|
if (close_type==1 ||close_type==2){ //主持查看房主或者管理员信息
|
||||||
@@ -544,6 +547,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
mBinding.roomBo.setVisibility(GONE);
|
mBinding.roomBo.setVisibility(GONE);
|
||||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
mBinding.imQml.setVisibility(VISIBLE);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (close_type==1 ||close_type==2 ||close_type==3) {
|
if (close_type==1 ||close_type==2 ||close_type==3) {
|
||||||
@@ -552,12 +556,14 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
mBinding.roomLh.setVisibility(View.VISIBLE);
|
mBinding.roomLh.setVisibility(View.VISIBLE);
|
||||||
mBinding.roomMCz.setVisibility(GONE);
|
mBinding.roomMCz.setVisibility(GONE);
|
||||||
mBinding.roomBo.setVisibility(View.VISIBLE);
|
mBinding.roomBo.setVisibility(View.VISIBLE);
|
||||||
|
mBinding.imQml.setVisibility(VISIBLE);
|
||||||
}else {
|
}else {
|
||||||
mBinding.roomDian.setVisibility(GONE);
|
mBinding.roomDian.setVisibility(GONE);
|
||||||
mBinding.roomJb.setVisibility(View.VISIBLE);
|
mBinding.roomJb.setVisibility(View.VISIBLE);
|
||||||
mBinding.roomLh.setVisibility(View.VISIBLE);
|
mBinding.roomLh.setVisibility(View.VISIBLE);
|
||||||
mBinding.roomMCz.setVisibility(GONE);
|
mBinding.roomMCz.setVisibility(GONE);
|
||||||
mBinding.roomBo.setVisibility(View.VISIBLE);
|
mBinding.roomBo.setVisibility(View.VISIBLE);
|
||||||
|
mBinding.imQml.setVisibility(GONE);
|
||||||
}
|
}
|
||||||
if (isSelf){
|
if (isSelf){
|
||||||
mBinding.roomDian.setVisibility(GONE);
|
mBinding.roomDian.setVisibility(GONE);
|
||||||
@@ -566,6 +572,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
mBinding.roomBo.setVisibility(GONE);
|
mBinding.roomBo.setVisibility(GONE);
|
||||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// 默认处理
|
// 默认处理
|
||||||
@@ -716,5 +723,10 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearUserCharm() {
|
||||||
|
ToastUtils.show("清除成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -26,6 +26,7 @@ import com.example.moduleroom.R;
|
|||||||
import com.example.moduleroom.activity.RoomActivity;
|
import com.example.moduleroom.activity.RoomActivity;
|
||||||
import com.example.moduleroom.contacts.FriendshipRoomContacts;
|
import com.example.moduleroom.contacts.FriendshipRoomContacts;
|
||||||
import com.example.moduleroom.databinding.FragmentFriendshipRoomBinding;
|
import com.example.moduleroom.databinding.FragmentFriendshipRoomBinding;
|
||||||
|
import com.example.moduleroom.dialog.RoomCharmDialog;
|
||||||
import com.example.moduleroom.dialog.RoomConcernDialogFragment;
|
import com.example.moduleroom.dialog.RoomConcernDialogFragment;
|
||||||
import com.example.moduleroom.dialog.RoomGiftDialogFragment;
|
import com.example.moduleroom.dialog.RoomGiftDialogFragment;
|
||||||
import com.example.moduleroom.dialog.RoomOnlineDialogFragment;
|
import com.example.moduleroom.dialog.RoomOnlineDialogFragment;
|
||||||
@@ -35,6 +36,7 @@ import com.opensource.svgaplayer.SVGACallback;
|
|||||||
import com.orhanobut.logger.Logger;
|
import com.orhanobut.logger.Logger;
|
||||||
import com.xscm.moduleutil.activity.IPresenter;
|
import com.xscm.moduleutil.activity.IPresenter;
|
||||||
import com.xscm.moduleutil.base.BaseRoomFragment;
|
import com.xscm.moduleutil.base.BaseRoomFragment;
|
||||||
|
import com.xscm.moduleutil.bean.RoomMessageEvent;
|
||||||
import com.xscm.moduleutil.bean.RoomRelationBean;
|
import com.xscm.moduleutil.bean.RoomRelationBean;
|
||||||
import com.xscm.moduleutil.bean.UserInfo;
|
import com.xscm.moduleutil.bean.UserInfo;
|
||||||
import com.xscm.moduleutil.bean.room.FriendInfo;
|
import com.xscm.moduleutil.bean.room.FriendInfo;
|
||||||
@@ -43,6 +45,7 @@ import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
|||||||
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
||||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||||
import com.xscm.moduleutil.dialog.ConfirmDialog;
|
import com.xscm.moduleutil.dialog.ConfirmDialog;
|
||||||
|
import com.xscm.moduleutil.utils.ClickUtils;
|
||||||
import com.xscm.moduleutil.utils.ImageUtils;
|
import com.xscm.moduleutil.utils.ImageUtils;
|
||||||
import com.xscm.moduleutil.utils.SpUtil;
|
import com.xscm.moduleutil.utils.SpUtil;
|
||||||
import com.xscm.moduleutil.widget.RoomFriendshipWheatView;
|
import com.xscm.moduleutil.widget.RoomFriendshipWheatView;
|
||||||
@@ -183,7 +186,9 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
|||||||
wheatView.setOnClickListener(new View.OnClickListener() {
|
wheatView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
if (ClickUtils.isFastDoubleClick()) {
|
||||||
|
return; // 快速重复点击,直接返回
|
||||||
|
}
|
||||||
onWheatViewClick(position, wheatView);
|
onWheatViewClick(position, wheatView);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -191,6 +196,9 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
|||||||
wheatView.setOnZhulClickListener(new RoomFriendshipWheatView.OnZhulClickListener() {
|
wheatView.setOnZhulClickListener(new RoomFriendshipWheatView.OnZhulClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onZhulClick(RoomFriendshipWheatView view, RoomPitBean pitBean) {
|
public void onZhulClick(RoomFriendshipWheatView view, RoomPitBean pitBean) {
|
||||||
|
if (ClickUtils.isFastDoubleClick()) {
|
||||||
|
return; // 快速重复点击,直接返回
|
||||||
|
}
|
||||||
UserInfo userInfo = new UserInfo();
|
UserInfo userInfo = new UserInfo();
|
||||||
userInfo.setAvatar(pitBean.getAvatar());
|
userInfo.setAvatar(pitBean.getAvatar());
|
||||||
userInfo.setNickname(pitBean.getNickname());
|
userInfo.setNickname(pitBean.getNickname());
|
||||||
@@ -200,6 +208,18 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
|||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
wheatView.setmOnCharmClickListener(new RoomFriendshipWheatView.onCharmClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onCharmClick(RoomFriendshipWheatView view, RoomPitBean pitBean) {
|
||||||
|
if (ClickUtils.isFastDoubleClick()) {
|
||||||
|
return; // 快速重复点击,直接返回
|
||||||
|
}
|
||||||
|
if (pitBean.getUser_id()!=null && !pitBean.getUser_id().isEmpty() && !pitBean.getUser_id().equals("0")) {
|
||||||
|
RoomCharmDialog.newInstance(roomId, pitBean.getUser_id()).show(getChildFragmentManager(), "RoomCharmDialog");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 初始化交友状态相关的UI组件
|
// 初始化交友状态相关的UI组件
|
||||||
@@ -315,6 +335,57 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void event1059(RoomMessageEvent messageEvent){
|
||||||
|
RoomPitBean pitBean = mBinding.wheatView9.pitBean;
|
||||||
|
if (pitBean.getUser_id().equals(messageEvent.getText().getUser_id())){
|
||||||
|
pitBean.setCharm("");
|
||||||
|
mBinding.wheatView9.setData(pitBean);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RoomPitBean pitBean1=mBinding.wheatView10.pitBean;
|
||||||
|
if (pitBean1.getUser_id().equals(messageEvent.getText().getUser_id())){
|
||||||
|
pitBean1.setCharm("");
|
||||||
|
mBinding.wheatView10.setData(pitBean1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RoomPitBean pitBean2=mBinding.wheatView1.pitBean;
|
||||||
|
if (pitBean2.getUser_id().equals(messageEvent.getText().getUser_id())){
|
||||||
|
pitBean2.setCharm("");
|
||||||
|
mBinding.wheatView1.setData(pitBean2);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RoomPitBean pitBean3=mBinding.wheatView2.pitBean;
|
||||||
|
if (pitBean3.getUser_id().equals(messageEvent.getText().getUser_id())){
|
||||||
|
pitBean3.setCharm("");
|
||||||
|
mBinding.wheatView2.setData(pitBean3);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RoomPitBean pitBean4=mBinding.wheatView3.pitBean;
|
||||||
|
if (pitBean4.getUser_id().equals(messageEvent.getText().getUser_id())){
|
||||||
|
pitBean4.setCharm("");
|
||||||
|
mBinding.wheatView3.setData(pitBean4);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RoomPitBean pitBean5=mBinding.wheatView4.pitBean;
|
||||||
|
if (pitBean5.getUser_id().equals(messageEvent.getText().getUser_id())){
|
||||||
|
pitBean5.setCharm("");
|
||||||
|
mBinding.wheatView4.setData(pitBean5);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RoomPitBean pitBean6=mBinding.wheatView5.pitBean;
|
||||||
|
if (pitBean6.getUser_id().equals(messageEvent.getText().getUser_id())){
|
||||||
|
pitBean6.setCharm("");
|
||||||
|
mBinding.wheatView5.setData(pitBean6);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RoomPitBean pitBean7=mBinding.wheatView6.pitBean;
|
||||||
|
if (pitBean7.getUser_id().equals(messageEvent.getText().getUser_id())){
|
||||||
|
pitBean7.setCharm("");
|
||||||
|
mBinding.wheatView6.setData(pitBean7);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// 抱麦、锁麦
|
/// 抱麦、锁麦
|
||||||
private void initPopupWindow() {
|
private void initPopupWindow() {
|
||||||
// 加载弹出视图布局
|
// 加载弹出视图布局
|
||||||
|
|||||||
@@ -214,6 +214,7 @@ public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEa
|
|||||||
|
|
||||||
public void getUpRoomInfo(RoomInfoResp resp) {
|
public void getUpRoomInfo(RoomInfoResp resp) {
|
||||||
this.roomInfoResp = resp;
|
this.roomInfoResp = resp;
|
||||||
|
easeChatAdapter.clearData();
|
||||||
// roomInfoResp = (RoomInfoResp) arguments.getSerializable("roomInfo");
|
// roomInfoResp = (RoomInfoResp) arguments.getSerializable("roomInfo");
|
||||||
toChatUsername = roomInfoResp.getRoom_info().getChatrooms();
|
toChatUsername = roomInfoResp.getRoom_info().getChatrooms();
|
||||||
this.roomId = roomInfoResp.getRoom_info().getRoom_id();
|
this.roomId = roomInfoResp.getRoom_info().getRoom_id();
|
||||||
@@ -624,9 +625,11 @@ public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEa
|
|||||||
scrollToBottomIfNeed();
|
scrollToBottomIfNeed();
|
||||||
return;
|
return;
|
||||||
} else if (message.getMsgType() == 1049) {
|
} else if (message.getMsgType() == 1049) {
|
||||||
EventBus.getDefault().post(message);
|
if (message.getText().getStep()!=3) {
|
||||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
EventBus.getDefault().post(message);
|
||||||
scrollToBottomIfNeed();
|
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||||
|
scrollToBottomIfNeed();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
} else if (message.getMsgType() == 1050 || message.getMsgType() == 1054 || message.getMsgType() == 1051 || message.getMsgType() == 1052) {
|
} else if (message.getMsgType() == 1050 || message.getMsgType() == 1054 || message.getMsgType() == 1051 || message.getMsgType() == 1052) {
|
||||||
EventBus.getDefault().post(message);
|
EventBus.getDefault().post(message);
|
||||||
@@ -637,7 +640,7 @@ public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEa
|
|||||||
} else if (message.getMsgType() == 1055) {
|
} else if (message.getMsgType() == 1055) {
|
||||||
EventBus.getDefault().post(message);
|
EventBus.getDefault().post(message);
|
||||||
return;
|
return;
|
||||||
}else if (message.getMsgType()==1056 || message.getMsgType()==1057){
|
}else if (message.getMsgType()==1056 || message.getMsgType()==1057 || message.getMsgType()==1059){
|
||||||
EventBus.getDefault().post(message);
|
EventBus.getDefault().post(message);
|
||||||
return;
|
return;
|
||||||
}else if (message.getMsgType() == 1025){
|
}else if (message.getMsgType() == 1025){
|
||||||
|
|||||||
@@ -223,4 +223,9 @@ public class RelationshipFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
public void deleteRelationCard(String s) {
|
public void deleteRelationCard(String s) {
|
||||||
MvpPre.relationCard(userId);
|
MvpPre.relationCard(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearUserCharm() {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -29,6 +29,7 @@ import com.example.moduleroom.databinding.FragmentRoomAuctionBinding;
|
|||||||
import com.example.moduleroom.dialog.BidListDialogFragment;
|
import com.example.moduleroom.dialog.BidListDialogFragment;
|
||||||
import com.example.moduleroom.dialog.CardRelationshipFragment;
|
import com.example.moduleroom.dialog.CardRelationshipFragment;
|
||||||
import com.example.moduleroom.dialog.CustomCenterDialogFragment;
|
import com.example.moduleroom.dialog.CustomCenterDialogFragment;
|
||||||
|
import com.example.moduleroom.dialog.RoomCharmDialog;
|
||||||
import com.example.moduleroom.dialog.RoomGiftDialogFragment;
|
import com.example.moduleroom.dialog.RoomGiftDialogFragment;
|
||||||
import com.example.moduleroom.dialog.RoomOnlineDialogFragment;
|
import com.example.moduleroom.dialog.RoomOnlineDialogFragment;
|
||||||
import com.example.moduleroom.dialog.RoomUserInfoFragment;
|
import com.example.moduleroom.dialog.RoomUserInfoFragment;
|
||||||
@@ -45,6 +46,7 @@ import com.xscm.moduleutil.bean.room.RoomBean;
|
|||||||
import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
||||||
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
||||||
import com.xscm.moduleutil.dialog.ConfirmDialog;
|
import com.xscm.moduleutil.dialog.ConfirmDialog;
|
||||||
|
import com.xscm.moduleutil.utils.ClickUtils;
|
||||||
import com.xscm.moduleutil.utils.ColorManager;
|
import com.xscm.moduleutil.utils.ColorManager;
|
||||||
import com.xscm.moduleutil.utils.ImageUtils;
|
import com.xscm.moduleutil.utils.ImageUtils;
|
||||||
import com.xscm.moduleutil.utils.SpUtil;
|
import com.xscm.moduleutil.utils.SpUtil;
|
||||||
@@ -150,7 +152,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
|||||||
|
|
||||||
roomAuction = roomInfoResp.getRoom_auction();
|
roomAuction = roomInfoResp.getRoom_auction();
|
||||||
if (roomAuction != null) {
|
if (roomAuction != null) {
|
||||||
if (roomAuction.getAuction_user() != null ) {
|
if (roomAuction.getAuction_user() != null) {
|
||||||
auctionUserBean = roomAuction.getAuction_user();
|
auctionUserBean = roomAuction.getAuction_user();
|
||||||
RoomPitBean roomPitBean1 = new RoomPitBean();
|
RoomPitBean roomPitBean1 = new RoomPitBean();
|
||||||
roomPitBean1.setUser_id(auctionUserBean.getUser_id());
|
roomPitBean1.setUser_id(auctionUserBean.getUser_id());
|
||||||
@@ -187,12 +189,12 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
|||||||
mBinding.ivJp.setVisibility(VISIBLE);
|
mBinding.ivJp.setVisibility(VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (auctionUserBean.getAuction_id()!=null) {
|
if (auctionUserBean.getAuction_id() != null) {
|
||||||
mBinding.ivJp.setVisibility(VISIBLE);
|
mBinding.ivJp.setVisibility(VISIBLE);
|
||||||
gengv();
|
gengv();
|
||||||
auctionId = auctionUserBean.getAuction_id();
|
auctionId = auctionUserBean.getAuction_id();
|
||||||
SpUtil.setAuctionId(auctionId);
|
SpUtil.setAuctionId(auctionId);
|
||||||
}else {
|
} else {
|
||||||
SpUtil.setAuctionId("");
|
SpUtil.setAuctionId("");
|
||||||
mBinding.ivJp.setVisibility(INVISIBLE);
|
mBinding.ivJp.setVisibility(INVISIBLE);
|
||||||
}
|
}
|
||||||
@@ -311,20 +313,87 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
|||||||
mBinding.roomMakeWheat.setOnClickListener(this::onChock);
|
mBinding.roomMakeWheat.setOnClickListener(this::onChock);
|
||||||
mBinding.roomMakeWheat2.setOnClickListener(this::onChock);
|
mBinding.roomMakeWheat2.setOnClickListener(this::onChock);
|
||||||
mBinding.bangdan.setOnClickListener(this::onChock);
|
mBinding.bangdan.setOnClickListener(this::onChock);
|
||||||
mBinding.ivAuction1.setOnClickListener(this::onChock);
|
// mBinding.ivAuction1.setOnClickListener(this::onChock);
|
||||||
mBinding.ivAuction2.setOnClickListener(this::onChock);
|
// mBinding.ivAuction2.setOnClickListener(this::onChock);
|
||||||
mBinding.ivAuction3.setOnClickListener(this::onChock);
|
// mBinding.ivAuction3.setOnClickListener(this::onChock);
|
||||||
mBinding.user4.setOnClickListener(this::onChock);
|
mBinding.user4.setOnClickListener(this::onChock);
|
||||||
mBinding.user5.setOnClickListener(this::onChock);
|
mBinding.user5.setOnClickListener(this::onChock);
|
||||||
mBinding.user6.setOnClickListener(this::onChock);
|
mBinding.user6.setOnClickListener(this::onChock);
|
||||||
|
mBinding.tvPB.setOnClickListener(this::onChock);
|
||||||
getTextView();
|
getTextView();
|
||||||
// initOverlayButtons();
|
// initOverlayButtons();
|
||||||
// steView(type);
|
// steView(type);
|
||||||
|
|
||||||
mBinding.qinmi.setTextColor(ColorManager.getInstance().getPrimaryColorInt());
|
mBinding.qinmi.setTextColor(ColorManager.getInstance().getPrimaryColorInt());
|
||||||
|
|
||||||
|
mBinding.ivAuction1.setOnClickListener(view -> {
|
||||||
|
if (ClickUtils.isFastDoubleClick()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (mBinding.ivAuction1.getUserId() != null && !mBinding.ivAuction1.getUserId().equals("")) {
|
||||||
|
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), mBinding.ivAuction1.getUserId(), mBinding.ivAuction1.pitNumber, getHostUser(), false, 1, 0, getChildFragmentManager());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mBinding.ivAuction1.setmOnCharmClickListener(new RoomMakeWheatView.onCharmClickListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCharmClick(RoomMakeWheatView view, RoomPitBean pitBean) {
|
||||||
|
if (ClickUtils.isFastDoubleClick()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (pitBean.getUser_id() != null && !pitBean.getUser_id().isEmpty() && !pitBean.getUser_id().equals("0")) {
|
||||||
|
RoomCharmDialog.newInstance(roomInfoResp.getRoom_info().getRoom_id(), pitBean.getUser_id()).show(getChildFragmentManager(), "RoomCharmDialog");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mBinding.ivAuction2.setOnClickListener(view -> {
|
||||||
|
if (ClickUtils.isFastDoubleClick()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (mBinding.ivAuction2.getUserId() != null && !mBinding.ivAuction2.getUserId().equals("")) {
|
||||||
|
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), mBinding.ivAuction2.getUserId(), mBinding.ivAuction2.pitNumber, getHostUser(), false, 1, 0, getChildFragmentManager());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mBinding.ivAuction2.setmOnCharmClickListener(new RoomMakeWheatView.onCharmClickListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCharmClick(RoomMakeWheatView view, RoomPitBean pitBean) {
|
||||||
|
if (ClickUtils.isFastDoubleClick()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (pitBean.getUser_id() != null && !pitBean.getUser_id().isEmpty() && !pitBean.getUser_id().equals("0")) {
|
||||||
|
RoomCharmDialog.newInstance(roomInfoResp.getRoom_info().getRoom_id(), pitBean.getUser_id()).show(getChildFragmentManager(), "RoomCharmDialog");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mBinding.ivAuction3.setOnClickListener(view -> {
|
||||||
|
if (ClickUtils.isFastDoubleClick()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (mBinding.ivAuction3.getUserId() != null && !mBinding.ivAuction3.getUserId().equals("")) {
|
||||||
|
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), mBinding.ivAuction3.getUserId(), mBinding.ivAuction3.pitNumber, getHostUser(), false, 1, 0, getChildFragmentManager());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mBinding.ivAuction3.setmOnCharmClickListener(new RoomMakeWheatView.onCharmClickListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCharmClick(RoomMakeWheatView view, RoomPitBean pitBean) {
|
||||||
|
if (ClickUtils.isFastDoubleClick()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (pitBean.getUser_id() != null && !pitBean.getUser_id().isEmpty() && !pitBean.getUser_id().equals("0")) {
|
||||||
|
RoomCharmDialog.newInstance(roomInfoResp.getRoom_info().getRoom_id(), pitBean.getUser_id()).show(getChildFragmentManager(), "RoomCharmDialog");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onChock(View view) {
|
private void onChock(View view) {
|
||||||
|
if (ClickUtils.isFastDoubleClick()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
int id = view.getId();
|
int id = view.getId();
|
||||||
if (id == R.id.iv_jp) {
|
if (id == R.id.iv_jp) {
|
||||||
// 添加多层空值检查
|
// 添加多层空值检查
|
||||||
@@ -339,7 +408,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
|||||||
userInfo.setUser_id(Integer.parseInt(roomInfoResp.getRoom_auction().getAuction_user().getUser_id()));
|
userInfo.setUser_id(Integer.parseInt(roomInfoResp.getRoom_auction().getAuction_user().getUser_id()));
|
||||||
userInfo.setNickname(roomInfoResp.getRoom_auction().getAuction_user().getNickname());
|
userInfo.setNickname(roomInfoResp.getRoom_auction().getAuction_user().getNickname());
|
||||||
userInfo.setAvatar(roomInfoResp.getRoom_auction().getAuction_user().getAvatar());
|
userInfo.setAvatar(roomInfoResp.getRoom_auction().getAuction_user().getAvatar());
|
||||||
userInfo.setAuction_id(roomInfoResp.getRoom_auction().getAuction_user()!= null ? roomInfoResp.getRoom_auction().getAuction_user().getAuction_id() : "");
|
userInfo.setAuction_id(roomInfoResp.getRoom_auction().getAuction_user() != null ? roomInfoResp.getRoom_auction().getAuction_user().getAuction_id() : "");
|
||||||
userInfo.setPit_number("888");
|
userInfo.setPit_number("888");
|
||||||
|
|
||||||
if (roomInfoResp.getRoom_info() != null &&
|
if (roomInfoResp.getRoom_info() != null &&
|
||||||
@@ -363,16 +432,18 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
|||||||
MvpPre.applyPit(roomInfoResp.getRoom_info().getRoom_id(), "9");
|
MvpPre.applyPit(roomInfoResp.getRoom_info().getRoom_id(), "9");
|
||||||
}
|
}
|
||||||
} else if (id == R.id.room_make_wheat2) {
|
} else if (id == R.id.room_make_wheat2) {
|
||||||
|
if (wheatView2.getUserId() != null) {
|
||||||
if (wheatView2.getUserId().equals("")) {
|
if (wheatView2.getUserId().equals("")) {
|
||||||
if ((wheatView.getUserId() != null && wheatView.getUserId().equals(SpUtil.getUserId() + "") || getHostUser() < 4)) {
|
if ((wheatView.getUserId() != null && wheatView.getUserId().equals(SpUtil.getUserId() + "") || getHostUser() < 4)) {
|
||||||
RoomOnlineDialogFragment.show(roomInfoResp.getRoom_info().getRoom_id(), 888 + "", roomInfoResp.getUser_info(), roomInfoResp, getChildFragmentManager());
|
RoomOnlineDialogFragment.show(roomInfoResp.getRoom_info().getRoom_id(), 888 + "", roomInfoResp.getUser_info(), roomInfoResp, getChildFragmentManager());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (roomInfoResp.getRoom_auction() != null && roomInfoResp.getRoom_auction().getAuction_user() != null ) {
|
||||||
|
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), wheatView2.getUserId(), wheatView2.pitNumber, getHostUser(), false, 1, Integer.parseInt(roomInfoResp.getRoom_auction().getAuction_user().getAuction_id() != null ? roomInfoResp.getRoom_auction().getAuction_user().getAuction_id() : "0"), getChildFragmentManager());
|
||||||
|
}else {
|
||||||
|
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), wheatView2.getUserId(), wheatView2.pitNumber, getHostUser(), false, 1, 0, getChildFragmentManager());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// if (roomInfoResp.getRoom_auction().getAuction_user() != null) {
|
|
||||||
|
|
||||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), wheatView2.getUserId(), wheatView2.pitNumber, getHostUser(), false, 1, Integer.parseInt(roomInfoResp.getRoom_auction().getAuction_user().getAuction_id() != null ? roomInfoResp.getRoom_auction().getAuction_user().getAuction_id() : "0"), getChildFragmentManager());
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
} else if (id == R.id.im_action_js) {//延时
|
} else if (id == R.id.im_action_js) {//延时
|
||||||
MvpPre.auctionDelay(SpUtil.getauctionId());
|
MvpPre.auctionDelay(SpUtil.getauctionId());
|
||||||
@@ -405,6 +476,11 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
|||||||
if (auctionList != null && auctionList.size() > 5) {
|
if (auctionList != null && auctionList.size() > 5) {
|
||||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), auctionList.get(5).getUser_id(), "", getHostUser(), false, 1, 0, getChildFragmentManager());
|
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), auctionList.get(5).getUser_id(), "", getHostUser(), false, 1, 0, getChildFragmentManager());
|
||||||
}
|
}
|
||||||
|
} else if (id == R.id.tv_p_b) {
|
||||||
|
if (wheatView2.pitBean.getUser_id() == null || wheatView2.pitBean.getUser_id().equals("") || wheatView2.pitBean.getUser_id().equals("0")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RoomCharmDialog.newInstance(roomInfoResp.getRoom_info().getRoom_id(), wheatView2.pitBean.getUser_id()).show(getChildFragmentManager(), "RoomCharmDialog");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -861,6 +937,42 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void event1059(RoomMessageEvent messageEvent) {
|
||||||
|
RoomPitBean pitBean = wheatView.pitBean;
|
||||||
|
if (pitBean.getUser_id().equals(messageEvent.getText().getUser_id())) {
|
||||||
|
pitBean.setCharm("");
|
||||||
|
wheatView.setData(pitBean);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RoomPitBean pitBean2 = wheatView2.pitBean;
|
||||||
|
if (pitBean2.getUser_id().equals(messageEvent.getText().getUser_id())) {
|
||||||
|
pitBean2.setCharm("");
|
||||||
|
wheatView2.setData(pitBean2);
|
||||||
|
mBinding.tvPB.setText("0");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RoomPitBean pitBean3 = mBinding.ivAuction1.pitBean;
|
||||||
|
if (pitBean3.getUser_id().equals(messageEvent.getText().getUser_id())) {
|
||||||
|
pitBean3.setCharm("");
|
||||||
|
mBinding.ivAuction1.setData(pitBean3);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RoomPitBean pitBean4 = mBinding.ivAuction2.pitBean;
|
||||||
|
if (pitBean4.getUser_id().equals(messageEvent.getText().getUser_id())) {
|
||||||
|
pitBean4.setCharm("");
|
||||||
|
mBinding.ivAuction2.setData(pitBean4);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RoomPitBean pitBean5 = mBinding.ivAuction3.pitBean;
|
||||||
|
if (pitBean5.getUser_id().equals(messageEvent.getText().getUser_id())) {
|
||||||
|
pitBean5.setCharm("");
|
||||||
|
mBinding.ivAuction3.setData(pitBean5);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void event1003(RoomMessageEvent messageEvent) {
|
public void event1003(RoomMessageEvent messageEvent) {
|
||||||
if (messageEvent.getText().getPit_number().equals("9")) {
|
if (messageEvent.getText().getPit_number().equals("9")) {
|
||||||
wheatView.setData(getPitBean(messageEvent));
|
wheatView.setData(getPitBean(messageEvent));
|
||||||
@@ -1309,7 +1421,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
|||||||
if (EventBus.getDefault().isRegistered(this)) {
|
if (EventBus.getDefault().isRegistered(this)) {
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
}
|
}
|
||||||
if (stub!=null) {
|
if (stub != null) {
|
||||||
stub.setVisibility(GONE);
|
stub.setVisibility(GONE);
|
||||||
stub = null;
|
stub = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
|||||||
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
||||||
import com.xscm.moduleutil.event.CabinEvent;
|
import com.xscm.moduleutil.event.CabinEvent;
|
||||||
import com.xscm.moduleutil.event.RoomBeckoningEvent;
|
import com.xscm.moduleutil.event.RoomBeckoningEvent;
|
||||||
|
import com.xscm.moduleutil.listener.MessageListenerSingleton;
|
||||||
import com.xscm.moduleutil.rtc.AgoraManager;
|
import com.xscm.moduleutil.rtc.AgoraManager;
|
||||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||||
import com.xscm.moduleutil.utils.SpUtil;
|
import com.xscm.moduleutil.utils.SpUtil;
|
||||||
@@ -605,6 +606,8 @@ public class RoomCabinFragment extends BaseRoomFragment<RoomCabinPresenter, Room
|
|||||||
public void quitRoom() {
|
public void quitRoom() {
|
||||||
if (getActivity() instanceof RoomActivity) {
|
if (getActivity() instanceof RoomActivity) {
|
||||||
LogUtils.e("lxj", "退出房间时间:" + TimeUtils.date2String(new Date())+":退出的roomId"+roomId);
|
LogUtils.e("lxj", "退出房间时间:" + TimeUtils.date2String(new Date())+":退出的roomId"+roomId);
|
||||||
|
MessageListenerSingleton.reset(roomId);
|
||||||
|
((RoomActivity) getActivity()).quit();
|
||||||
((RoomActivity) getActivity()).quitRoom2(roomId);
|
((RoomActivity) getActivity()).quitRoom2(roomId);
|
||||||
if (label_id!=null && label_id.equals(LABEL_ID_MOVIE)){
|
if (label_id!=null && label_id.equals(LABEL_ID_MOVIE)){
|
||||||
((RoomActivity) getActivity()).jiaR();
|
((RoomActivity) getActivity()).jiaR();
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
|||||||
|
|
||||||
onFragmentShowDestroy();
|
onFragmentShowDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onFragmentShowDestroy() {
|
public void onFragmentShowDestroy() {
|
||||||
if (EventBus.getDefault().isRegistered(this)) {
|
if (EventBus.getDefault().isRegistered(this)) {
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
@@ -148,6 +149,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
|||||||
|
|
||||||
releaseAllResources();
|
releaseAllResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 释放Fragment中的所有资源
|
* 释放Fragment中的所有资源
|
||||||
*/
|
*/
|
||||||
@@ -197,13 +199,13 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
|||||||
// 检查Fragment是否实现了特定的销毁接口
|
// 检查Fragment是否实现了特定的销毁接口
|
||||||
if (fragment instanceof SingSongFragment) {
|
if (fragment instanceof SingSongFragment) {
|
||||||
((SingSongFragment) fragment).releaseResources();
|
((SingSongFragment) fragment).releaseResources();
|
||||||
}else if (fragment instanceof RoomKtvFragment){
|
} else if (fragment instanceof RoomKtvFragment) {
|
||||||
((RoomKtvFragment) fragment).releaseResources();
|
((RoomKtvFragment) fragment).releaseResources();
|
||||||
}else if (fragment instanceof FriendshipRoomFragment){
|
} else if (fragment instanceof FriendshipRoomFragment) {
|
||||||
((FriendshipRoomFragment) fragment).releaseResources();
|
((FriendshipRoomFragment) fragment).releaseResources();
|
||||||
}else if (fragment instanceof RoomCabinFragment){
|
} else if (fragment instanceof RoomCabinFragment) {
|
||||||
((RoomCabinFragment) fragment).releaseResources();
|
((RoomCabinFragment) fragment).releaseResources();
|
||||||
}else if (fragment instanceof RoomAuctionFragment) {
|
} else if (fragment instanceof RoomAuctionFragment) {
|
||||||
((RoomAuctionFragment) fragment).releaseResources();
|
((RoomAuctionFragment) fragment).releaseResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,8 +227,6 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStart() {
|
public void onStart() {
|
||||||
super.onStart();
|
super.onStart();
|
||||||
@@ -317,7 +317,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
|||||||
singSongFragment.roomInfoUpdate(mRoomInfoResp);
|
singSongFragment.roomInfoUpdate(mRoomInfoResp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else if ("6".equals(typeId)){
|
} else if ("6".equals(typeId)) {
|
||||||
RoomCabinFragment roomCabinFragment = findFragmentByTag(RoomCabinFragment.class);
|
RoomCabinFragment roomCabinFragment = findFragmentByTag(RoomCabinFragment.class);
|
||||||
if (roomCabinFragment != null && roomCabinFragment.isAdded()) {
|
if (roomCabinFragment != null && roomCabinFragment.isAdded()) {
|
||||||
roomCabinFragment.roomInfoUpdate(mRoomInfoResp);
|
roomCabinFragment.roomInfoUpdate(mRoomInfoResp);
|
||||||
@@ -367,7 +367,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
|||||||
friendshipRoomFragment.friendSeatDidChanged(pitArr);
|
friendshipRoomFragment.friendSeatDidChanged(pitArr);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void upFriendList(List<RoomPitBean> pitArr){
|
public void upFriendList(List<RoomPitBean> pitArr) {
|
||||||
FriendshipRoomFragment friendshipRoomFragment = findFragmentByTag(FriendshipRoomFragment.class);
|
FriendshipRoomFragment friendshipRoomFragment = findFragmentByTag(FriendshipRoomFragment.class);
|
||||||
if (friendshipRoomFragment != null) {
|
if (friendshipRoomFragment != null) {
|
||||||
friendshipRoomFragment.upFriendList();
|
friendshipRoomFragment.upFriendList();
|
||||||
@@ -477,8 +477,10 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
|||||||
transaction.commitAllowingStateLoss();
|
transaction.commitAllowingStateLoss();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调用特定Fragment的销毁方法
|
* 调用特定Fragment的销毁方法
|
||||||
|
*
|
||||||
* @param fragment 需要销毁的Fragment
|
* @param fragment 需要销毁的Fragment
|
||||||
*/
|
*/
|
||||||
private void callSpecificDestroyMethod(Fragment fragment) {
|
private void callSpecificDestroyMethod(Fragment fragment) {
|
||||||
@@ -562,7 +564,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
|||||||
singSongFragment.upRoomInfo(mRoomInfoResp);
|
singSongFragment.upRoomInfo(mRoomInfoResp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else if ("6".equals(typeId)){
|
} else if ("6".equals(typeId)) {
|
||||||
RoomCabinFragment roomCabinFragment = findFragmentByTag(RoomCabinFragment.class);
|
RoomCabinFragment roomCabinFragment = findFragmentByTag(RoomCabinFragment.class);
|
||||||
if (roomCabinFragment != null && roomCabinFragment.isAdded()) {
|
if (roomCabinFragment != null && roomCabinFragment.isAdded()) {
|
||||||
roomCabinFragment.upRoomInfo(mRoomInfoResp);
|
roomCabinFragment.upRoomInfo(mRoomInfoResp);
|
||||||
@@ -813,19 +815,6 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
|||||||
EventBus.getDefault().post(list);
|
EventBus.getDefault().post(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
// for (int i = 0; i < list.size(); i++) {
|
|
||||||
// for (int j = 0; j < mRoomInfoResp.getRoom_info().getPit_list().size(); j++) {
|
|
||||||
// if (list.get(i).getUser_id().equals( mRoomInfoResp.getRoom_info().getPit_list().get(j).getUser_id())) {
|
|
||||||
// mRoomInfoResp.getRoom_info().getPit_list().get(j).setIs_online(list.get(i).getIs_online());
|
|
||||||
// if (list.get(i).getIs_online() == 1 && mRoomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId())){
|
|
||||||
// AgoraManager.getInstance(getActivity()).ClientRole(true);
|
|
||||||
// }
|
|
||||||
// EventBus.getDefault().post(mRoomInfoResp.getRoom_info().getPit_list().get(j));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// EventBus.getDefault().post(mRoomInfoResp);
|
|
||||||
// refreshData(mRoomInfoResp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1014,6 +1003,9 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
|||||||
case 1003:
|
case 1003:
|
||||||
auctionFragment.event1003(messageEvent);
|
auctionFragment.event1003(messageEvent);
|
||||||
break;
|
break;
|
||||||
|
case 1059:
|
||||||
|
auctionFragment.event1059(messageEvent);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// 可以添加默认处理或日志记录
|
// 可以添加默认处理或日志记录
|
||||||
LogUtils.w("Unhandled auction message type: " + messageEvent.getMsgType());
|
LogUtils.w("Unhandled auction message type: " + messageEvent.getMsgType());
|
||||||
@@ -1022,15 +1014,30 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void friendshipRoomFragmentEvent(RoomMessageEvent messageEvent) {
|
||||||
|
FriendshipRoomFragment friendshipRoomFragment = (FriendshipRoomFragment) getChildFragmentManager()
|
||||||
|
.findFragmentByTag(FriendshipRoomFragment.class.getSimpleName());
|
||||||
|
if (friendshipRoomFragment != null) {
|
||||||
|
friendshipRoomFragment.upRoomInfo(mRoomInfoResp);
|
||||||
|
switch (messageEvent.getMsgType()) {
|
||||||
|
case 1059:
|
||||||
|
friendshipRoomFragment.event1059(messageEvent);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO: 2025/9/3 小黑屋火热值更新
|
// TODO: 2025/9/3 小黑屋火热值更新
|
||||||
public void handleMsgType1028(RoomMessageEvent messageEvent){
|
public void handleMsgType1028(RoomMessageEvent messageEvent) {
|
||||||
RoomCabinFragment cabinFragment = (RoomCabinFragment) getChildFragmentManager()
|
RoomCabinFragment cabinFragment = (RoomCabinFragment) getChildFragmentManager()
|
||||||
.findFragmentByTag(RoomCabinFragment.class.getSimpleName());
|
.findFragmentByTag(RoomCabinFragment.class.getSimpleName());
|
||||||
if (cabinFragment != null){
|
if (cabinFragment != null) {
|
||||||
cabinFragment.handleMsgType1028(messageEvent);
|
cabinFragment.handleMsgType1028(messageEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO: 2025/8/30 Ktv模式
|
// TODO: 2025/8/30 Ktv模式
|
||||||
public void KtvFragmentEvent(RoomMessageEvent messageEvent) {
|
public void KtvFragmentEvent(RoomMessageEvent messageEvent) {
|
||||||
RoomKtvFragment ktvFragment = (RoomKtvFragment) getChildFragmentManager()
|
RoomKtvFragment ktvFragment = (RoomKtvFragment) getChildFragmentManager()
|
||||||
@@ -1055,6 +1062,9 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
|||||||
case 1035:
|
case 1035:
|
||||||
ktvFragment.event1035(messageEvent);
|
ktvFragment.event1035(messageEvent);
|
||||||
break;
|
break;
|
||||||
|
case 1059:
|
||||||
|
ktvFragment.event1059(messageEvent);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// 可以添加默认处理或日志记录
|
// 可以添加默认处理或日志记录
|
||||||
LogUtils.w("Unhandled auction message type: " + messageEvent.getMsgType());
|
LogUtils.w("Unhandled auction message type: " + messageEvent.getMsgType());
|
||||||
@@ -1103,6 +1113,10 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
|||||||
break;
|
break;
|
||||||
case 1021:
|
case 1021:
|
||||||
singSongFragment.event1021(messageEvent);
|
singSongFragment.event1021(messageEvent);
|
||||||
|
break;
|
||||||
|
case 1059:
|
||||||
|
singSongFragment.event1059(messageEvent);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// 可以添加默认处理或日志记录
|
// 可以添加默认处理或日志记录
|
||||||
LogUtils.w("Unhandled auction message type: " + messageEvent.getMsgType());
|
LogUtils.w("Unhandled auction message type: " + messageEvent.getMsgType());
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
package com.example.moduleroom.fragment;
|
package com.example.moduleroom.fragment;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.graphics.Rect;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.TouchDelegate;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
||||||
import android.view.animation.AnimationUtils;
|
import android.view.animation.AnimationUtils;
|
||||||
import android.view.animation.LinearInterpolator;
|
import android.view.animation.LinearInterpolator;
|
||||||
@@ -19,6 +24,7 @@ import com.example.moduleroom.R;
|
|||||||
import com.example.moduleroom.activity.RoomActivity;
|
import com.example.moduleroom.activity.RoomActivity;
|
||||||
import com.example.moduleroom.contacts.RoomContacts;
|
import com.example.moduleroom.contacts.RoomContacts;
|
||||||
import com.example.moduleroom.databinding.FragmentRoomKtvBinding;
|
import com.example.moduleroom.databinding.FragmentRoomKtvBinding;
|
||||||
|
import com.example.moduleroom.dialog.RoomCharmDialog;
|
||||||
import com.example.moduleroom.dialog.RoomGiftDialogFragment;
|
import com.example.moduleroom.dialog.RoomGiftDialogFragment;
|
||||||
import com.example.moduleroom.dialog.RoomOnlineDialogFragment;
|
import com.example.moduleroom.dialog.RoomOnlineDialogFragment;
|
||||||
import com.example.moduleroom.dialog.RoomUserInfoFragment;
|
import com.example.moduleroom.dialog.RoomUserInfoFragment;
|
||||||
@@ -35,6 +41,7 @@ import com.xscm.moduleutil.bean.room.RoomPitBean;
|
|||||||
import com.xscm.moduleutil.rtc.AgoraManager;
|
import com.xscm.moduleutil.rtc.AgoraManager;
|
||||||
import com.xscm.moduleutil.rtc.MusicFileBean;
|
import com.xscm.moduleutil.rtc.MusicFileBean;
|
||||||
import com.xscm.moduleutil.rtc.MusicPlayBean;
|
import com.xscm.moduleutil.rtc.MusicPlayBean;
|
||||||
|
import com.xscm.moduleutil.utils.ClickUtils;
|
||||||
import com.xscm.moduleutil.utils.ImageUtils;
|
import com.xscm.moduleutil.utils.ImageUtils;
|
||||||
import com.xscm.moduleutil.utils.SpUtil;
|
import com.xscm.moduleutil.utils.SpUtil;
|
||||||
import com.xscm.moduleutil.widget.RoomKtvWheatView;
|
import com.xscm.moduleutil.widget.RoomKtvWheatView;
|
||||||
@@ -81,6 +88,29 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
|||||||
// roomInfoResp = (RoomInfoResp) getArguments().getSerializable("roomInfo");
|
// roomInfoResp = (RoomInfoResp) getArguments().getSerializable("roomInfo");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||||
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
// 设置触摸委托以扩大点击区域
|
||||||
|
// view.post(() -> {
|
||||||
|
// View muZc = view.findViewById(R.id.mu_zc);
|
||||||
|
// ViewGroup parent = (ViewGroup) muZc.getParent();
|
||||||
|
//
|
||||||
|
// Rect bounds = new Rect();
|
||||||
|
// muZc.getHitRect(bounds);
|
||||||
|
// // 扩展点击区域
|
||||||
|
// bounds.top -=55;
|
||||||
|
// bounds.bottom += 50;
|
||||||
|
// bounds.left -= 30;
|
||||||
|
// bounds.right += 30;
|
||||||
|
//
|
||||||
|
// parent.setTouchDelegate(new TouchDelegate(bounds, muZc));
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
|
||||||
|
public View getNegativeMarginView() {
|
||||||
|
return mBinding.muZc;
|
||||||
|
}
|
||||||
public void upRoomInfo(RoomInfoResp roomInfoResp) {
|
public void upRoomInfo(RoomInfoResp roomInfoResp) {
|
||||||
this.roomInfoResp = roomInfoResp;
|
this.roomInfoResp = roomInfoResp;
|
||||||
}
|
}
|
||||||
@@ -145,6 +175,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
|||||||
pitBean.setNickname(roomInfoResp.getSong_user_info().getNickname());
|
pitBean.setNickname(roomInfoResp.getSong_user_info().getNickname());
|
||||||
pitBean.setUser_id(roomInfoResp.getSong_user_info().getUser_id());
|
pitBean.setUser_id(roomInfoResp.getSong_user_info().getUser_id());
|
||||||
pitBean.setCharm(roomInfoResp.getSong_user_info().getCharm());
|
pitBean.setCharm(roomInfoResp.getSong_user_info().getCharm());
|
||||||
|
pitBean.setDress(roomInfoResp.getSong_user_info().getDress());
|
||||||
roomDefaultWheatView.setData(pitBean);
|
roomDefaultWheatView.setData(pitBean);
|
||||||
} else {
|
} else {
|
||||||
RoomKtvWheatView roomDefaultWheatView = mBinding.muYc;
|
RoomKtvWheatView roomDefaultWheatView = mBinding.muYc;
|
||||||
@@ -318,10 +349,25 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
|||||||
mu_rank.setOnClickListener(new View.OnClickListener() {
|
mu_rank.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
if (ClickUtils.isFastDoubleClick()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
RoomKtvWheatView roomDefaultWheatView = (RoomKtvWheatView) v;
|
RoomKtvWheatView roomDefaultWheatView = (RoomKtvWheatView) v;
|
||||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), roomDefaultWheatView.getUserId(), roomDefaultWheatView.pitNumber, getHostUser(), false, 2, isNumberWhether(), getChildFragmentManager());
|
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), roomDefaultWheatView.getUserId(), roomDefaultWheatView.pitNumber, getHostUser(), false, 2, isNumberWhether(), getChildFragmentManager());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
mu_rank.setmOnCharmClickListener(new RoomKtvWheatView.onCharmClickListener(){
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCharmClick(RoomKtvWheatView view, RoomPitBean pitBean) {
|
||||||
|
if (ClickUtils.isFastDoubleClick()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (pitBean.getUser_id()!=null && !pitBean.getUser_id().isEmpty() && !pitBean.getUser_id().equals("0")) {
|
||||||
|
RoomCharmDialog.newInstance(roomInfoResp.getRoom_info().getRoom_id(), pitBean.getUser_id()).show(getChildFragmentManager(), "RoomCharmDialog");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
mBinding.recyclerView.setAdapter(adapter);
|
mBinding.recyclerView.setAdapter(adapter);
|
||||||
@@ -333,16 +379,33 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
|||||||
muYc.setOnClickListener(new View.OnClickListener() {
|
muYc.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
if (ClickUtils.isFastDoubleClick()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!muYc.getUserId().equals("")) {
|
if (!muYc.getUserId().equals("")) {
|
||||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), muYc.getUserId(), muYc.pitNumber, getHostUser(), false, 2, isNumberWhether(), getChildFragmentManager());
|
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), muYc.getUserId(), muYc.pitNumber, getHostUser(), false, 2, isNumberWhether(), getChildFragmentManager());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
muYc.setmOnCharmClickListener(new RoomKtvWheatView.onCharmClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onCharmClick(RoomKtvWheatView view, RoomPitBean pitBean) {
|
||||||
|
if (ClickUtils.isFastDoubleClick()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (pitBean.getUser_id()!=null && !pitBean.getUser_id().isEmpty() && !pitBean.getUser_id().equals("0")) {
|
||||||
|
RoomCharmDialog.newInstance(roomInfoResp.getRoom_info().getRoom_id(), pitBean.getUser_id()).show(getChildFragmentManager(), "RoomCharmDialog");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
RoomKtvWheatView muZc = mBinding.muZc;
|
RoomKtvWheatView muZc = mBinding.muZc;
|
||||||
muZc.setOnClickListener(new View.OnClickListener() {
|
muZc.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
if (ClickUtils.isFastDoubleClick()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!muZc.getUserId().equals("")) {
|
if (!muZc.getUserId().equals("")) {
|
||||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), muZc.getUserId(), muZc.pitNumber, getHostUser(), false, 2, isNumberWhether(), getChildFragmentManager());
|
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), muZc.getUserId(), muZc.pitNumber, getHostUser(), false, 2, isNumberWhether(), getChildFragmentManager());
|
||||||
} else {
|
} else {
|
||||||
@@ -350,10 +413,24 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
muYc.setmOnCharmClickListener(new RoomKtvWheatView.onCharmClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onCharmClick(RoomKtvWheatView view, RoomPitBean pitBean) {
|
||||||
|
if (ClickUtils.isFastDoubleClick()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (pitBean.getUser_id()!=null && !pitBean.getUser_id().isEmpty() && !pitBean.getUser_id().equals("0")) {
|
||||||
|
RoomCharmDialog.newInstance(roomInfoResp.getRoom_info().getRoom_id(), pitBean.getUser_id()).show(getChildFragmentManager(), "RoomCharmDialog");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
RoomKtvWheatView muJb = mBinding.muJb;
|
RoomKtvWheatView muJb = mBinding.muJb;
|
||||||
muJb.setOnClickListener(new View.OnClickListener() {
|
muJb.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
if (ClickUtils.isFastDoubleClick()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!muJb.getUserId().equals("")) {
|
if (!muJb.getUserId().equals("")) {
|
||||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), muJb.getUserId(), muJb.pitNumber, getHostUser(), false, 2, isNumberWhether(), getChildFragmentManager());
|
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), muJb.getUserId(), muJb.pitNumber, getHostUser(), false, 2, isNumberWhether(), getChildFragmentManager());
|
||||||
} else {
|
} else {
|
||||||
@@ -362,6 +439,28 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
muJb.setmOnCharmClickListener(new RoomKtvWheatView.onCharmClickListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCharmClick(RoomKtvWheatView view, RoomPitBean pitBean) {
|
||||||
|
if (ClickUtils.isFastDoubleClick()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (pitBean.getUser_id()!=null && !pitBean.getUser_id().isEmpty() && !pitBean.getUser_id().equals("0")) {
|
||||||
|
RoomCharmDialog.newInstance(roomInfoResp.getRoom_info().getRoom_id(), pitBean.getUser_id()).show(getChildFragmentManager(), "RoomCharmDialog");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 设置透明覆盖层的点击事件
|
||||||
|
// View touchOverlay = mBinding.getRoot().findViewById(R.id.mu_zc_touch_overlay);
|
||||||
|
//
|
||||||
|
// touchOverlay.setOnClickListener(v -> {
|
||||||
|
// // 转发点击事件给实际的 mu_zc 视图
|
||||||
|
// muZc.performClick();
|
||||||
|
// });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private int isNumberWhether() {
|
private int isNumberWhether() {
|
||||||
@@ -571,6 +670,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
|||||||
pitBean.setNickname(messageEvent.getText().getSongInfo().getNickname());
|
pitBean.setNickname(messageEvent.getText().getSongInfo().getNickname());
|
||||||
pitBean.setUser_id(messageEvent.getText().getSongInfo().getUser_id());
|
pitBean.setUser_id(messageEvent.getText().getSongInfo().getUser_id());
|
||||||
pitBean.setCharm(messageEvent.getText().getSongInfo().getCharm());
|
pitBean.setCharm(messageEvent.getText().getSongInfo().getCharm());
|
||||||
|
pitBean.setDress(messageEvent.getText().getSongInfo().getDress());
|
||||||
roomDefaultWheatView.setData(pitBean);
|
roomDefaultWheatView.setData(pitBean);
|
||||||
roomInfoResp.setSong_user_info(musicSongBean);
|
roomInfoResp.setSong_user_info(musicSongBean);
|
||||||
|
|
||||||
@@ -590,15 +690,15 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
|||||||
((RoomActivity) getActivity()).switchMic(1);
|
((RoomActivity) getActivity()).switchMic(1);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (roomInfoResp.getUser_info().getPit_number()>0){
|
if (roomInfoResp.getUser_info().getPit_number() > 0) {
|
||||||
|
|
||||||
}else {
|
} else {
|
||||||
// if (mBinding.muZc.pitBean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
// if (mBinding.muZc.pitBean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||||
// ((RoomActivity) getActivity()).setRoleType(2, -1);
|
// ((RoomActivity) getActivity()).setRoleType(2, -1);
|
||||||
// ((RoomActivity) getActivity()).switchMic(2);
|
// ((RoomActivity) getActivity()).switchMic(2);
|
||||||
// } else {
|
// } else {
|
||||||
((RoomActivity) getActivity()).setRoleType(0, 0);
|
((RoomActivity) getActivity()).setRoleType(0, 0);
|
||||||
((RoomActivity) getActivity()).switchMic(2);
|
((RoomActivity) getActivity()).switchMic(2);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
@@ -660,7 +760,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
RoomPitBean pitBean = new RoomPitBean();
|
RoomPitBean pitBean = new RoomPitBean();
|
||||||
pitBean.setPit_number(messageEvent.getText().getPit_number()!=null ? messageEvent.getText().getPit_number() : "9999");
|
pitBean.setPit_number(messageEvent.getText().getPit_number() != null ? messageEvent.getText().getPit_number() : "9999");
|
||||||
pitBean.setUser_id(messageEvent.getText().getFromUserInfo().getUser_id() + "");
|
pitBean.setUser_id(messageEvent.getText().getFromUserInfo().getUser_id() + "");
|
||||||
pitBean.setAvatar(messageEvent.getText().getFromUserInfo().getAvatar());
|
pitBean.setAvatar(messageEvent.getText().getFromUserInfo().getAvatar());
|
||||||
pitBean.setNickname(messageEvent.getText().getFromUserInfo().getNickname());
|
pitBean.setNickname(messageEvent.getText().getFromUserInfo().getNickname());
|
||||||
@@ -755,6 +855,34 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
|||||||
adapter.setNewData(roomInfoResp.getSong_pit_list());
|
adapter.setNewData(roomInfoResp.getSong_pit_list());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void event1059(RoomMessageEvent messageEvent) {
|
||||||
|
RoomPitBean pitBean = mBinding.muZc.pitBean;
|
||||||
|
if (pitBean.getUser_id().equals(messageEvent.getText().getUser_id())) {
|
||||||
|
pitBean.setCharm("");
|
||||||
|
mBinding.muZc.setData(pitBean);
|
||||||
|
|
||||||
|
}
|
||||||
|
RoomPitBean pitBean1 = mBinding.muJb.pitBean;
|
||||||
|
if (pitBean1.getUser_id().equals(messageEvent.getText().getUser_id())) {
|
||||||
|
pitBean1.setCharm("");
|
||||||
|
mBinding.muJb.setData(pitBean1);
|
||||||
|
|
||||||
|
}
|
||||||
|
RoomPitBean pitBean2 = mBinding.muYc.pitBean;
|
||||||
|
if (pitBean2.getUser_id().equals(messageEvent.getText().getUser_id())) {
|
||||||
|
pitBean2.setCharm("");
|
||||||
|
mBinding.muYc.setData(pitBean2);
|
||||||
|
|
||||||
|
}
|
||||||
|
for (int i = 0; i < roomInfoResp.getSong_pit_list().size(); i++) {
|
||||||
|
if (roomInfoResp.getSong_pit_list().get(i).getUser_id().equals(messageEvent.getText().getUser_id())) {
|
||||||
|
roomInfoResp.getSong_pit_list().get(i).setCharm("");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
adapter.setNewData(roomInfoResp.getSong_pit_list());
|
||||||
|
}
|
||||||
|
|
||||||
public void event1035(RoomMessageEvent messageEvent) {
|
public void event1035(RoomMessageEvent messageEvent) {
|
||||||
RoomPitBean pitBean = mBinding.muZc.pitBean;
|
RoomPitBean pitBean = mBinding.muZc.pitBean;
|
||||||
if (pitBean.getUser_id().equals(messageEvent.getText().getFromUserInfo().getUser_id() + "")) {
|
if (pitBean.getUser_id().equals(messageEvent.getText().getFromUserInfo().getUser_id() + "")) {
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import com.example.moduleroom.activity.RoomActivity;
|
|||||||
import com.example.moduleroom.contacts.SingSongContacts;
|
import com.example.moduleroom.contacts.SingSongContacts;
|
||||||
import com.example.moduleroom.databinding.FragmentSingSongBinding;
|
import com.example.moduleroom.databinding.FragmentSingSongBinding;
|
||||||
import com.example.moduleroom.dialog.PkTimeDialogFragment;
|
import com.example.moduleroom.dialog.PkTimeDialogFragment;
|
||||||
|
import com.example.moduleroom.dialog.RoomCharmDialog;
|
||||||
import com.example.moduleroom.dialog.RoomOnlineDialogFragment;
|
import com.example.moduleroom.dialog.RoomOnlineDialogFragment;
|
||||||
import com.example.moduleroom.dialog.RoomUserInfoFragment;
|
import com.example.moduleroom.dialog.RoomUserInfoFragment;
|
||||||
import com.example.moduleroom.presenter.SingSongPresenter;
|
import com.example.moduleroom.presenter.SingSongPresenter;
|
||||||
@@ -398,6 +399,11 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
public void onMakeWheatClick(RoomSingSongWheatView view, int pitNumber) {
|
public void onMakeWheatClick(RoomSingSongWheatView view, int pitNumber) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onMeilingClick(RoomSingSongWheatView view, int pitNumber) {
|
||||||
|
ToastUtils.show("点击魅力值");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -463,7 +469,13 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMakeWheatClick(RoomSingSongWheatView view, int pitNumber) {
|
public void onMakeWheatClick(RoomSingSongWheatView view, int pitNumber) {
|
||||||
|
ToastUtils.show("点击麦位");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onMeilingClick(RoomSingSongWheatView view, int pitNumber) {
|
||||||
|
// ToastUtils.show("点击魅力值");
|
||||||
|
RoomCharmDialog.newInstance(roomId, view.pitBean.getUser_id()).show(getChildFragmentManager(), "RoomCharmDialog");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
List<RoomPitBean> pitList = new ArrayList<>();
|
List<RoomPitBean> pitList = new ArrayList<>();
|
||||||
@@ -1260,6 +1272,25 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void event1059(RoomMessageEvent message){
|
||||||
|
String userId = message.getText().getUser_id();
|
||||||
|
RoomPitBean pitBean=new RoomPitBean();
|
||||||
|
for (RoomPitBean roomPitBean : roomInfoResp.getRoom_info().getPit_list()){
|
||||||
|
if (roomPitBean.getUser_id().equals(userId)){
|
||||||
|
pitBean=roomPitBean;
|
||||||
|
pitBean.setCharm("");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (roomInfoRespPk == null || roomInfoRespPk.getPk_info() == null) {
|
||||||
|
wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
||||||
|
} else {
|
||||||
|
wheatLayoutManager1.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// 推送的下麦1003
|
/// 推送的下麦1003
|
||||||
public void event1003(RoomMessageEvent message) {
|
public void event1003(RoomMessageEvent message) {
|
||||||
boolean b = false;
|
boolean b = false;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.example.moduleroom.presenter;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
import com.example.moduleroom.contacts.RoomContacts;
|
import com.example.moduleroom.contacts.RoomContacts;
|
||||||
import com.xscm.moduleutil.base.CommonAppContext;
|
import com.xscm.moduleutil.base.CommonAppContext;
|
||||||
import com.xscm.moduleutil.bean.RoomCharmRankBean;
|
import com.xscm.moduleutil.bean.RoomCharmRankBean;
|
||||||
@@ -57,7 +58,8 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
|||||||
if (resp.getUser_info().getPit_number()!=0){
|
if (resp.getUser_info().getPit_number()!=0){
|
||||||
enableJs=true;
|
enableJs=true;
|
||||||
}
|
}
|
||||||
|
LogUtils.e("token",token);
|
||||||
|
LogUtils.e("roomId:",roomId);
|
||||||
// 初始化 Agora 并加入房间
|
// 初始化 Agora 并加入房间
|
||||||
AgoraManager.getInstance(getView().getSelfActivity())
|
AgoraManager.getInstance(getView().getSelfActivity())
|
||||||
.joinRoom(token, roomId, uid, enableMic,enableJs);
|
.joinRoom(token, roomId, uid, enableMic,enableJs);
|
||||||
|
|||||||
@@ -172,6 +172,25 @@ public class RoomUserPresenter extends BasePresenter<RoomUserContacts.View> impl
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearUserCharm(String roomId, String userId) {
|
||||||
|
api.clearUserCharm(roomId, userId, new BaseObserver<String>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(Disposable d) {
|
||||||
|
addDisposable(d);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(String s) {
|
||||||
|
if (MvpRef==null){
|
||||||
|
MvpRef=new WeakReference<>(mView);
|
||||||
|
}
|
||||||
|
MvpRef.get().clearUserCharm();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void kickOutRoom(String roomId, String userId) {
|
public void kickOutRoom(String roomId, String userId) {
|
||||||
if (api==null){
|
if (api==null){
|
||||||
|
|||||||
@@ -13,7 +13,8 @@
|
|||||||
android:layout_height="@dimen/dp_277"
|
android:layout_height="@dimen/dp_277"
|
||||||
android:layout_marginStart="@dimen/dp_16"
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
android:layout_marginTop="@dimen/dp_13"
|
android:layout_marginTop="@dimen/dp_13"
|
||||||
android:layout_marginEnd="@dimen/dp_16">
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
|
android:clipChildren="false">
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
@@ -30,23 +31,23 @@
|
|||||||
android:id="@+id/music_poster"
|
android:id="@+id/music_poster"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="fitXY"
|
|
||||||
android:alpha="0.3"
|
android:alpha="0.3"
|
||||||
android:background="#40000000"
|
android:background="#40000000"
|
||||||
|
android:scaleType="fitXY"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<!-- <View-->
|
<!-- <View-->
|
||||||
<!-- android:layout_width="0dp"-->
|
<!-- android:layout_width="0dp"-->
|
||||||
<!-- android:layout_height="match_parent"-->
|
<!-- android:layout_height="match_parent"-->
|
||||||
<!-- android:alpha="0.9"-->
|
<!-- android:alpha="0.9"-->
|
||||||
<!-- android:background="#90000000"-->
|
<!-- android:background="#90000000"-->
|
||||||
<!-- android:clickable="false"-->
|
<!-- android:clickable="false"-->
|
||||||
<!-- android:focusable="false"-->
|
<!-- android:focusable="false"-->
|
||||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||||
<!-- app:layout_constraintDimensionRatio="1.4:1.5"-->
|
<!-- app:layout_constraintDimensionRatio="1.4:1.5"-->
|
||||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_jz"
|
android:id="@+id/tv_jz"
|
||||||
@@ -309,23 +310,36 @@
|
|||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.RoomKtvWheatView
|
<com.xscm.moduleutil.widget.RoomKtvWheatView
|
||||||
android:id="@+id/mu_zc"
|
android:id="@+id/mu_zc"
|
||||||
android:layout_width="@dimen/dp_62"
|
android:layout_width="@dimen/dp_62"
|
||||||
android:layout_height="@dimen/dp_88"
|
android:layout_height="@dimen/dp_88"
|
||||||
android:layout_marginTop="-55dp"
|
android:layout_marginTop="-55dp"
|
||||||
android:layout_marginEnd="@dimen/dp_5"
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:clickable="true"
|
||||||
|
android:elevation="10dp"
|
||||||
|
android:focusable="true"
|
||||||
|
android:foreground="?android:attr/selectableItemBackground"
|
||||||
|
android:translationZ="30dp"
|
||||||
app:layout_constraintDimensionRatio="1:1"
|
app:layout_constraintDimensionRatio="1:1"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/cl_bj"
|
app:layout_constraintStart_toEndOf="@+id/cl_bj"
|
||||||
android:translationZ="10dp"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:room_wheat_number="9"
|
app:room_wheat_number="9" />
|
||||||
android:elevation="10dp"
|
<!-- 在 mu_zc 视图后面添加 -->
|
||||||
android:clickable="true"
|
<!-- <View-->
|
||||||
android:focusable="true"
|
<!-- android:id="@+id/mu_zc_touch_overlay"-->
|
||||||
android:foreground="?android:attr/selectableItemBackground"/>
|
<!-- android:layout_width="@dimen/dp_62"-->
|
||||||
|
<!-- android:layout_height="@dimen/dp_120"-->
|
||||||
|
<!-- android:layout_marginTop="-70dp"-->
|
||||||
|
<!-- android:layout_marginEnd="@dimen/dp_5"-->
|
||||||
|
<!-- android:background="@android:color/transparent"-->
|
||||||
|
<!-- android:clickable="true"-->
|
||||||
|
<!-- android:focusable="true"-->
|
||||||
|
<!-- app:layout_constraintDimensionRatio="1:1"-->
|
||||||
|
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||||
|
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||||
|
<!-- app:layout_constraintStart_toEndOf="@+id/cl_bj" />-->
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.RoomKtvWheatView
|
<com.xscm.moduleutil.widget.RoomKtvWheatView
|
||||||
android:id="@+id/mu_jb"
|
android:id="@+id/mu_jb"
|
||||||
@@ -335,19 +349,18 @@
|
|||||||
android:layout_marginEnd="@dimen/dp_5"
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
app:layout_constraintDimensionRatio="1:1"
|
app:layout_constraintDimensionRatio="1:1"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/mu_zc"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/cl_bj"
|
app:layout_constraintStart_toEndOf="@+id/cl_bj"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/mu_zc"
|
||||||
app:room_wheat_number="10" />
|
app:room_wheat_number="10" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recycler_view"
|
android:id="@+id/recycler_view"
|
||||||
android:layout_width="@dimen/dp_62"
|
android:layout_width="@dimen/dp_62"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
app:layout_constraintHeight_default="wrap"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHeight_default="wrap"
|
||||||
app:layout_constraintStart_toEndOf="@+id/cl_bj"
|
app:layout_constraintStart_toEndOf="@+id/cl_bj"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/mu_jb"
|
app:layout_constraintTop_toBottomOf="@+id/mu_jb" />
|
||||||
/>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dp_2"
|
android:layout_marginStart="@dimen/dp_2"
|
||||||
android:layout_marginEnd="@dimen/dp_2"
|
android:layout_marginEnd="@dimen/dp_2"
|
||||||
android:layout_marginBottom="@dimen/dp_12"
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
android:background="@mipmap/gift_mh"
|
android:background="@mipmap/gift_mh"
|
||||||
android:layout_above="@+id/cl"
|
android:layout_above="@+id/cl"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
|||||||
@@ -229,7 +229,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_toEndOf="@+id/rl"
|
android:layout_toEndOf="@+id/rl"
|
||||||
android:layout_marginTop="@dimen/dp_50"
|
android:layout_marginTop="@dimen/dp_40"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:layout="@layout/top_overlay_buttons"
|
android:layout="@layout/top_overlay_buttons"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
|||||||
@@ -115,8 +115,15 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
|
|||||||
if (MvpPre == null){
|
if (MvpPre == null){
|
||||||
MvpPre = bindPresenter();
|
MvpPre = bindPresenter();
|
||||||
}
|
}
|
||||||
|
|
||||||
MvpPre.clearLoginInfo();
|
MvpPre.clearLoginInfo();
|
||||||
|
|
||||||
|
try {
|
||||||
|
CommonAppContext.getInstance().clearLoginInfo();
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setNegativeButton("取消", null).create().show();
|
.setNegativeButton("取消", null).create().show();
|
||||||
|
|||||||
Reference in New Issue
Block a user