1、增加直播间机器人语言设置--同步潘多拉
2、官方通知消息图标同步iOS 3、系统消息查看详情按钮显示(举报通知的情况下)
This commit is contained in:
parent
a753526571
commit
7ca1ee2aad
@ -19,6 +19,21 @@ public class LiveAiRobotBean extends BaseModel {
|
||||
@SerializedName("ai_gz")
|
||||
private int autoRequestFollowNumber;//自动求关注已配置数量
|
||||
|
||||
@SerializedName("ai_langue")//0中文1英文
|
||||
private int aiLangue;
|
||||
|
||||
public int getAiLangue() {
|
||||
return aiLangue;
|
||||
}
|
||||
|
||||
public Boolean isLangueCn(){
|
||||
return aiLangue==0;
|
||||
}
|
||||
|
||||
public void setAiLangue(int aiLangue) {
|
||||
this.aiLangue = aiLangue;
|
||||
}
|
||||
|
||||
public LiveAiRobotBean() {
|
||||
}
|
||||
|
||||
|
@ -168,6 +168,15 @@ public class DialogUitl {
|
||||
showSimpleDialog(context, content, false, callback);
|
||||
}
|
||||
|
||||
public static void showSimpleDialogString(Context context, String content,String confirmString, SimpleCallback callback) {
|
||||
if (context instanceof Activity) {
|
||||
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context).setTitle(null).setContent(content).setCancelable(false).setClickCallback(callback).setConfirmString(confirmString).build().show();
|
||||
}
|
||||
|
||||
public static void showSimpleDialog(Context context, String content, boolean cancelable, SimpleCallback callback) {
|
||||
showSimpleDialog(context, null, content, cancelable, callback);
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
@ -7,6 +8,8 @@ import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@ -23,6 +26,11 @@ import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.utils.MicStatusManager;
|
||||
import com.yunbao.common.manager.MicUserManager;
|
||||
import com.yunbao.common.manager.MicedUserManager;
|
||||
import com.yunbao.common.manager.RandomPkManager;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
|
||||
public class LiveRobotSettingCustomPopup extends BottomPopupView implements View.OnClickListener {
|
||||
private static String TAG = "AI机器人";
|
||||
@ -32,6 +40,11 @@ public class LiveRobotSettingCustomPopup extends BottomPopupView implements View
|
||||
private String time = "";
|
||||
private ImageView robotState;
|
||||
|
||||
private ImageView languageZhImgView;
|
||||
private AppCompatTextView languageZhTv;
|
||||
private ImageView languageEnImgView;
|
||||
private AppCompatTextView languageEnTv;
|
||||
private int lastLanguage = 1;
|
||||
private int robotStateInt = 1;
|
||||
|
||||
public int getRobotStateInt() {
|
||||
@ -60,6 +73,10 @@ public class LiveRobotSettingCustomPopup extends BottomPopupView implements View
|
||||
robotNameSetting = findViewById(R.id.robot_name_setting);
|
||||
robotNameText = findViewById(R.id.robot_name_text);
|
||||
robotState = findViewById(R.id.robot_state);
|
||||
languageZhImgView = findViewById(R.id.languageZhImgView);
|
||||
languageZhTv = findViewById(R.id.languageZhTv);
|
||||
languageEnImgView = findViewById(R.id.languageEnImgView);
|
||||
languageEnTv = findViewById(R.id.languageEnTv);
|
||||
automaticGreetingNumber = findViewById(R.id.automatic_greeting_number);
|
||||
automaticMessageNumber = findViewById(R.id.automatic_message_number);
|
||||
findViewById(R.id.automatic_message_sending).setOnClickListener(this);
|
||||
@ -91,7 +108,64 @@ public class LiveRobotSettingCustomPopup extends BottomPopupView implements View
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
languageZhImgView.setOnClickListener(v -> {
|
||||
if (lastLanguage == 0) {
|
||||
return;
|
||||
}
|
||||
ShowChangeLanguagePopup(0);
|
||||
});
|
||||
languageZhTv.setOnClickListener(v -> {
|
||||
if (lastLanguage == 0) {
|
||||
return;
|
||||
}
|
||||
ShowChangeLanguagePopup(0);
|
||||
});
|
||||
|
||||
languageEnImgView.setOnClickListener(v -> {
|
||||
if (lastLanguage == 1) {
|
||||
return;
|
||||
}
|
||||
ShowChangeLanguagePopup(1);
|
||||
});
|
||||
languageEnTv.setOnClickListener(v -> {
|
||||
if (lastLanguage == 1) {
|
||||
return;
|
||||
}
|
||||
ShowChangeLanguagePopup(1);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void ShowChangeLanguagePopup(int i) {
|
||||
DialogUitl.showSimpleDialogString(getContext(), getContext().getString(R.string.chang_langue_tips), getContext().getString(R.string.aristocrat_determine) ,new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
LiveNetManager.get(getContext())
|
||||
.setAiRobotDate("ai_langue", i+"", new HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
if (i==0) {
|
||||
languageZhImgView.setSelected(true);
|
||||
languageEnImgView.setSelected(false);
|
||||
lastLanguage = 0;
|
||||
} else {
|
||||
languageZhImgView.setSelected(false);
|
||||
languageEnImgView.setSelected(true);
|
||||
lastLanguage = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@ -243,6 +317,15 @@ public class LiveRobotSettingCustomPopup extends BottomPopupView implements View
|
||||
robotNameText.setText(data.getName());
|
||||
automaticGreetingNumber.setText(String.valueOf(data.getAutoSeyHiNumber()));
|
||||
automaticMessageNumber.setText(String.valueOf(data.getAutoRequestFollowNumber()));
|
||||
if (data.isLangueCn()) {
|
||||
languageZhImgView.setSelected(true);
|
||||
languageEnImgView.setSelected(false);
|
||||
lastLanguage = 0;
|
||||
} else {
|
||||
languageZhImgView.setSelected(false);
|
||||
languageEnImgView.setSelected(true);
|
||||
lastLanguage = 1;
|
||||
}
|
||||
time = String.valueOf(data.getTime());
|
||||
robotStateInt = data.getStatus();
|
||||
if (data.getStatus() == 1) {
|
||||
|
@ -45,11 +45,73 @@
|
||||
app:srcCompat="@mipmap/special_icon_off" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/robot_language"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/robot_status"
|
||||
android:layout_marginTop="18dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/ai_anguage_settings"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/languageZhImgView"
|
||||
android:layout_width="wrap_content"
|
||||
android:padding="2dp"
|
||||
android:layout_marginTop="0.5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/selector_protocol_check"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/languageZhTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="中文"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/languageEnImgView"
|
||||
android:layout_width="wrap_content"
|
||||
android:padding="2dp"
|
||||
android:layout_marginTop="0.5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="12dp"
|
||||
android:src="@drawable/selector_protocol_check"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/languageEnTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="English"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/robot_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/robot_status"
|
||||
android:layout_below="@+id/robot_language"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
<resources>
|
||||
|
||||
<string name="ai_anguage_settings">机器人语言设置</string>
|
||||
<string name="open_vip_live">开通贵族</string>
|
||||
<string name="chang_langue_tips">此設定後,所有機器人語言將會被翻譯覆蓋,請確認是否完成此操作</string>
|
||||
<string name="refresh_header_pulling">下拉可以重繪</string>
|
||||
<string name="refresh_header_refreshing">正在重繪</string>
|
||||
<string name="refresh_header_loading">正在加載</string>
|
||||
|
@ -323,6 +323,10 @@
|
||||
<string name="live_send_gift">Sending gifts</string>
|
||||
<string name="live_send_gift_1">sent </string>
|
||||
<string name="live_ktgz">UnlockVIP</string>
|
||||
<string name="open_vip_live">openVip</string>
|
||||
<string name="ai_anguage_settings">Language Settings</string>
|
||||
<string name="chang_langue_tips">After this setting, all robot languages will be covered by translation, please confirm whether this operation is completed!</string>
|
||||
|
||||
|
||||
<string name="live_send_gift_2">Pieces</string>
|
||||
<string name="live_send_gift_3">I sent one.</string>
|
||||
|
@ -1,4 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Library</string>
|
||||
<string name="search">Search</string>
|
||||
<string name="ai_anguage_settings">Language Settings</string>
|
||||
<string name="open_vip_live">openVip</string>
|
||||
<string name="chang_langue_tips">After this setting, all robot languages will be covered by translation, please confirm whether this operation is completed!</string>
|
||||
</resources>
|
||||
|
@ -119,10 +119,8 @@ public class SystemMessageNewAdapter extends RefreshAdapter<SystemMessageBean> {
|
||||
}
|
||||
|
||||
if (bean.getIs_report() == 1) {
|
||||
if (bean.getIs_replenishment() != 1) {
|
||||
layoutMore.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
itemLayout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -107,10 +107,10 @@
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:src="@mipmap/icon_more_live_menu" />
|
||||
android:src="@mipmap/icon_more" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -161,6 +161,6 @@
|
||||
<string name="live_room_push_new_person_task">完成新人任務,可領多重專屬豪禮!</string>
|
||||
<string name="live_room_push_details">詳情</string>
|
||||
<string name="live_room_push_like_an">喜歡主播就關注ta吧~</string>
|
||||
<string name="message_1">點擊查看~</string>
|
||||
<string name="message_1">點擊查看</string>
|
||||
|
||||
</resources>
|
||||
|
@ -164,5 +164,5 @@
|
||||
<string name="live_room_push_new_person_task">Complete the newcomer tasks and receive multiple gifts</string>
|
||||
<string name="live_room_push_details">Details</string>
|
||||
<string name="live_room_push_like_an">If you like this anchor, please subscribe to him.</string>
|
||||
<string name="message_1">Click to view~</string>
|
||||
<string name="message_1">Click to view</string>
|
||||
</resources>
|
Loading…
Reference in New Issue
Block a user