add[主播b账号-消息设置,设置后需支持重置取消]
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -75,7 +75,6 @@ public class MainMessageChatListFragment extends AbsMainMessageChatListFragment
|
||||
if (conversationListFragment == null) {
|
||||
return;
|
||||
}
|
||||
ToastUtil.showDebug("清空");
|
||||
conversationListFragment.onChatList();
|
||||
}
|
||||
|
||||
|
||||
@@ -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:text="@string/dialog_msg_hi_config_save"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="13sp" />
|
||||
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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user