修改中英文

This commit is contained in:
18401019693 2023-10-10 14:15:52 +08:00
parent add3589683
commit 1625135d0c
13 changed files with 163 additions and 20 deletions

View File

@ -33,6 +33,29 @@ public class EnterRoomNewModel extends BaseModel {
@SerializedName("wishListProgress") @SerializedName("wishListProgress")
private WishModel wishListProgress; private WishModel wishListProgress;
@SerializedName("sud_game_room_status")
private String sudGameRoomStatus;
@SerializedName("sud_game_room_name")
private String sudGameRoomName;
public String getSudGameRoomName() {
return sudGameRoomName;
}
public EnterRoomNewModel setSudGameRoomName(String sudGameRoomName) {
this.sudGameRoomName = sudGameRoomName;
return this;
}
public String getSudGameRoomStatus() {
return sudGameRoomStatus;
}
public EnterRoomNewModel setSudGameRoomStatus(String sudGameRoomStatus) {
this.sudGameRoomStatus = sudGameRoomStatus;
return this;
}
public WishModel getWishListProgress() { public WishModel getWishListProgress() {
return wishListProgress; return wishListProgress;
} }

View File

@ -0,0 +1,36 @@
package com.yunbao.common.views;
import android.content.Context;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.lxj.xpopup.core.BottomPopupView;
import com.yunbao.common.R;
import com.yunbao.common.utils.WordUtil;
public class SudHint extends BottomPopupView {
private String sudGameRoomName;
private TextView sud_text_name;
public SudHint(@NonNull Context context, String sudGameRoomName) {
super(context);
this.sudGameRoomName = sudGameRoomName;
}
// 返回自定义弹窗的布局
@Override
protected int getImplLayoutId() {
return R.layout.dialog_sud_hint;
}
// 执行初始化操作比如findView设置点击或者任何你弹窗内的业务逻辑
@Override
protected void onCreate() {
super.onCreate();
sud_text_name = findViewById(R.id.sud_text_name);
sud_text_name.setText(WordUtil.isNewZh()?
String.format("主播创建了【%s】房间快来与主播同玩~",sudGameRoomName):
String.format("The anchor has created a 【%s】 room. Come and play with the anchor~",sudGameRoomName));
}
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="24dp"/>
<solid android:color="#99000000" />
</shape>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:orientation="vertical"
tools:ignore="MissingDefaultResource">
<TextView
android:id="@+id/sud_text_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="21dp"
android:layout_marginEnd="21dp"
android:layout_marginBottom="24dp"
android:background="@drawable/bg_live_sud_hint"
android:paddingStart="22dp"
android:paddingTop="8dp"
android:paddingEnd="22dp"
android:paddingBottom="8dp"
android:text="主播創建了【游戲名】房間,快來與主播同玩~"
android:textColor="@color/white"
android:textSize="14sp">
</TextView>
</LinearLayout>

View File

@ -377,7 +377,7 @@
<string name="live_follow_anchor">Focus on the anchor</string> <string name="live_follow_anchor">Focus on the anchor</string>
<string name="live_report">Are you sure to report?</string> <string name="live_report">Are you sure to report?</string>
<string name="live_link_mic_2">Interaction</string> <string name="live_link_mic_2">Interaction</string>
<string name="live_link_mic_3">End Lian Mai</string> <string name="live_link_mic_3">Quit even wheat</string>
<string name="live_link_mic_4">Allowed even wheat</string> <string name="live_link_mic_4">Allowed even wheat</string>
<string name="live_link_mic_5">Ban Lian Mai</string> <string name="live_link_mic_5">Ban Lian Mai</string>
<string name="link_mic_wait">Initiate a link request</string> <string name="link_mic_wait">Initiate a link request</string>

View File

@ -377,7 +377,7 @@
<string name="live_follow_anchor">Focus on the anchor</string> <string name="live_follow_anchor">Focus on the anchor</string>
<string name="live_report">Are you sure to report?</string> <string name="live_report">Are you sure to report?</string>
<string name="live_link_mic_2">Interaction</string> <string name="live_link_mic_2">Interaction</string>
<string name="live_link_mic_3">End Lian Mai</string> <string name="live_link_mic_3">Quit even wheat</string>
<string name="live_link_mic_4">Allowed even wheat</string> <string name="live_link_mic_4">Allowed even wheat</string>
<string name="live_link_mic_5">Ban Lian Mai</string> <string name="live_link_mic_5">Ban Lian Mai</string>
<string name="link_mic_wait">Initiate a link request</string> <string name="link_mic_wait">Initiate a link request</string>

View File

@ -160,7 +160,6 @@ import com.yunbao.live.dialog.LiveContactDetailsSendGiftDialog;
import com.yunbao.live.dialog.LiveFaceUnityDialogFragment; import com.yunbao.live.dialog.LiveFaceUnityDialogFragment;
import com.yunbao.live.dialog.LiveFansMedalDialogFragment; import com.yunbao.live.dialog.LiveFansMedalDialogFragment;
import com.yunbao.live.dialog.LiveGameDialogFragment; import com.yunbao.live.dialog.LiveGameDialogFragment;
import com.yunbao.live.dialog.LiveGiftPopup;
import com.yunbao.live.dialog.LiveHDDialogFragment; import com.yunbao.live.dialog.LiveHDDialogFragment;
import com.yunbao.live.dialog.LiveUserAnchorMailBoxWebInfoPopDialog; import com.yunbao.live.dialog.LiveUserAnchorMailBoxWebInfoPopDialog;
import com.yunbao.live.dialog.LiveUserDialogFragment; import com.yunbao.live.dialog.LiveUserDialogFragment;
@ -635,6 +634,32 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
} }
} }
private TextView sud_text_name;
private Handler sudNameHandler = new Handler();
private Runnable sudNameRunnable = new Runnable() {
@Override
public void run() {
if (sud_text_name != null) {
sud_text_name.setVisibility(View.GONE);
}
}
};
public void setSudName(String sudName) {
sud_text_name = (TextView) findViewById(com.yunbao.common.R.id.sud_text_name);
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));
ViewClicksAntiShake.clicksAntiShake(sud_text_name, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
sud_text_name.setVisibility(View.GONE);
}
});
sudNameHandler.removeCallbacks(sudNameRunnable);
sudNameHandler.postDelayed(sudNameRunnable, 10000);
}
@Override @Override
protected int getLayoutId() { protected int getLayoutId() {
return R.layout.view_live_room; return R.layout.view_live_room;
@ -1166,7 +1191,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
} else if (bean.getType() == -5) { } else if (bean.getType() == -5) {
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Turntable&a=tricky"; String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Turntable&a=tricky";
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" 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); Log.i("tag", url);
Bundle bundle1 = new Bundle(); Bundle bundle1 = new Bundle();
bundle1.putString("url", url); bundle1.putString("url", url);
@ -2046,13 +2071,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
if (link.equals("sc")) { if (link.equals("sc")) {
String url; String url;
if (!"".equals(bean.getmIntoUrl()) && bean.getmIntoUrl() != null) { if (!"".equals(bean.getmIntoUrl()) && bean.getmIntoUrl() != null) {
url = CommonAppConfig.HOST + bean.getmIntoUrl() + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0); url = CommonAppConfig.HOST + bean.getmIntoUrl() + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
} else { } else {
url = CommonAppConfig.HOST + "/h5/activity/firstTopUp/newUp.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0); url = CommonAppConfig.HOST + "/h5/activity/firstTopUp/newUp.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
} }
ZhuangBanActivity.forward(mContext, url, false, 1); ZhuangBanActivity.forward(mContext, url, false, 1);
} else if (link.equals("zxb")) { } else if (link.equals("zxb")) {
String url = CommonAppConfig.HOST + "/h5/activity/weekStar/index.html?&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0); String url = CommonAppConfig.HOST + "/h5/activity/weekStar/index.html?&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
ZhuangBanActivity.forward(mContext, url, false, 1); ZhuangBanActivity.forward(mContext, url, false, 1);
} else if (link.equals("xyd")) { } else if (link.equals("xyd")) {
openWishListWindow(); openWishListWindow();
@ -2317,7 +2342,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
url += "&"; url += "&";
} }
url += "uid=" + CommonAppConfig.getInstance().getUid() + "&token=" 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);
bundle.putString("url", url); bundle.putString("url", url);
bundle.putInt("height", DpUtil.dp2px(500)); bundle.putInt("height", DpUtil.dp2px(500));
bundle.putInt("show_type", 0); bundle.putInt("show_type", 0);
@ -2341,11 +2366,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
} }
if (Integer.parseInt(bean.getRedVal()) > 2) { if (Integer.parseInt(bean.getRedVal()) > 2) {
mRedVal.setVisibility(View.VISIBLE); mRedVal.setVisibility(View.VISIBLE);
mRedVal.setText(bean.getRedVal() + (WordUtil.isNewZh()?"連勝":"Win")); mRedVal.setText(bean.getRedVal() + (WordUtil.isNewZh() ? "連勝" : "Win"));
} }
if (Integer.parseInt(bean.getBlueVal()) > 2) { if (Integer.parseInt(bean.getBlueVal()) > 2) {
mBlueVal.setVisibility(View.VISIBLE); mBlueVal.setVisibility(View.VISIBLE);
mBlueVal.setText(bean.getBlueVal() + (WordUtil.isNewZh()?"連勝":"Win")); mBlueVal.setText(bean.getBlueVal() + (WordUtil.isNewZh() ? "連勝" : "Win"));
} }
mPkRankTopIcon.setVisibility(View.VISIBLE); mPkRankTopIcon.setVisibility(View.VISIBLE);
ImgLoader.display(mContext, bean.getPkTopImgUrl(), mPkRankTopIcon); ImgLoader.display(mContext, bean.getPkTopImgUrl(), mPkRankTopIcon);

View File

@ -692,7 +692,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
} }
} }
AppManager.runDebugCode(() -> { AppManager.runDebugCode(() -> {
// liveHandler.postDelayed(loadTimeoutRunnableGone, 1_000); // liveHandler.postDelayed(loadTimeoutRunnableGone, 1_000);
}); });
liveHandler.postDelayed(loadTimeoutRunnableGone, 15_000); liveHandler.postDelayed(loadTimeoutRunnableGone, 15_000);
if (TextUtils.equals(data.getEnterRoomInfo().getIsconnection(), "1")) { if (TextUtils.equals(data.getEnterRoomInfo().getIsconnection(), "1")) {
@ -713,6 +713,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
} else { } else {
mLiveRoomViewHolder.hindeRedPacket(); mLiveRoomViewHolder.hindeRedPacket();
} }
if (TextUtils.equals(data.getSudGameRoomStatus(), "1")) {
mLiveRoomViewHolder.setSudName(data.getSudGameRoomName());
}
} }
@Override @Override

View File

@ -50,6 +50,7 @@
android:padding="5dp" android:padding="5dp"
android:src="@mipmap/icon_live_close" android:src="@mipmap/icon_live_close"
android:visibility="gone" /> android:visibility="gone" />
</FrameLayout> </FrameLayout>
<include <include

View File

@ -223,6 +223,7 @@
android:layout_marginStart="3dp" android:layout_marginStart="3dp"
android:layout_marginBottom="-350dp" android:layout_marginBottom="-350dp"
android:visibility="gone" /> android:visibility="gone" />
<include <include
android:id="@+id/fans_enter_room_leave" android:id="@+id/fans_enter_room_leave"
layout="@layout/view_fans_group_enter_room_leave" layout="@layout/view_fans_group_enter_room_leave"
@ -2448,5 +2449,20 @@
android:layout_marginTop="80dp" android:layout_marginTop="80dp"
app:autoPlay="true" /> app:autoPlay="true" />
<TextView
android:id="@+id/sud_text_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginStart="21dp"
android:layout_marginEnd="21dp"
android:layout_marginBottom="24dp"
android:background="@drawable/bg_live_sud_hint"
android:paddingStart="22dp"
android:paddingTop="8dp"
android:paddingEnd="22dp"
android:paddingBottom="8dp"
android:text="主播創建了【游戲名】房間,快來與主播同玩~"
android:textColor="@color/white"
android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>

View File

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

View File

@ -37,8 +37,10 @@ import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.bean.UserBean; import com.yunbao.common.bean.UserBean;
import com.yunbao.common.event.JavascriptInterfaceEvent; import com.yunbao.common.event.JavascriptInterfaceEvent;
import com.yunbao.common.event.LiveRoomChangeEvent;
import com.yunbao.common.event.MainHomeCommunityToChatEvent; import com.yunbao.common.event.MainHomeCommunityToChatEvent;
import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.LiveHttpUtil;
import com.yunbao.common.interfaces.ActivityResultCallback; import com.yunbao.common.interfaces.ActivityResultCallback;
import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.interfaces.CommonCallback;
import com.yunbao.common.interfaces.ImageResultCallback; import com.yunbao.common.interfaces.ImageResultCallback;
@ -48,6 +50,7 @@ import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.JavascriptInterfaceUtils; import com.yunbao.common.utils.JavascriptInterfaceUtils;
import com.yunbao.common.utils.L; import com.yunbao.common.utils.L;
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
import com.yunbao.common.utils.MicStatusManager; import com.yunbao.common.utils.MicStatusManager;
import com.yunbao.common.utils.ProcessImageUtil; import com.yunbao.common.utils.ProcessImageUtil;
import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.RouteUtil;
@ -55,9 +58,6 @@ import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.activity.LiveAudienceActivity; import com.yunbao.live.activity.LiveAudienceActivity;
import com.yunbao.common.event.LiveRoomChangeEvent;
import com.yunbao.common.http.LiveHttpUtil;
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
import com.yunbao.live.views.LiveRoomViewHolder; import com.yunbao.live.views.LiveRoomViewHolder;
import com.yunbao.main.dialog.EncourageDialog; import com.yunbao.main.dialog.EncourageDialog;
import com.yunbao.main.http.MainHttpUtil; import com.yunbao.main.http.MainHttpUtil;
@ -212,6 +212,10 @@ public class MyWebViewActivity extends AbsActivity {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
} }
if (!urlNow.contains("&isZh")) {
urlNow = urlNow + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
}
Log.e("MyH5", urlNow);
mWebView.loadUrl(urlNow); mWebView.loadUrl(urlNow);
if (Constants.myIntoIndex == 2) { if (Constants.myIntoIndex == 2) {
@ -416,7 +420,7 @@ public class MyWebViewActivity extends AbsActivity {
public static void forward(Context context, String url, boolean addArgs) { public static void forward(Context context, String url, boolean addArgs) {
if (addArgs) { if (addArgs) {
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : "0"); url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
} }
Intent intent = new Intent(context, MyWebViewActivity.class); Intent intent = new Intent(context, MyWebViewActivity.class);
intent.putExtra(Constants.URL, url); intent.putExtra(Constants.URL, url);
@ -594,7 +598,7 @@ public class MyWebViewActivity extends AbsActivity {
} else if (TextUtils.equals(event.getMethod(), "androidCancelAnchorAttention")) { } else if (TextUtils.equals(event.getMethod(), "androidCancelAnchorAttention")) {
if (!StringUtil.isEmpty(LiveAudienceActivity.is_fans)) { if (!StringUtil.isEmpty(LiveAudienceActivity.is_fans)) {
LiveAudienceActivity.is_fans = "-2"; LiveAudienceActivity.is_fans = "-2";
LiveRoomViewHolder.setFansNum( LiveAudienceActivity.fansNum - 1); LiveRoomViewHolder.setFansNum(LiveAudienceActivity.fansNum - 1);
IMLoginManager.get(mContext).upDataUserInfo(); IMLoginManager.get(mContext).upDataUserInfo();
} }
} }

View File

@ -274,12 +274,12 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O
if ("2".equals(mBeautySdkType)) { if ("2".equals(mBeautySdkType)) {
Constants.myIntoIndex = 2; Constants.myIntoIndex = 2;
Intent intent = new Intent(mContext, MyWebViewActivity.class); Intent intent = new Intent(mContext, MyWebViewActivity.class);
intent.putExtra(Constants.URL, CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ/release" + "?token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&isRelease=1"); intent.putExtra(Constants.URL, CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ/release" + "?token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&isRelease=1"+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
CommonAppContext.getTopActivity().startActivity(intent); CommonAppContext.getTopActivity().startActivity(intent);
} else { } else {
Constants.myIntoIndex = 2; Constants.myIntoIndex = 2;
Intent intent = new Intent(mContext, MyWebViewActivity.class); Intent intent = new Intent(mContext, MyWebViewActivity.class);
intent.putExtra(Constants.URL, CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ/release" + "?token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&isRelease=1"); intent.putExtra(Constants.URL, CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ/release" + "?token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&isRelease=1"+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
CommonAppContext.getTopActivity().startActivity(intent); CommonAppContext.getTopActivity().startActivity(intent);
} }
} }