修改中英文

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;

View File

@ -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) {

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);
} }
} }