修改中英文

This commit is contained in:
18401019693
2023-10-10 17:03:51 +08:00
parent 1625135d0c
commit a25ce2034f
24 changed files with 122 additions and 85 deletions

View File

@@ -1109,12 +1109,12 @@ public class LiveAudienceActivity extends LiveActivity {
bundle.putString(Constants.URL,
(CommonAppConfig.HOST + "/h5/live/joinFansClub.html" +
"?uid=" + userInfo.getId() +
"&token=" + userInfo.getToken() + "&anchorUid=" + mLiveUid)+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
"&token=" + userInfo.getToken() + "&anchorUid=" + mLiveUid) + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
} else {
bundle.putString(Constants.URL,
( CommonAppConfig.HOST + "/h5/live/fansClub.html" +
(CommonAppConfig.HOST + "/h5/live/fansClub.html" +
"?uid=" + userInfo.getId() +
"&token=" + userInfo.getToken() + "&anchorUid=" + mLiveUid)+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
"&token=" + userInfo.getToken() + "&anchorUid=" + mLiveUid) + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
}
bundle.putString("liveUid", mLiveUid);
bundle.putString("anchorName", mAncherName);
@@ -1132,7 +1132,7 @@ public class LiveAudienceActivity extends LiveActivity {
case LIVE_WKS://周星榜
String weeklyStarUrl = CommonAppConfig.HOST + "/h5/activity/weekStar/index.html?&uid="
+ userInfo.getId() +
"&token=" + userInfo.getToken() + "&anchorUid=" + mLiveUid+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
"&token=" + userInfo.getToken() + "&anchorUid=" + mLiveUid + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
ZhuangBanActivity.forward(mContext, weeklyStarUrl, false, 1);
break;
case NOBLE:
@@ -1142,7 +1142,7 @@ public class LiveAudienceActivity extends LiveActivity {
+ "&token=" + userInfo.getToken()
+ "&anchorUid=" + mLiveBean.getUid()
+ "&ancherName=" + mLiveBean.getUserNiceName()
+ "&uid=" + userInfo.getId()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
+ "&uid=" + userInfo.getId() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
ZhuangBanActivity.forward(mContext, nobleUrl, false, 1);
break;
case LIAN_MAI:
@@ -1219,7 +1219,7 @@ public class LiveAudienceActivity extends LiveActivity {
case ACTIVITY_CENTER://活动中心
String url = CommonAppConfig.HOST + "/h5/live/hallOfFame/index.html?g=Appapi&m=Turntable&a=tricky";
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
+ CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
+ CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
Log.i("tag", url);
Intent intent = new Intent(mContext, ZhuangBanActivity.class);
intent.putExtra("url", url);
@@ -1244,7 +1244,7 @@ public class LiveAudienceActivity extends LiveActivity {
url += "?anchorUid=" + mLiveUid
+ "&stream=" + mStream
+ "&uid=" + CommonAppConfig.getInstance().getUid()
+ "&token=" + CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
+ "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment();
bundle.putString("url", url);
bundle.putInt("show_type", 0);
@@ -1495,6 +1495,11 @@ public class LiveAudienceActivity extends LiveActivity {
manager.showGiftWall(event.getUid(), event.isVoicePress(), event.getUname(), event.getAvatar());
}
break;
case SUD_GAME_CREATE_ROOM:
if (manager != null) {
manager.setSudName(event.getAvatar());
}
break;
}

View File

@@ -379,7 +379,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
if (isDRPK != 1) {
openMicWindow(1);
} else {
ToastUtil.show("您已在PK中");
ToastUtil.show(WordUtil.isNewZh()?"您已在PK中":"You are already in the PK");
}
break;
case Constants.LIVE_FUNC_DR://多人PK
@@ -460,7 +460,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
}
});
} else {
ToastUtil.show("您已在PK中");
ToastUtil.show(WordUtil.isNewZh()?"您已在PK中":"You are already in the PK");
}
break;
case Constants.LIVE_FUNC_BEAUTY://美颜
@@ -496,7 +496,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
//openLinkMicAnchorWindow(false);
openFreePkWindow();
} else {
ToastUtil.show("您已在PK中");
ToastUtil.show(WordUtil.isNewZh()?"您已在PK中":"You are already in the PK");
}
break;
case Constants.LIVE_FUNC_WISHLIST://心愿单
@@ -517,7 +517,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
if (isDRPK != 1) {
openRandomPkWindow();
} else {
ToastUtil.show("您已在PK中");
ToastUtil.show(WordUtil.isNewZh()?"您已在PK中":"You are already in the PK");
}
break;
default:

View File

@@ -1,9 +1,6 @@
package com.yunbao.live.adapter;
import android.content.Context;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@@ -11,11 +8,14 @@ import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.bean.ConfigBean;
import com.yunbao.common.bean.LiveRoomTypeBean;
import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.live.R;
import com.yunbao.common.bean.LiveRoomTypeBean;
import java.util.ArrayList;
import java.util.Arrays;
@@ -38,21 +38,19 @@ public class LiveRoomTypeAdapter extends RecyclerView.Adapter<LiveRoomTypeAdapte
mCheckedColor = ContextCompat.getColor(context, R.color.global);
mUnCheckedColor = 0xffffffff;
mList = new ArrayList<>();
ConfigBean configBean = CommonAppConfig.getInstance().getConfig();
Log.i("tag",configBean.toString());
if (configBean != null) {
String[][] liveType = configBean.getLiveType();
if (liveType != null) {
Log.i("tag", Arrays.toString(liveType));
List<LiveRoomTypeBean> list = LiveRoomTypeBean.getLiveTypeList(liveType);
mList.addAll(list);
for (LiveRoomTypeBean bean : mList) {
if (bean.getId() == checkedId) {
bean.setChecked(true);
break;
}
String[][] liveType = CommonAppConfig.getInstance().getLiveType();
if (liveType != null) {
Log.i("tag", Arrays.toString(liveType));
List<LiveRoomTypeBean> list = LiveRoomTypeBean.getLiveTypeList(liveType);
mList.addAll(list);
for (LiveRoomTypeBean bean : mList) {
if (bean.getId() == checkedId) {
bean.setChecked(true);
break;
}
}
}
mInflater = LayoutInflater.from(context);
mOnClickListener = new View.OnClickListener() {

View File

@@ -12,14 +12,12 @@ import androidx.constraintlayout.widget.ConstraintLayout;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants;
import com.yunbao.common.bean.ConfigBean;
import com.yunbao.common.bean.LiveRoomTypeBean;
import com.yunbao.common.dialog.AbsDialogFragment;
import com.yunbao.common.interfaces.CommonCallback;
import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R;
import com.yunbao.common.bean.LiveRoomTypeBean;
import java.util.ArrayList;
import java.util.Arrays;
@@ -81,15 +79,15 @@ public class LiveNewRoomTypeDialogFragment extends AbsDialogFragment implements
pwd.setOnClickListener(view -> select(false));
submit.setOnClickListener(view -> {
if (isSelectPublic) {
LiveRoomTypeBean bean = new LiveRoomTypeBean(0,mContext.getString(R.string.live_room_public));
if(mCallback!=null) {
LiveRoomTypeBean bean = new LiveRoomTypeBean(0, mContext.getString(R.string.live_room_public));
if (mCallback != null) {
mCallback.callback(bean);
}
} else {
for (LiveRoomTypeBean bean : mList) {
if (bean.getId() == Constants.LIVE_TYPE_PWD) {
bean.setChecked(true);
if(mCallback!=null) {
if (mCallback != null) {
mCallback.callback(bean);
}
break;
@@ -103,9 +101,8 @@ public class LiveNewRoomTypeDialogFragment extends AbsDialogFragment implements
private void initData() {
mList = new ArrayList<>();
ConfigBean configBean = CommonAppConfig.getInstance().getConfig();
Log.i("tag", configBean.toString());
String[][] liveType = configBean.getLiveType();
String[][] liveType = CommonAppConfig.getInstance().getLiveType();
if (liveType != null) {
Log.i("tag", Arrays.toString(liveType));
List<LiveRoomTypeBean> list = LiveRoomTypeBean.getLiveTypeList(liveType);

View File

@@ -54,8 +54,8 @@ public class LiveAudienceEvent extends BaseModel {
private String mWishGiftId;
private boolean isContactGift;
private boolean isPk;
public String mStream;
public String mLiveUid,giftId;
public String mStream;
public String mLiveUid, giftId;
public String getGiftId() {
return giftId;
@@ -463,9 +463,10 @@ public class LiveAudienceEvent extends BaseModel {
RED_PACKET(69, "RedPacket"),
RED_PACKET_SUPER_JACKPOT(70, "超级红包"),
INPUT_DIALOG(71, "输入框"),
IS_ATTENTION(72,"是否关注主播"),
GIFT_WALL(73,"礼物墙"),
UPDATE_FANS_TASK_STATUS(74,"更新粉丝任务状态");
IS_ATTENTION(72, "是否关注主播"),
GIFT_WALL(73, "礼物墙"),
UPDATE_FANS_TASK_STATUS(74, "更新粉丝任务状态"),
SUD_GAME_CREATE_ROOM(75, "主播创建sud游戏");
private int type;
private String name;

View File

@@ -741,6 +741,11 @@ public class SocketRyClient {
case SOCKET_LIVE_MSG_TO_USER:
sendToUserMsg(map);
break;
case "SudGameCreateRoom":
Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.SUD_GAME_CREATE_ROOM)
.setAvatar(map.getString("room_name")));
break;
}
}

View File

@@ -35,6 +35,8 @@ import com.yunbao.common.bean.UserBean;
import com.yunbao.common.event.LivePushRyEvent;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.LiveHttpConsts;
import com.yunbao.common.http.LiveHttpUtil;
import com.yunbao.common.interfaces.CommonCallback;
import com.yunbao.common.interfaces.ImageResultCallback;
import com.yunbao.common.interfaces.OnItemClickListener;
@@ -64,8 +66,6 @@ import com.yunbao.live.dialog.LiveNewRoomClassDialogFragment;
import com.yunbao.live.dialog.LiveNewRoomTypeDialogFragment;
import com.yunbao.live.dialog.LiveTimeDialogFragment;
import com.yunbao.live.event.LiveAudienceEvent;
import com.yunbao.common.http.LiveHttpConsts;
import com.yunbao.common.http.LiveHttpUtil;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
@@ -583,7 +583,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
url.append("&uid=")
.append(model.getId())
.append("&token=")
.append(model.getToken()) .append("&isZh=")
.append(model.getToken()).append("&isZh=")
.append(WordUtil.isNewZh() ? "1" : 0);
RouteUtil.forwardLiveZhuangBanActivity(url.toString(), false);
} else if (i == R.id.btn_live_anchor_say) {
@@ -762,7 +762,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
/**
* 选择直播类型
*/
private LiveRoomTypeBean liveRoomTypeBean = new LiveRoomTypeBean(0,mContext.getString(R.string.live_room_public));
private LiveRoomTypeBean liveRoomTypeBean = new LiveRoomTypeBean(0, mContext.getString(R.string.live_room_public));
private void chooseLiveType() {
Bundle bundle = new Bundle();
@@ -809,14 +809,14 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
* 密码房间
*/
private void onLiveTypePwd(final LiveRoomTypeBean bean) {
DialogUitl.showSimpleInputDialog(mContext,mContext.getString(R.string.live_set_pwd), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, 8, new DialogUitl.SimpleCallback() {
DialogUitl.showSimpleInputDialog(mContext, mContext.getString(R.string.live_set_pwd), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, 8, new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
if (TextUtils.isEmpty(content)) {
ToastUtil.show(R.string.live_set_pwd_empty);
} else {
mLiveType = bean.getId();
mLiveTypeTextView.setText(bean.getName());
mLiveTypeTextView.setText(WordUtil.isNewZh() ? "密碼房" : "password room");
if (StringUtil.isInt(content)) {
mLiveTypeVal = Integer.parseInt(content);
}
@@ -831,7 +831,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
* 付费房间
*/
private void onLiveTypePay(final LiveRoomTypeBean bean) {
DialogUitl.showSimpleInputDialog(mContext,mContext.getString(R.string.live_set_fee), DialogUitl.INPUT_TYPE_NUMBER, 8, new DialogUitl.SimpleCallback() {
DialogUitl.showSimpleInputDialog(mContext, mContext.getString(R.string.live_set_fee), DialogUitl.INPUT_TYPE_NUMBER, 8, new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
if (TextUtils.isEmpty(content)) {

View File

@@ -650,6 +650,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
sud_text_name.setText(WordUtil.isNewZh() ?
String.format("主播创建了【%s】房间快来与主播同玩~", sudName) :
String.format("The anchor has created a 【%s】 room. Come and play with the anchor~", sudName));
sud_text_name.setVisibility(View.VISIBLE);
ViewClicksAntiShake.clicksAntiShake(sud_text_name, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {

View File

@@ -168,7 +168,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
if (PKing == false) {
((LiveRyAnchorActivity) mContext).openLinkMicAnchorWindow(true);
} else {
ToastUtil.show("您已在PK中");
ToastUtil.show(WordUtil.isNewZh()?"您已在PK中":"You are already in the PK");
}
}
});

View File

@@ -1956,6 +1956,12 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
}
}
public void setSudName(String sudName) {
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.setSudName(sudName);
}
}
/**
* 全服喇叭
*

View File

@@ -86,6 +86,7 @@
android:textSize="14sp" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -100,7 +101,7 @@
<LinearLayout
android:id="@+id/random_pk_info_btn"
android:layout_width="188dp"
android:layout_height="42dp"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:background="@drawable/bg_live_random_pk_info_btn"
android:gravity="center"
@@ -115,14 +116,15 @@
android:layout_height="wrap_content"
android:text="@string/random_pk_info_btn_start"
android:textColor="#FFFFFF"
android:textSize="16sp" />
android:textSize="14sp" />
<TextView
android:id="@+id/random_pk_btn_desc"
android:layout_width="wrap_content"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:textSize="10sp"
android:textSize="8sp"
android:visibility="gone" />
</LinearLayout>

View File

@@ -2453,6 +2453,7 @@
android:id="@+id/sud_text_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:layout_alignParentBottom="true"
android:layout_marginStart="21dp"
android:layout_marginEnd="21dp"

View File

@@ -75,7 +75,7 @@
<TextView
android:id="@+id/live_clarity"
android:layout_width="80dp"
android:layout_width="60dp"
android:singleLine="true"
android:ellipsize="end"
android:layout_height="wrap_content"