add[主播b账号-消息设置,设置后需支持重置取消]
This commit is contained in:
parent
0d49654adf
commit
d09b01dbad
@ -71,6 +71,7 @@ public class MessageSayHiNotifyDialog extends AbsDialogCenterPopupWindow {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void buildDialog(XPopup.Builder builder) {
|
public void buildDialog(XPopup.Builder builder) {
|
||||||
|
ToastUtil.show("设置可关闭:"+cancelable);
|
||||||
builder.dismissOnTouchOutside(cancelable);
|
builder.dismissOnTouchOutside(cancelable);
|
||||||
builder.dismissOnBackPressed(cancelable);
|
builder.dismissOnBackPressed(cancelable);
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,6 @@ public class MessageChatNotifyManager {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
ToastUtil.showDebug("Not Message");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,6 +53,7 @@ public class MessageSayHiNotifyManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
isCancelDialog = data.isCancelDialog();
|
isCancelDialog = data.isCancelDialog();
|
||||||
|
ToastUtil.show("设置可关闭0:"+isCancelDialog);
|
||||||
timer = new Timer();
|
timer = new Timer();
|
||||||
timer.schedule(createTask(), data.getNextTime() * 1000L);
|
timer.schedule(createTask(), data.getNextTime() * 1000L);
|
||||||
hiBean = new MessageSayHiBean();
|
hiBean = new MessageSayHiBean();
|
||||||
@ -217,7 +218,6 @@ public class MessageSayHiNotifyManager {
|
|||||||
}).setCancelable(isCancelDialog)
|
}).setCancelable(isCancelDialog)
|
||||||
.showDialog();
|
.showDialog();
|
||||||
} else {
|
} else {
|
||||||
ToastUtil.showDebug("Not Message");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
9
common/src/main/res/drawable/bg_msg_config_btn_clear.xml
Normal file
9
common/src/main/res/drawable/bg_msg_config_btn_clear.xml
Normal 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>
|
9
common/src/main/res/drawable/bg_msg_config_btn_save.xml
Normal file
9
common/src/main/res/drawable/bg_msg_config_btn_save.xml
Normal 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>
|
@ -10,9 +10,9 @@ ext {
|
|||||||
]
|
]
|
||||||
manifestPlaceholders = [
|
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")),
|
buildTime : new Date().format("MM-dd HH:mm", TimeZone.getTimeZone("GMT+8")),
|
||||||
|
|
||||||
//百度语音识别
|
//百度语音识别
|
||||||
@ -26,11 +26,11 @@ ext {
|
|||||||
// true表示谷歌支付 false
|
// true表示谷歌支付 false
|
||||||
// isGooglePlay : false,
|
// isGooglePlay : false,
|
||||||
// true表示谷歌支付 false 0 链接包(isPluginModel-> true) 1 谷歌包 2华为包 3 samsung包
|
// true表示谷歌支付 false 0 链接包(isPluginModel-> true) 1 谷歌包 2华为包 3 samsung包
|
||||||
isGooglePlay : 1,
|
isGooglePlay : 0,
|
||||||
|
|
||||||
//是否上报异常日志
|
//是否上报异常日志
|
||||||
isUploadLog : true,
|
isUploadLog : true,
|
||||||
//是否打包成插件包模式
|
//是否打包成插件包模式
|
||||||
isPluginModel : false,
|
isPluginModel : true,
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,8 @@ import com.yunbao.common.utils.ProcessImageUtil;
|
|||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.ViewUtils;
|
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 com.yunbao.main.R;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -166,7 +168,6 @@ public class MessageHiConfigActivity extends AbsActivity {
|
|||||||
}
|
}
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("content", list);
|
json.put("content", list);
|
||||||
System.out.println(">>>>> " + json);
|
|
||||||
LiveNetManager.get(mContext)
|
LiveNetManager.get(mContext)
|
||||||
.setHiConfig(json, new HttpCallback<List<BaseModel>>() {
|
.setHiConfig(json, new HttpCallback<List<BaseModel>>() {
|
||||||
@Override
|
@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() {
|
private void updateUi() {
|
||||||
//bg_msg_list_item
|
//bg_msg_list_item
|
||||||
if (audios[0] != null) {
|
if (audios[0] != null) {
|
||||||
audio1.setTag(audios[0]);
|
audio1.setTag(audios[0]);
|
||||||
|
}else{
|
||||||
|
audio1.setTag(null);
|
||||||
}
|
}
|
||||||
if (audios[1] != null) {
|
if (audios[1] != null) {
|
||||||
audio2.setTag(audios[1]);
|
audio2.setTag(audios[1]);
|
||||||
|
}else{
|
||||||
|
audio2.setTag(null);
|
||||||
}
|
}
|
||||||
if (audios[2] != null) {
|
if (audios[2] != null) {
|
||||||
audio3.setTag(audios[2]);
|
audio3.setTag(audios[2]);
|
||||||
|
}else{
|
||||||
|
audio3.setTag(null);
|
||||||
}
|
}
|
||||||
if (texts[0] != null) {
|
if (texts[0] != null) {
|
||||||
text1.setTag(texts[0]);
|
text1.setTag(texts[0]);
|
||||||
|
}else{
|
||||||
|
text1.setTag(null);
|
||||||
}
|
}
|
||||||
if (texts[1] != null) {
|
if (texts[1] != null) {
|
||||||
text2.setTag(texts[1]);
|
text2.setTag(texts[1]);
|
||||||
|
}else{
|
||||||
|
text2.setTag(null);
|
||||||
}
|
}
|
||||||
if (texts[2] != null) {
|
if (texts[2] != null) {
|
||||||
text3.setTag(texts[2]);
|
text3.setTag(texts[2]);
|
||||||
|
}else{
|
||||||
|
text3.setTag(null);
|
||||||
}
|
}
|
||||||
if (images[0] != null) {
|
if (images[0] != null) {
|
||||||
image1.setTag(images[0]);
|
image1.setTag(images[0]);
|
||||||
|
}else{
|
||||||
|
image1.setTag(null);
|
||||||
}
|
}
|
||||||
if (images[1] != null) {
|
if (images[1] != null) {
|
||||||
image2.setTag(images[1]);
|
image2.setTag(images[1]);
|
||||||
|
}else{
|
||||||
|
image2.setTag(null);
|
||||||
}
|
}
|
||||||
if (images[2] != null) {
|
if (images[2] != null) {
|
||||||
image3.setTag(images[2]);
|
image3.setTag(images[2]);
|
||||||
|
}else{
|
||||||
|
image3.setTag(null);
|
||||||
}
|
}
|
||||||
setAudio(audio1);
|
setAudio(audio1);
|
||||||
setAudio(audio2);
|
setAudio(audio2);
|
||||||
|
@ -75,7 +75,6 @@ public class MainMessageChatListFragment extends AbsMainMessageChatListFragment
|
|||||||
if (conversationListFragment == null) {
|
if (conversationListFragment == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ToastUtil.showDebug("清空");
|
|
||||||
conversationListFragment.onChatList();
|
conversationListFragment.onChatList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,11 +21,10 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:text="@string/dialog_msg_m_config"
|
||||||
android:textColor="@color/textColor"
|
android:textColor="@color/textColor"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
android:text="@string/dialog_msg_m_config"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/btn_back"
|
android:id="@+id/btn_back"
|
||||||
@ -47,10 +46,10 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/rootView"
|
android:id="@+id/rootView"
|
||||||
android:layout_marginStart="15dp"
|
|
||||||
android:layout_marginEnd="15dp"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="15dp"
|
||||||
|
android:layout_marginEnd="15dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -63,26 +62,26 @@
|
|||||||
<include
|
<include
|
||||||
android:id="@+id/audio_1"
|
android:id="@+id/audio_1"
|
||||||
layout="@layout/view_message_hi_config_item"
|
layout="@layout/view_message_hi_config_item"
|
||||||
android:tag="audio1"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:layout_marginTop="10dp" />
|
android:layout_marginTop="10dp"
|
||||||
|
android:tag="audio1" />
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/audio_2"
|
android:id="@+id/audio_2"
|
||||||
layout="@layout/view_message_hi_config_item"
|
layout="@layout/view_message_hi_config_item"
|
||||||
android:tag="audio2"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:layout_marginTop="10dp" />
|
android:layout_marginTop="10dp"
|
||||||
|
android:tag="audio2" />
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/audio_3"
|
android:id="@+id/audio_3"
|
||||||
android:tag="audio3"
|
|
||||||
layout="@layout/view_message_hi_config_item"
|
layout="@layout/view_message_hi_config_item"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:layout_marginTop="10dp" />
|
android:layout_marginTop="10dp"
|
||||||
|
android:tag="audio3" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -96,25 +95,25 @@
|
|||||||
android:id="@+id/text_1"
|
android:id="@+id/text_1"
|
||||||
layout="@layout/view_message_hi_config_item_edit"
|
layout="@layout/view_message_hi_config_item_edit"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:tag="text1"
|
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:layout_marginTop="10dp" />
|
android:layout_marginTop="10dp"
|
||||||
|
android:tag="text1" />
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/text_2"
|
android:id="@+id/text_2"
|
||||||
android:tag="text2"
|
|
||||||
layout="@layout/view_message_hi_config_item_edit"
|
layout="@layout/view_message_hi_config_item_edit"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:layout_marginTop="10dp" />
|
android:layout_marginTop="10dp"
|
||||||
|
android:tag="text2" />
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/text_3"
|
android:id="@+id/text_3"
|
||||||
android:tag="text3"
|
|
||||||
layout="@layout/view_message_hi_config_item_edit"
|
layout="@layout/view_message_hi_config_item_edit"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:layout_marginTop="10dp" />
|
android:layout_marginTop="10dp"
|
||||||
|
android:tag="text3" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -125,48 +124,69 @@
|
|||||||
android:textSize="13sp" />
|
android:textSize="13sp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:layout_height="wrap_content"
|
android:orientation="horizontal">
|
||||||
android:layout_width="match_parent">
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/image_1"
|
android:id="@+id/image_1"
|
||||||
android:tag="image1"
|
|
||||||
layout="@layout/view_message_hi_config_image_item"
|
layout="@layout/view_message_hi_config_image_item"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="95dp"
|
android:layout_height="95dp"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
/>
|
android:tag="image1" />
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/image_2"
|
android:id="@+id/image_2"
|
||||||
android:tag="image2"
|
|
||||||
layout="@layout/view_message_hi_config_image_item"
|
layout="@layout/view_message_hi_config_image_item"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="95dp"
|
android:layout_height="95dp"
|
||||||
android:layout_marginEnd="10dp" />
|
android:layout_marginEnd="10dp"
|
||||||
|
android:tag="image2" />
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/image_3"
|
android:id="@+id/image_3"
|
||||||
android:tag="image3"
|
|
||||||
layout="@layout/view_message_hi_config_image_item"
|
layout="@layout/view_message_hi_config_image_item"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="95dp"
|
android:layout_height="95dp"
|
||||||
android:layout_marginEnd="10dp" />
|
android:layout_marginEnd="10dp"
|
||||||
|
android:tag="image3" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
<Button
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/btn_save"
|
|
||||||
android:layout_width="186dp"
|
|
||||||
android:layout_height="54dp"
|
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginTop="30dp"
|
android:layout_marginTop="30dp"
|
||||||
android:layout_marginBottom="32dp"
|
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:text="@string/dialog_msg_hi_config_save"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textSize="13sp" />
|
android:textSize="13sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -43,6 +43,7 @@
|
|||||||
<string name="dialog_msg_status_online_config">在線</string>
|
<string name="dialog_msg_status_online_config">在線</string>
|
||||||
<string name="dialog_msg_status_offline_config">離線</string>
|
<string name="dialog_msg_status_offline_config">離線</string>
|
||||||
<string name="dialog_msg_hi_config_save">保存設置</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_audio">語音</string>
|
||||||
<string name="dialog_msg_hi_config_text">文案</string>
|
<string name="dialog_msg_hi_config_text">文案</string>
|
||||||
<string name="dialog_msg_hi_config_image">圖片</string>
|
<string name="dialog_msg_hi_config_image">圖片</string>
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
<string name="dialog_msg_status_online_config">Online</string>
|
<string name="dialog_msg_status_online_config">Online</string>
|
||||||
<string name="dialog_msg_status_offline_config">Offline</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_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_audio">Audio</string>
|
||||||
<string name="dialog_msg_hi_config_text">Text</string>
|
<string name="dialog_msg_hi_config_text">Text</string>
|
||||||
<string name="dialog_msg_hi_config_image">Image</string>
|
<string name="dialog_msg_hi_config_image">Image</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user