修改BUG,修改页面适配问题
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package com.xscm.moduleutil.service;
|
package com.xscm.moduleutil.service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import android.app.Notification;
|
import android.app.Notification;
|
||||||
import android.app.NotificationChannel;
|
import android.app.NotificationChannel;
|
||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
@@ -15,6 +14,7 @@ import android.os.Build;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.HandlerThread;
|
import android.os.HandlerThread;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
|
import android.os.Looper;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
|
||||||
@@ -39,15 +39,16 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
|
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
|
||||||
public class MyMqttService extends Service implements MyEmqttConnectListener,MyEmqttMesgListener,MyEmqttSubscribeListener{
|
public class MyMqttService extends Service implements MyEmqttConnectListener, MyEmqttMesgListener, MyEmqttSubscribeListener {
|
||||||
|
|
||||||
private final static String TAG = "lxj";
|
private final static String TAG = "lxj";
|
||||||
|
|
||||||
private static int qos = 2;
|
private static int qos = 2;
|
||||||
// private static String HOST ="tcp://81.70.45.221";//正式
|
// private static String HOST ="tcp://81.70.45.221";//正式
|
||||||
private static String HOST ="tcp://47.120.21.132";//测试
|
private static String HOST = "tcp://47.120.21.132";//测试
|
||||||
private static MqttAndroidClient mqttAndroidClient;
|
private static MqttAndroidClient mqttAndroidClient;
|
||||||
private MqttConnectOptions mMqttConnectOptions;
|
private MqttConnectOptions mMqttConnectOptions;
|
||||||
private static boolean b = true;
|
private static boolean b = true;
|
||||||
@@ -178,75 +179,91 @@ public class MyMqttService extends Service implements MyEmqttConnectListener,MyE
|
|||||||
*
|
*
|
||||||
* @param message 消息
|
* @param message 消息
|
||||||
*/
|
*/
|
||||||
public static void publish(String topic, String message) throws MqttException {
|
public static void publish(String topic, String message) {
|
||||||
if (mqttAndroidClient == null) {
|
if (mqttAndroidClient == null) {
|
||||||
Logger.e(TAG, "mqttAndroidClient is null", "发送失败");
|
Logger.e(TAG, "mqttAndroidClient is null", "发送失败");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//参数分别为:主题、消息的字节数组、服务质量、是否在服务器保留断开连接后的最后一条消息
|
|
||||||
IMqttDeliveryToken publish = mqttAndroidClient.publish(topic, message.getBytes(), qos, false);
|
|
||||||
publish.setActionCallback(new IMqttActionListener() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(IMqttToken asyncActionToken) {
|
|
||||||
Logger.e(TAG, "发送消息", "发送成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
// 在后台线程执行发布操作
|
||||||
public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
|
Handler handler = new Handler(Looper.getMainLooper());
|
||||||
Logger.e(TAG, "发送消息", "发送失败");
|
handler.post(() -> {
|
||||||
|
try {
|
||||||
|
//参数分别为:主题、消息的字节数组、服务质量、是否在服务器保留断开连接后的最后一条消息
|
||||||
|
IMqttDeliveryToken publish = mqttAndroidClient.publish(topic, message.getBytes(), qos, false);
|
||||||
|
publish.setActionCallback(new IMqttActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(IMqttToken asyncActionToken) {
|
||||||
|
Logger.e(TAG, "发送消息", "发送成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
|
||||||
|
Logger.e(TAG, "发送消息", "发送失败: " + exception.getMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (Exception e) {
|
||||||
|
Logger.e(TAG, "发送消息", "发送异常: " + e.getMessage());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void subscribe(String topic) {
|
public static void subscribe(String topic) {
|
||||||
try {
|
// 在后台线程执行订阅操作
|
||||||
if (mqttAndroidClient.isConnected()) {
|
Handler handler = new Handler(Looper.getMainLooper());
|
||||||
IMqttToken subToken = mqttAndroidClient.subscribe(topic, qos);
|
handler.post(() -> {
|
||||||
subToken.setActionCallback(new IMqttActionListener() {
|
try {
|
||||||
@Override
|
if (mqttAndroidClient != null && mqttAndroidClient.isConnected()) {
|
||||||
public void onSuccess(IMqttToken asyncActionToken) {
|
IMqttToken subToken = mqttAndroidClient.subscribe(topic, qos);
|
||||||
if (mMyEmqttSubscribeListener != null) {
|
subToken.setActionCallback(new IMqttActionListener() {
|
||||||
mMyEmqttSubscribeListener.onSubscribeSuccess(topic);
|
@Override
|
||||||
|
public void onSuccess(IMqttToken asyncActionToken) {
|
||||||
|
if (mMyEmqttSubscribeListener != null) {
|
||||||
|
mMyEmqttSubscribeListener.onSubscribeSuccess(topic);
|
||||||
|
}
|
||||||
|
Logger.e(TAG, "订阅成功:" + topic);
|
||||||
}
|
}
|
||||||
Logger.e(TAG, "订阅成功:" + topic);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(IMqttToken asyncActionToken,
|
public void onFailure(IMqttToken asyncActionToken,
|
||||||
Throwable exception) {
|
Throwable exception) {
|
||||||
if (!TOPIC_BOSS.equals(topic) && mMyEmqttSubscribeListener != null) {
|
if (!TOPIC_BOSS.equals(topic) && mMyEmqttSubscribeListener != null) {
|
||||||
mMyEmqttSubscribeListener.onSubscribeFailure();
|
mMyEmqttSubscribeListener.onSubscribeFailure();
|
||||||
|
}
|
||||||
|
Logger.e(TAG, "订阅失败:" + topic + ", error: " + exception.getMessage());
|
||||||
}
|
}
|
||||||
Logger.e(TAG, "订阅失败:" + topic);
|
});
|
||||||
}
|
}
|
||||||
});
|
} catch (Exception e) {
|
||||||
|
Log.e(TAG, "订阅异常:" + topic, e);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
});
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void cleanSubscribe(String topic) {
|
public static void cleanSubscribe(String topic) {
|
||||||
try {
|
// 在后台线程执行取消订阅操作
|
||||||
if (mqttAndroidClient.isConnected()) {
|
Handler handler = new Handler(Looper.getMainLooper());
|
||||||
IMqttToken subToken = mqttAndroidClient.unsubscribe(topic);
|
handler.post(() -> {
|
||||||
subToken.setActionCallback(new IMqttActionListener() {
|
try {
|
||||||
@Override
|
if (mqttAndroidClient != null && mqttAndroidClient.isConnected()) {
|
||||||
public void onSuccess(IMqttToken asyncActionToken) {
|
IMqttToken subToken = mqttAndroidClient.unsubscribe(topic);
|
||||||
Logger.e(TAG, "取消成功" + topic);
|
subToken.setActionCallback(new IMqttActionListener() {
|
||||||
}
|
@Override
|
||||||
|
public void onSuccess(IMqttToken asyncActionToken) {
|
||||||
|
Logger.e(TAG, "取消成功" + topic);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(IMqttToken asyncActionToken,
|
public void onFailure(IMqttToken asyncActionToken,
|
||||||
Throwable exception) {
|
Throwable exception) {
|
||||||
Logger.e(TAG, "取消失败" + topic);
|
Logger.e(TAG, "取消失败" + topic + ", error: " + exception.getMessage());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e(TAG, "取消订阅异常:" + topic, e);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
});
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -265,67 +282,99 @@ public class MyMqttService extends Service implements MyEmqttConnectListener,MyE
|
|||||||
// mMqttConnectOptions.setPassword(new char[0]); //设置密码
|
// mMqttConnectOptions.setPassword(new char[0]); //设置密码
|
||||||
mMqttConnectOptions.setMqttVersion(MqttConnectOptions.MQTT_VERSION_3_1);
|
mMqttConnectOptions.setMqttVersion(MqttConnectOptions.MQTT_VERSION_3_1);
|
||||||
|
|
||||||
if (!mqttAndroidClient.isConnected()) {
|
if (mqttAndroidClient != null && !mqttAndroidClient.isConnected()) {
|
||||||
doClientConnection();
|
doClientConnection();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doClientConnection() throws MqttException {
|
private void doClientConnection() throws MqttException {
|
||||||
if (mqttAndroidClient != null && !mqttAndroidClient.isConnected() && isConnectIsNomarl() && b) {
|
// 在后台线程执行连接操作
|
||||||
mqttAndroidClient.connect(mMqttConnectOptions, null, iMqttActionListener);
|
mqttHandler.post(() -> {
|
||||||
}
|
if (mqttAndroidClient != null && !mqttAndroidClient.isConnected() && isConnectIsNomarl() && b) {
|
||||||
|
try {
|
||||||
|
mqttAndroidClient.connect(mMqttConnectOptions, null, iMqttActionListener);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e(TAG, "MQTT连接异常", e);
|
||||||
|
handleConnectionFailure();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void closeConnection() throws MqttException {
|
private void handleConnectionFailure() {
|
||||||
if (mqttAndroidClient.isConnected()) {
|
retryCount++;
|
||||||
IMqttToken disconnect = mqttAndroidClient.disconnect();
|
if (retryCount < MAX_RETRY_ATTEMPTS) {
|
||||||
disconnect.setActionCallback(new IMqttActionListener() {
|
// 延迟重试
|
||||||
@Override
|
mqttHandler.postDelayed(() -> {
|
||||||
public void onSuccess(IMqttToken asyncActionToken) {
|
if (b) {
|
||||||
Logger.e(TAG, "断开链接", "断开链接成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
|
|
||||||
Logger.e(TAG, "断开链接", "断开链接失败" + exception.getMessage());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 判断网络是否连接
|
|
||||||
*/
|
|
||||||
private boolean isConnectIsNomarl() {
|
|
||||||
ConnectivityManager connectivityManager = (ConnectivityManager) this.getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
|
|
||||||
NetworkInfo info = connectivityManager.getActiveNetworkInfo();
|
|
||||||
if (info != null && info.isAvailable()) {
|
|
||||||
String name = info.getTypeName();
|
|
||||||
Log.i(TAG, "当前网络名称:" + name);
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
Log.i(TAG, "没有可用网络");
|
|
||||||
/*没有可用网络的时候,延迟3秒再尝试重连*/
|
|
||||||
HandlerUtil.getInstance(this).postDelayed(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
try {
|
try {
|
||||||
doClientConnection();
|
doClientConnection();
|
||||||
} catch (MqttException e) {
|
} catch (MqttException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 3000);
|
}, 5000); // 5秒后重试
|
||||||
return false;
|
} else {
|
||||||
|
Log.w(TAG, "达到最大重试次数,停止重试");
|
||||||
|
retryCount = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void closeConnection() {
|
||||||
|
Handler handler = new Handler(Looper.getMainLooper());
|
||||||
|
handler.post(() -> {
|
||||||
|
try {
|
||||||
|
if (mqttAndroidClient != null && mqttAndroidClient.isConnected()) {
|
||||||
|
IMqttToken disconnect = mqttAndroidClient.disconnect();
|
||||||
|
disconnect.setActionCallback(new IMqttActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(IMqttToken asyncActionToken) {
|
||||||
|
Logger.e(TAG, "断开链接", "断开链接成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
|
||||||
|
Logger.e(TAG, "断开链接", "断开链接失败" + exception.getMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e(TAG, "关闭连接异常", e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断网络是否连接
|
||||||
|
*/
|
||||||
|
private boolean isConnectIsNomarl() {
|
||||||
|
try {
|
||||||
|
ConnectivityManager connectivityManager = (ConnectivityManager) this.getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||||
|
if (connectivityManager != null) {
|
||||||
|
NetworkInfo info = connectivityManager.getActiveNetworkInfo();
|
||||||
|
if (info != null && info.isAvailable()) {
|
||||||
|
String name = info.getTypeName();
|
||||||
|
Log.i(TAG, "当前网络名称:" + name);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
Log.i(TAG, "没有可用网络");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e(TAG, "检查网络状态异常", e);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//MQTT是否连接成功的监听
|
//MQTT是否连接成功的监听
|
||||||
private IMqttActionListener iMqttActionListener = new IMqttActionListener() {
|
private IMqttActionListener iMqttActionListener = new IMqttActionListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(IMqttToken arg0) {
|
public void onSuccess(IMqttToken arg0) {
|
||||||
|
retryCount = 0; // 重置重试计数
|
||||||
if (mMyEmqttConnectListener != null) {
|
if (mMyEmqttConnectListener != null) {
|
||||||
mMyEmqttConnectListener.onConnectSuccess();
|
mMyEmqttConnectListener.onConnectSuccess();
|
||||||
}
|
}
|
||||||
@@ -341,18 +390,12 @@ public class MyMqttService extends Service implements MyEmqttConnectListener,MyE
|
|||||||
// if (arg0 instanceof MqttException) {
|
// if (arg0 instanceof MqttException) {
|
||||||
//// Logger.e(TAG, "链接状态:", "链接失败" + ((MqttException) arg1).getMessage());
|
//// Logger.e(TAG, "链接状态:", "链接失败" + ((MqttException) arg1).getMessage());
|
||||||
// }
|
// }
|
||||||
HandlerUtil.getInstance(getApplicationContext()).postDelayed(new Runnable() {
|
// 在后台线程处理重连
|
||||||
@Override
|
mqttHandler.postDelayed(() -> {
|
||||||
public void run() {
|
if (b) {
|
||||||
if (b) {
|
handleConnectionFailure();
|
||||||
try {
|
|
||||||
doClientConnection();
|
|
||||||
} catch (MqttException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}, 3000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -362,15 +405,26 @@ public class MyMqttService extends Service implements MyEmqttConnectListener,MyE
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void messageArrived(String topic, MqttMessage message) throws Exception {
|
public void messageArrived(String topic, MqttMessage message) throws Exception {
|
||||||
if (mMyEmqttMesgListener != null) {
|
// 将消息处理放到后台线程执行
|
||||||
mMyEmqttMesgListener.messageArrived(topic, message.toString());
|
messageExecutorService.execute(() -> {
|
||||||
}
|
try {
|
||||||
Logger.e(TAG, "收到的消息", "主题:" + topic + " 收到的消息:" + message.toString());
|
String messageStr = message.toString();
|
||||||
//收到其他客户端的消息后,响应给对方告知消息已到达或者消息有问题等
|
Logger.e(TAG, "收到的消息", "主题:" + topic + " 收到的消息:" + messageStr);
|
||||||
receiveMessage(topic,message.toString());
|
|
||||||
// if (TOPIC_BOSS.equals(topic)) {
|
// 处理消息
|
||||||
// EventBus.getDefault().post(new BossMsgEvent(message.toString()));
|
receiveMessage(topic, messageStr);
|
||||||
// }
|
|
||||||
|
// 通知监听器
|
||||||
|
if (mMyEmqttMesgListener != null) {
|
||||||
|
// 切换到主线程通知
|
||||||
|
new Handler(Looper.getMainLooper()).post(() -> {
|
||||||
|
mMyEmqttMesgListener.messageArrived(topic, messageStr);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e(TAG, "处理MQTT消息异常", e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -384,35 +438,39 @@ public class MyMqttService extends Service implements MyEmqttConnectListener,MyE
|
|||||||
if (mMyEmqttConnectListener != null) {
|
if (mMyEmqttConnectListener != null) {
|
||||||
mMyEmqttConnectListener.onConnectFailure();
|
mMyEmqttConnectListener.onConnectFailure();
|
||||||
}
|
}
|
||||||
Logger.e(TAG, "链接状态:", "链接断开");
|
Logger.e(TAG, "链接状态:", "链接断开: " + arg0.getMessage());
|
||||||
|
|
||||||
HandlerUtil.getInstance(getApplicationContext()).postDelayed(new Runnable() {
|
// 在后台线程处理重连
|
||||||
@Override
|
mqttHandler.postDelayed(() -> {
|
||||||
public void run() {
|
if (b) {
|
||||||
if (b) {
|
try {
|
||||||
try {
|
doClientConnection();
|
||||||
doClientConnection();
|
} catch (MqttException e) {
|
||||||
} catch (MqttException e) {
|
throw new RuntimeException(e);
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 300);
|
}, 1000);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private void receiveMessage(String topic, String data) {
|
private void receiveMessage(String topic, String data) {
|
||||||
JSONObject jsonObject = null;
|
|
||||||
try {
|
try {
|
||||||
String newdata = data;//TextLengthUtil.decode(data);
|
String newdata = data;//TextLengthUtil.decode(data);
|
||||||
jsonObject = JSON.parseObject(newdata);
|
JSONObject jsonObject = JSON.parseObject(newdata);
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int type = jsonObject.getIntValue("type");
|
int type = jsonObject.getIntValue("type");
|
||||||
String message = jsonObject.getString("msg");
|
String message = jsonObject.getString("msg");
|
||||||
|
|
||||||
|
// 将事件处理放到主线程执行
|
||||||
|
new Handler(Looper.getMainLooper()).post(() -> {
|
||||||
|
processMessageType(type, message);
|
||||||
|
});
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e(TAG, "解析MQTT消息异常", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void processMessageType(int type, String message) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 3001://抢糖果游戏
|
case 3001://抢糖果游戏
|
||||||
break;
|
break;
|
||||||
@@ -437,9 +495,8 @@ public class MyMqttService extends Service implements MyEmqttConnectListener,MyE
|
|||||||
case 5016://推送房间-删除房间管理员
|
case 5016://推送房间-删除房间管理员
|
||||||
break;
|
break;
|
||||||
case 5017://用户开关麦
|
case 5017://用户开关麦
|
||||||
// EventBus.getDefault().post(JSON.parseObject(message, WheatVoiceModel.class));
|
|
||||||
break;
|
break;
|
||||||
case 5019://推送所有人-横幅礼物通知c
|
case 5019://推送所有人-横幅礼物通知
|
||||||
new RoomGiftRunable(message).run();
|
new RoomGiftRunable(message).run();
|
||||||
break;
|
break;
|
||||||
case 5020://推送房间-聊天室礼物通知
|
case 5020://推送房间-聊天室礼物通知
|
||||||
@@ -521,7 +578,6 @@ public class MyMqttService extends Service implements MyEmqttConnectListener,MyE
|
|||||||
break;
|
break;
|
||||||
case 5062://交友房换麦
|
case 5062://交友房换麦
|
||||||
Logger.e("环信5062", message);
|
Logger.e("环信5062", message);
|
||||||
// sendEventList(message, RoomPitBean.class);
|
|
||||||
break;
|
break;
|
||||||
case 5063://进入小黑屋
|
case 5063://进入小黑屋
|
||||||
Logger.e("环信5063", message);
|
Logger.e("环信5063", message);
|
||||||
@@ -560,20 +616,40 @@ public class MyMqttService extends Service implements MyEmqttConnectListener,MyE
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
|
b = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// 清理资源
|
||||||
|
if (messageExecutorService != null) {
|
||||||
|
messageExecutorService.shutdown();
|
||||||
|
try {
|
||||||
|
if (!messageExecutorService.awaitTermination(5, TimeUnit.SECONDS)) {
|
||||||
|
messageExecutorService.shutdownNow();
|
||||||
|
}
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
messageExecutorService.shutdownNow();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mqttHandlerThread != null) {
|
||||||
|
mqttHandlerThread.quitSafely();
|
||||||
|
}
|
||||||
|
|
||||||
cleanSubscribe(TOPIC_BOSS);
|
cleanSubscribe(TOPIC_BOSS);
|
||||||
if (mqttAndroidClient != null) {
|
if (mqttAndroidClient != null) {
|
||||||
mqttAndroidClient.disconnect(); //断开连接
|
mqttAndroidClient.disconnect(); //断开连接
|
||||||
mqttAndroidClient.unregisterResources();
|
mqttAndroidClient.unregisterResources();
|
||||||
mqttAndroidClient = null;
|
mqttAndroidClient = null;
|
||||||
stopForeground(true); // 停止前台服务
|
|
||||||
}
|
}
|
||||||
|
stopForeground(true); // 停止前台服务
|
||||||
Logger.e(TAG, "服务关闭", "资源释放成功");
|
Logger.e(TAG, "服务关闭", "资源释放成功");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
Log.e(TAG, "服务关闭异常", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -615,7 +691,4 @@ public class MyMqttService extends Service implements MyEmqttConnectListener,MyE
|
|||||||
public void onSubscribeFailure() {
|
public void onSubscribeFailure() {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -20,6 +20,7 @@ import android.os.CountDownTimer;
|
|||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.text.SpannableStringBuilder;
|
import android.text.SpannableStringBuilder;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
import android.util.DisplayMetrics;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.GestureDetector;
|
import android.view.GestureDetector;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
@@ -40,6 +41,7 @@ import android.widget.RelativeLayout;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
@@ -186,7 +188,8 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
private SilentCountDownTimer silentCountDownTimer;
|
private SilentCountDownTimer silentCountDownTimer;
|
||||||
private CircularProgressView circularProgress;
|
private CircularProgressView circularProgress;
|
||||||
private PublicScreenEaseChatFragment publicScreenFragment; // 添加成员变量
|
private PublicScreenEaseChatFragment publicScreenFragment; // 添加成员变量
|
||||||
|
// 添加成员变量
|
||||||
|
private boolean isLayoutAdjusted = false;
|
||||||
@Override
|
@Override
|
||||||
protected void onNewIntent(Intent intent) {
|
protected void onNewIntent(Intent intent) {
|
||||||
password = intent.getStringExtra("password");
|
password = intent.getStringExtra("password");
|
||||||
@@ -1735,9 +1738,82 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
super.onResume();
|
super.onResume();
|
||||||
CommonAppContext.getInstance().isShow = true;
|
CommonAppContext.getInstance().isShow = true;
|
||||||
CommonAppContext.getInstance().isPlaying = true;
|
CommonAppContext.getInstance().isPlaying = true;
|
||||||
|
// 延迟调整布局,确保视图已经完全加载
|
||||||
|
mBinding.mainContentContainer.post(this::adjustLayoutHeights);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onWindowFocusChanged(boolean hasFocus) {
|
||||||
|
super.onWindowFocusChanged(hasFocus);
|
||||||
|
if (hasFocus && !isLayoutAdjusted) {
|
||||||
|
adjustLayoutHeights();
|
||||||
|
isLayoutAdjusted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态调整布局高度以适配不同设备
|
||||||
|
*/
|
||||||
|
private void adjustLayoutHeights() {
|
||||||
|
if (mBinding == null) return;
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 获取主容器
|
||||||
|
ConstraintLayout mainContainer = mBinding.mainContentContainer;
|
||||||
|
View pager = mBinding.vpRoomPager;
|
||||||
|
View easeContainer = mBinding.easeContainer;
|
||||||
|
|
||||||
|
if (mainContainer != null && pager != null && easeContainer != null) {
|
||||||
|
// 强制测量主容器
|
||||||
|
int widthSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
|
||||||
|
int heightSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
|
||||||
|
mainContainer.measure(widthSpec, heightSpec);
|
||||||
|
|
||||||
|
int containerHeight = mainContainer.getMeasuredHeight();
|
||||||
|
if (containerHeight <= 0) {
|
||||||
|
// 如果测量不到高度,使用布局参数中的高度
|
||||||
|
ConstraintLayout.LayoutParams containerParams = (ConstraintLayout.LayoutParams) mainContainer.getLayoutParams();
|
||||||
|
containerHeight = getResources().getDisplayMetrics().heightPixels
|
||||||
|
- getStatusBarHeight()
|
||||||
|
- getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_50) // room_top 高度
|
||||||
|
- getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_15) * 3; // 底部控件高度
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确保最小高度
|
||||||
|
if (containerHeight > 0) {
|
||||||
|
// 设置 vp_room_pager 占用 70% 空间
|
||||||
|
ConstraintLayout.LayoutParams pagerParams = (ConstraintLayout.LayoutParams) pager.getLayoutParams();
|
||||||
|
pagerParams.height = 0;
|
||||||
|
pager.setLayoutParams(pagerParams);
|
||||||
|
|
||||||
|
// 设置 ease_container 占用 30% 空间
|
||||||
|
ConstraintLayout.LayoutParams easeParams = (ConstraintLayout.LayoutParams) easeContainer.getLayoutParams();
|
||||||
|
easeParams.height = 0;
|
||||||
|
easeContainer.setLayoutParams(easeParams);
|
||||||
|
|
||||||
|
// 请求重新布局
|
||||||
|
mainContainer.requestLayout();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
LogUtils.e("adjustLayoutHeights error: " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取状态栏高度
|
||||||
|
*/
|
||||||
|
private int getStatusBarHeight() {
|
||||||
|
int result = 0;
|
||||||
|
int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
|
||||||
|
if (resourceId > 0) {
|
||||||
|
result = getResources().getDimensionPixelSize(resourceId);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getRoomOnline(RoomOnline onlineBean) {
|
public void getRoomOnline(RoomOnline onlineBean) {
|
||||||
if (onlineBean != null) {
|
if (onlineBean != null) {
|
||||||
|
|||||||
@@ -456,17 +456,21 @@ public class EaseChatAdapter extends BaseMultiItemQuickAdapter<EMMessageInfo, Ba
|
|||||||
@Override
|
@Override
|
||||||
public void addData(@NonNull EMMessageInfo data) {
|
public void addData(@NonNull EMMessageInfo data) {
|
||||||
// super.addData(data);
|
// super.addData(data);
|
||||||
allMsgList.add(data);
|
if (data.getItemType()==1) {
|
||||||
if (data.getItemType() == 2) {
|
allMsgList.add(data);
|
||||||
|
}else if (data.getItemType() == 2) {
|
||||||
userMsgList.add(data);
|
userMsgList.add(data);
|
||||||
|
allMsgList.add(data);
|
||||||
} else if (data.getItemType() == 3) {
|
} else if (data.getItemType() == 3) {
|
||||||
systemMsgList.add(data);
|
systemMsgList.add(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (listShowType == SHOW_TYPE_ALL
|
// 根据当前显示类型决定是否添加到适配器中
|
||||||
|| ((data.getItemType() == 2) && listShowType == SHOW_TYPE_USER)
|
boolean shouldAdd = (listShowType == SHOW_TYPE_ALL && (data.getItemType() == 1 || data.getItemType() == 2)) ||
|
||||||
|| ((data.getItemType() == 3) && listShowType == SHOW_TYPE_SYSTEM)
|
(listShowType == SHOW_TYPE_USER && data.getItemType() == 2) ||
|
||||||
) {
|
(listShowType == SHOW_TYPE_SYSTEM && data.getItemType() == 3);
|
||||||
|
|
||||||
|
if (shouldAdd) {
|
||||||
super.addData(data);
|
super.addData(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -483,6 +487,4 @@ public class EaseChatAdapter extends BaseMultiItemQuickAdapter<EMMessageInfo, Ba
|
|||||||
addData(list.get(i));
|
addData(list.get(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -465,6 +465,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit,"");
|
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit,"");
|
||||||
} else {
|
} else {
|
||||||
MvpPre.roomAuctionJoin(userInfo.getAuction_id(), userInfo.getUser_id() + "", roonGiftModel.getGift_id(), num, "1");
|
MvpPre.roomAuctionJoin(userInfo.getAuction_id(), userInfo.getUser_id() + "", roonGiftModel.getGift_id(), num, "1");
|
||||||
|
dismiss();
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit,heart_id);
|
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit,heart_id);
|
||||||
|
|||||||
@@ -393,6 +393,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
setTextViewStyle(mBinding.textView2, false);
|
setTextViewStyle(mBinding.textView2, false);
|
||||||
setTextViewStyle(mBinding.textView1, true);
|
setTextViewStyle(mBinding.textView1, true);
|
||||||
if (userInfo.getQinmi() != null && !userInfo.getQinmi().equals("")) {
|
if (userInfo.getQinmi() != null && !userInfo.getQinmi().equals("")) {
|
||||||
|
mBinding.ll.setVisibility(VISIBLE);
|
||||||
mBinding.ll.setBackgroundResource(com.xscm.moduleutil.R.mipmap.guxi_k);
|
mBinding.ll.setBackgroundResource(com.xscm.moduleutil.R.mipmap.guxi_k);
|
||||||
// mBinding.rlReqit.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.regit_t);
|
// mBinding.rlReqit.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.regit_t);
|
||||||
ImageUtils.loadHeadCC(userInfo.getQinmi().getAvatar1(), mBinding.userNav1);
|
ImageUtils.loadHeadCC(userInfo.getQinmi().getAvatar1(), mBinding.userNav1);
|
||||||
@@ -409,6 +410,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
setTextViewStyle(mBinding.textView2, true);
|
setTextViewStyle(mBinding.textView2, true);
|
||||||
setTextViewStyle(mBinding.textView1, false);
|
setTextViewStyle(mBinding.textView1, false);
|
||||||
if (userInfo.getZhenai() != null && !userInfo.getZhenai().equals("")) {
|
if (userInfo.getZhenai() != null && !userInfo.getZhenai().equals("")) {
|
||||||
|
mBinding.ll.setVisibility(VISIBLE);
|
||||||
mBinding.ll.setBackgroundResource(com.xscm.moduleutil.R.mipmap.guxi_w);
|
mBinding.ll.setBackgroundResource(com.xscm.moduleutil.R.mipmap.guxi_w);
|
||||||
// mBinding.rlReqit.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.guanxiw_z);
|
// mBinding.rlReqit.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.guanxiw_z);
|
||||||
ImageUtils.loadHeadCC(userInfo.getZhenai().getAvatar1(), mBinding.userNav1);
|
ImageUtils.loadHeadCC(userInfo.getZhenai().getAvatar1(), mBinding.userNav1);
|
||||||
|
|||||||
@@ -272,12 +272,23 @@ public class WheatFeedingDialogFragment extends BaseMvpDialogFragment<WheatPrese
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void agreePit() {
|
public void agreePit() {
|
||||||
MvpPre.roomApplyListBean(roomId);
|
// MvpPre.roomApplyListBean(roomId);
|
||||||
|
dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void applyPit() {
|
public void applyPit() {
|
||||||
MvpPre.roomApplyListBean(roomId);
|
//
|
||||||
|
// if (roomApplyListBeans!=null){
|
||||||
|
// if ((roomApplyListBeans.getSpecial() != null && !roomApplyListBeans.getSpecial().isEmpty())
|
||||||
|
// ||(roomApplyListBeans.getRegular() != null && !roomApplyListBeans.getRegular().isEmpty())){
|
||||||
|
// MvpPre.roomApplyListBean(roomId);
|
||||||
|
// }else {
|
||||||
|
// dismiss();
|
||||||
|
// }
|
||||||
|
// }else {
|
||||||
|
dismiss();
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -50,56 +50,90 @@
|
|||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
<!-- <com.qxcm.moduleutil.widget.ScrollViewPager-->
|
|
||||||
<!-- android:id="@+id/vp_room_pager"-->
|
|
||||||
<!-- android:layout_width="0dp"-->
|
|
||||||
<!-- android:layout_height="0dp"-->
|
|
||||||
<!-- android:clipChildren="false"-->
|
|
||||||
<!-- android:clipToPadding="false"-->
|
|
||||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
|
||||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
|
||||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
|
||||||
<!-- app:layout_constraintTop_toBottomOf="@id/room_top" />-->
|
|
||||||
|
|
||||||
<!-- <ScrollView-->
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
<!-- android:id="@+id/scrollView"-->
|
android:id="@+id/main_content_container"
|
||||||
<!-- android:layout_width="0dp"-->
|
|
||||||
<!-- android:layout_height="0dp"-->
|
|
||||||
<!-- app:layout_constraintTop_toBottomOf="@id/room_top"-->
|
|
||||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
|
||||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
|
||||||
<!-- app:layout_constraintStart_toStartOf="parent">-->
|
|
||||||
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/vp_room_pager"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:clipChildren="false"
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
android:clipToPadding="false"
|
android:layout_marginBottom="@dimen/dp_15"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/ll_bottom"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHeight_percent="0.55"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/room_top"
|
app:layout_constraintTop_toBottomOf="@id/room_top">
|
||||||
|
|
||||||
/>
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline_horizontal"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintGuide_percent="0.7" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/ease_container"
|
android:id="@+id/vp_room_pager"
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_marginTop="@dimen/dp_5"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/ll_bottom"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHeight_percent="0.3"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/vp_room_pager">
|
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.AvatarFrameView
|
|
||||||
android:id="@+id/svga_ride"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp" />
|
android:layout_height="0dp"
|
||||||
</FrameLayout>
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:clipChildren="false"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/guideline_horizontal"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/ease_container"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginTop="@dimen/dp_5"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/guideline_horizontal">
|
||||||
|
|
||||||
|
<com.xscm.moduleutil.widget.AvatarFrameView
|
||||||
|
android:id="@+id/svga_ride"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:minHeight="@dimen/dp_80" />
|
||||||
|
</FrameLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<!-- <LinearLayout-->
|
||||||
|
<!-- android:layout_width="0dp"-->
|
||||||
|
<!-- android:layout_height="0dp"-->
|
||||||
|
<!-- android:layout_marginTop="@dimen/dp_10"-->
|
||||||
|
<!-- android:layout_marginBottom="@dimen/dp_15"-->
|
||||||
|
<!-- android:orientation="vertical"-->
|
||||||
|
<!-- app:layout_constraintBottom_toTopOf="@+id/ll_bottom"-->
|
||||||
|
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||||
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||||
|
<!-- app:layout_constraintTop_toBottomOf="@id/room_top">-->
|
||||||
|
|
||||||
|
<!-- <FrameLayout-->
|
||||||
|
<!-- android:id="@+id/vp_room_pager"-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="0dp"-->
|
||||||
|
<!-- android:layout_weight="2"-->
|
||||||
|
<!-- android:layout_marginBottom="@dimen/dp_5"-->
|
||||||
|
<!-- android:clipChildren="false"-->
|
||||||
|
<!-- android:clipToPadding="false" />-->
|
||||||
|
|
||||||
|
<!-- <FrameLayout-->
|
||||||
|
<!-- android:id="@+id/ease_container"-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="0dp"-->
|
||||||
|
<!-- android:layout_weight="1"-->
|
||||||
|
<!-- android:layout_marginTop="@dimen/dp_5"-->
|
||||||
|
<!-- android:minHeight="@dimen/dp_80">-->
|
||||||
|
|
||||||
|
<!-- <com.xscm.moduleutil.widget.AvatarFrameView-->
|
||||||
|
<!-- android:id="@+id/svga_ride"-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:minHeight="@dimen/dp_80" />-->
|
||||||
|
<!-- </FrameLayout>-->
|
||||||
|
<!-- </LinearLayout>-->
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.RoomMessageInputMenu
|
<com.xscm.moduleutil.widget.RoomMessageInputMenu
|
||||||
android:id="@+id/input_menu1"
|
android:id="@+id/input_menu1"
|
||||||
|
|||||||
@@ -117,7 +117,7 @@
|
|||||||
android:layout_height="@dimen/dp_42"
|
android:layout_height="@dimen/dp_42"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
android:background="@drawable/bg_r53_0dffb9"
|
android:background="@drawable/bg_r53_0dffb9"
|
||||||
android:text="同意"
|
android:text="同意"
|
||||||
android:textSize="@dimen/sp_14"
|
android:textSize="@dimen/sp_14"
|
||||||
@@ -138,7 +138,8 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:layout_marginBottom="@dimen/dp_44"
|
android:layout_marginBottom="@dimen/dp_44"
|
||||||
android:layout_marginEnd="@dimen/dp_16"/>
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_ljsq"
|
android:id="@+id/tv_ljsq"
|
||||||
|
|||||||
Reference in New Issue
Block a user