From d09b01dbad13d8e451303ba21aca87b9c57ac353 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Thu, 13 Jun 2024 12:53:38 +0800 Subject: [PATCH] =?UTF-8?q?add[=E4=B8=BB=E6=92=ADb=E8=B4=A6=E5=8F=B7-?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E8=AE=BE=E7=BD=AE=EF=BC=8C=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=90=8E=E9=9C=80=E6=94=AF=E6=8C=81=E9=87=8D=E7=BD=AE=E5=8F=96?= =?UTF-8?q?=E6=B6=88]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dialog/MessageSayHiNotifyDialog.java | 1 + .../utils/MessageChatNotifyManager.java | 1 - .../utils/MessageSayHiNotifyManager.java | 2 +- .../res/drawable/bg_msg_config_btn_clear.xml | 9 ++ .../res/drawable/bg_msg_config_btn_save.xml | 9 ++ config.gradle | 8 +- .../activity/MessageHiConfigActivity.java | 45 ++++++++- .../fragment/MainMessageChatListFragment.java | 1 - .../res/layout/activity_message_hi_config.xml | 92 +++++++++++-------- main/src/main/res/values-zh/strings.xml | 1 + main/src/main/res/values/strings.xml | 1 + 11 files changed, 126 insertions(+), 44 deletions(-) create mode 100644 common/src/main/res/drawable/bg_msg_config_btn_clear.xml create mode 100644 common/src/main/res/drawable/bg_msg_config_btn_save.xml diff --git a/common/src/main/java/com/yunbao/common/dialog/MessageSayHiNotifyDialog.java b/common/src/main/java/com/yunbao/common/dialog/MessageSayHiNotifyDialog.java index 5d7966792..d25833000 100644 --- a/common/src/main/java/com/yunbao/common/dialog/MessageSayHiNotifyDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/MessageSayHiNotifyDialog.java @@ -71,6 +71,7 @@ public class MessageSayHiNotifyDialog extends AbsDialogCenterPopupWindow { @Override public void buildDialog(XPopup.Builder builder) { + ToastUtil.show("设置可关闭:"+cancelable); builder.dismissOnTouchOutside(cancelable); builder.dismissOnBackPressed(cancelable); } diff --git a/common/src/main/java/com/yunbao/common/utils/MessageChatNotifyManager.java b/common/src/main/java/com/yunbao/common/utils/MessageChatNotifyManager.java index fcdb8cf48..1e4efbc36 100644 --- a/common/src/main/java/com/yunbao/common/utils/MessageChatNotifyManager.java +++ b/common/src/main/java/com/yunbao/common/utils/MessageChatNotifyManager.java @@ -86,7 +86,6 @@ public class MessageChatNotifyManager { } }); } else { - ToastUtil.showDebug("Not Message"); } } diff --git a/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java b/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java index 6da99c637..41183ec34 100644 --- a/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java +++ b/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java @@ -53,6 +53,7 @@ public class MessageSayHiNotifyManager { return; } isCancelDialog = data.isCancelDialog(); + ToastUtil.show("设置可关闭0:"+isCancelDialog); timer = new Timer(); timer.schedule(createTask(), data.getNextTime() * 1000L); hiBean = new MessageSayHiBean(); @@ -217,7 +218,6 @@ public class MessageSayHiNotifyManager { }).setCancelable(isCancelDialog) .showDialog(); } else { - ToastUtil.showDebug("Not Message"); } } diff --git a/common/src/main/res/drawable/bg_msg_config_btn_clear.xml b/common/src/main/res/drawable/bg_msg_config_btn_clear.xml new file mode 100644 index 000000000..6e8f8cd0a --- /dev/null +++ b/common/src/main/res/drawable/bg_msg_config_btn_clear.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/drawable/bg_msg_config_btn_save.xml b/common/src/main/res/drawable/bg_msg_config_btn_save.xml new file mode 100644 index 000000000..f51b1512c --- /dev/null +++ b/common/src/main/res/drawable/bg_msg_config_btn_save.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/config.gradle b/config.gradle index 1bca5e9f7..1491c2e0c 100644 --- a/config.gradle +++ b/config.gradle @@ -10,9 +10,9 @@ ext { ] manifestPlaceholders = [ //正式、 - serverHost : "https://napi.yaoulive.com", +// serverHost : "https://napi.yaoulive.com", // 测试 -// serverHost : " https://ceshi.yaoulive.com", + serverHost : " https://ceshi.yaoulive.com", buildTime : new Date().format("MM-dd HH:mm", TimeZone.getTimeZone("GMT+8")), //百度语音识别 @@ -26,11 +26,11 @@ ext { // true表示谷歌支付 false // isGooglePlay : false, // true表示谷歌支付 false 0 链接包(isPluginModel-> true) 1 谷歌包 2华为包 3 samsung包 - isGooglePlay : 1, + isGooglePlay : 0, //是否上报异常日志 isUploadLog : true, //是否打包成插件包模式 - isPluginModel : false, + isPluginModel : true, ] } diff --git a/main/src/main/java/com/yunbao/main/activity/MessageHiConfigActivity.java b/main/src/main/java/com/yunbao/main/activity/MessageHiConfigActivity.java index 26dff0e98..b8835eeb1 100644 --- a/main/src/main/java/com/yunbao/main/activity/MessageHiConfigActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MessageHiConfigActivity.java @@ -28,6 +28,8 @@ import com.yunbao.common.utils.ProcessImageUtil; import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ViewUtils; +import com.yunbao.common.utils.WordUtil; +import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.main.R; import java.io.File; @@ -166,7 +168,6 @@ public class MessageHiConfigActivity extends AbsActivity { } JSONObject json = new JSONObject(); json.put("content", list); - System.out.println(">>>>> " + json); LiveNetManager.get(mContext) .setHiConfig(json, new HttpCallback>() { @Override @@ -181,36 +182,78 @@ public class MessageHiConfigActivity extends AbsActivity { }); }); + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.btn_clear), new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + audios = new MessageHiBean[3]; + texts = new MessageHiBean[3]; + images = new MessageHiBean[3]; + List list = new ArrayList<>(); + JSONObject json = new JSONObject(); + json.put("content", list); + LiveNetManager.get(mContext) + .setHiConfig(json, new HttpCallback>() { + @Override + public void onSuccess(List data) { + ToastUtil.show(WordUtil.isNewZh()?"清除成功!":"Cleared successfully!"); + MessageHiConfigActivity.this.finish(); + } + + @Override + public void onError(String error) { + + } + }); + } + }); } private void updateUi() { //bg_msg_list_item if (audios[0] != null) { audio1.setTag(audios[0]); + }else{ + audio1.setTag(null); } if (audios[1] != null) { audio2.setTag(audios[1]); + }else{ + audio2.setTag(null); } if (audios[2] != null) { audio3.setTag(audios[2]); + }else{ + audio3.setTag(null); } if (texts[0] != null) { text1.setTag(texts[0]); + }else{ + text1.setTag(null); } if (texts[1] != null) { text2.setTag(texts[1]); + }else{ + text2.setTag(null); } if (texts[2] != null) { text3.setTag(texts[2]); + }else{ + text3.setTag(null); } if (images[0] != null) { image1.setTag(images[0]); + }else{ + image1.setTag(null); } if (images[1] != null) { image2.setTag(images[1]); + }else{ + image2.setTag(null); } if (images[2] != null) { image3.setTag(images[2]); + }else{ + image3.setTag(null); } setAudio(audio1); setAudio(audio2); diff --git a/main/src/main/java/com/yunbao/main/fragment/MainMessageChatListFragment.java b/main/src/main/java/com/yunbao/main/fragment/MainMessageChatListFragment.java index ced5a0e32..8b24e9695 100644 --- a/main/src/main/java/com/yunbao/main/fragment/MainMessageChatListFragment.java +++ b/main/src/main/java/com/yunbao/main/fragment/MainMessageChatListFragment.java @@ -75,7 +75,6 @@ public class MainMessageChatListFragment extends AbsMainMessageChatListFragment if (conversationListFragment == null) { return; } - ToastUtil.showDebug("清空"); conversationListFragment.onChatList(); } diff --git a/main/src/main/res/layout/activity_message_hi_config.xml b/main/src/main/res/layout/activity_message_hi_config.xml index f6b356819..2fb829f4f 100644 --- a/main/src/main/res/layout/activity_message_hi_config.xml +++ b/main/src/main/res/layout/activity_message_hi_config.xml @@ -21,11 +21,10 @@ android:layout_height="match_parent" android:layout_centerHorizontal="true" android:gravity="center" + android:text="@string/dialog_msg_m_config" android:textColor="@color/textColor" android:textSize="18sp" - android:textStyle="bold" - android:text="@string/dialog_msg_m_config" - /> + android:textStyle="bold" /> + android:layout_marginTop="10dp" + android:tag="audio1" /> + android:layout_marginTop="10dp" + android:tag="audio2" /> + android:layout_marginTop="10dp" + android:tag="audio3" /> + android:layout_marginTop="10dp" + android:tag="text1" /> + android:layout_marginTop="10dp" + android:tag="text2" /> + android:layout_marginTop="10dp" + android:tag="text3" /> + android:orientation="horizontal"> + + android:tag="image1" /> + + android:layout_marginEnd="10dp" + android:tag="image2" /> + + android:layout_marginEnd="10dp" + android:tag="image3" /> - - -