add[主播b账号-消息设置,设置后需支持重置取消]

This commit is contained in:
zlzw 2024-06-13 12:53:38 +08:00
parent 0d49654adf
commit d09b01dbad
11 changed files with 126 additions and 44 deletions

View File

@ -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);
}

View File

@ -86,7 +86,6 @@ public class MessageChatNotifyManager {
}
});
} else {
ToastUtil.showDebug("Not Message");
}
}

View File

@ -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");
}
}

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="166dp" android:height="54dp">
<shape android:shape="rectangle">
<stroke android:width="1dp" android:color="#ffb9b9b9" />
<corners android:radius="54dp"/>
</shape>
</item>
</selector>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="166dp" android:height="54dp">
<shape android:shape="rectangle">
<gradient android:type="linear" android:useLevel="true" android:startColor="#ffff83c6" android:endColor="#ffeb6fff" android:angle="180" />
<corners android:radius="54dp"/>
</shape>
</item>
</selector>

View File

@ -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,
]
}

View File

@ -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<List<BaseModel>>() {
@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<MessageHiBean> list = new ArrayList<>();
JSONObject json = new JSONObject();
json.put("content", list);
LiveNetManager.get(mContext)
.setHiConfig(json, new HttpCallback<List<BaseModel>>() {
@Override
public void onSuccess(List<BaseModel> 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);

View File

@ -75,7 +75,6 @@ public class MainMessageChatListFragment extends AbsMainMessageChatListFragment
if (conversationListFragment == null) {
return;
}
ToastUtil.showDebug("清空");
conversationListFragment.onChatList();
}

View File

@ -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" />
<ImageView
android:id="@+id/btn_back"
@ -47,10 +46,10 @@
<LinearLayout
android:id="@+id/rootView"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:orientation="vertical">
<TextView
@ -63,26 +62,26 @@
<include
android:id="@+id/audio_1"
layout="@layout/view_message_hi_config_item"
android:tag="audio1"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="10dp" />
android:layout_marginTop="10dp"
android:tag="audio1" />
<include
android:id="@+id/audio_2"
layout="@layout/view_message_hi_config_item"
android:tag="audio2"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="10dp" />
android:layout_marginTop="10dp"
android:tag="audio2" />
<include
android:id="@+id/audio_3"
android:tag="audio3"
layout="@layout/view_message_hi_config_item"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="10dp" />
android:layout_marginTop="10dp"
android:tag="audio3" />
<TextView
android:layout_width="match_parent"
@ -96,25 +95,25 @@
android:id="@+id/text_1"
layout="@layout/view_message_hi_config_item_edit"
android:layout_width="match_parent"
android:tag="text1"
android:layout_height="60dp"
android:layout_marginTop="10dp" />
android:layout_marginTop="10dp"
android:tag="text1" />
<include
android:id="@+id/text_2"
android:tag="text2"
layout="@layout/view_message_hi_config_item_edit"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="10dp" />
android:layout_marginTop="10dp"
android:tag="text2" />
<include
android:id="@+id/text_3"
android:tag="text3"
layout="@layout/view_message_hi_config_item_edit"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="10dp" />
android:layout_marginTop="10dp"
android:tag="text3" />
<TextView
android:layout_width="match_parent"
@ -125,48 +124,69 @@
android:textSize="13sp" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="start"
android:layout_height="wrap_content"
android:layout_width="match_parent">
android:orientation="horizontal">
<include
android:id="@+id/image_1"
android:tag="image1"
layout="@layout/view_message_hi_config_image_item"
android:layout_width="wrap_content"
android:layout_height="95dp"
android:layout_marginEnd="10dp"
/>
android:tag="image1" />
<include
android:id="@+id/image_2"
android:tag="image2"
layout="@layout/view_message_hi_config_image_item"
android:layout_width="wrap_content"
android:layout_height="95dp"
android:layout_marginEnd="10dp" />
android:layout_marginEnd="10dp"
android:tag="image2" />
<include
android:id="@+id/image_3"
android:tag="image3"
layout="@layout/view_message_hi_config_image_item"
android:layout_width="wrap_content"
android:layout_height="95dp"
android:layout_marginEnd="10dp" />
android:layout_marginEnd="10dp"
android:tag="image3" />
</LinearLayout>
<Button
android:id="@+id/btn_save"
android:layout_width="186dp"
android:layout_height="54dp"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="30dp"
android:layout_marginBottom="32dp"
android:background="@drawable/bg_msg_address_book_user_btn_fan"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="@+id/btn_clear"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="54dp"
android:layout_marginEnd="20dp"
android:background="@drawable/bg_msg_config_btn_clear"
android:text="@string/dialog_msg_hi_config_clear"
android:textColor="#777777"
android:textSize="13sp" />
<Button
android:id="@+id/btn_save"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="54dp"
android:background="@drawable/bg_msg_config_btn_save"
android:text="@string/dialog_msg_hi_config_save"
android:textColor="#FFFFFF"
android:textSize="13sp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -43,6 +43,7 @@
<string name="dialog_msg_status_online_config">在線</string>
<string name="dialog_msg_status_offline_config">離線</string>
<string name="dialog_msg_hi_config_save">保存設置</string>
<string name="dialog_msg_hi_config_clear">保存設置</string>
<string name="dialog_msg_hi_config_audio">語音</string>
<string name="dialog_msg_hi_config_text">文案</string>
<string name="dialog_msg_hi_config_image">圖片</string>

View File

@ -43,6 +43,7 @@
<string name="dialog_msg_status_online_config">Online</string>
<string name="dialog_msg_status_offline_config">Offline</string>
<string name="dialog_msg_hi_config_save">Save</string>
<string name="dialog_msg_hi_config_clear">Clear</string>
<string name="dialog_msg_hi_config_audio">Audio</string>
<string name="dialog_msg_hi_config_text">Text</string>
<string name="dialog_msg_hi_config_image">Image</string>