修改测试问题

This commit is contained in:
18401019693 2023-11-13 14:24:07 +08:00
parent b7842d5ac9
commit 076f7130c8
6 changed files with 98 additions and 29 deletions

View File

@ -119,6 +119,7 @@ public class CreateSudGamePopup extends BottomPopupView {
roomName = findViewById(R.id.room_name); roomName = findViewById(R.id.room_name);
gameSill = findViewById(R.id.game_sill); gameSill = findViewById(R.id.game_sill);
roomGameArrow = findViewById(R.id.room_game_arrow); roomGameArrow = findViewById(R.id.room_game_arrow);
gameSill.setHint(WordUtil.isNewZh() ? "請輸入貨幣數量" : "Please enter the amount of currency");
ViewClicksAntiShake.clicksAntiShake(createGameType, new ViewClicksAntiShake.ViewClicksCallBack() { ViewClicksAntiShake.clicksAntiShake(createGameType, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override @Override
public void onViewClicks() { public void onViewClicks() {
@ -199,17 +200,18 @@ public class CreateSudGamePopup extends BottomPopupView {
if (TextUtils.isEmpty(sill)) { if (TextUtils.isEmpty(sill)) {
if (TextUtils.equals(currencyType, "3")) { if (TextUtils.equals(currencyType, "3")) {
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
ToastUtil.show("数量区间为10~1000");
} else {
ToastUtil.show("The quantity range is 10 to 1000");
}
} else {
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
ToastUtil.show("数量区间为100--5W"); ToastUtil.show("数量区间为100--5W");
} else { } else {
ToastUtil.show("The quantity range is 100 to 5 W"); ToastUtil.show("The quantity range is 100 to 5 W");
} }
} else {
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
ToastUtil.show("数量区间为10~1000");
} else {
ToastUtil.show("The quantity range is 10 to 1000");
}
} }
return; return;
@ -357,9 +359,9 @@ public class CreateSudGamePopup extends BottomPopupView {
currencyType = event.getCurrencyType(); currencyType = event.getCurrencyType();
selectCurrencyType.setText(currencyTypeName); selectCurrencyType.setText(currencyTypeName);
if (TextUtils.equals(currencyType, "3")) { if (TextUtils.equals(currencyType, "3")) {
gameSill.setHint(getContext().getString(R.string.interactive_game_create_gold_bean_quantity)); gameSill.setHint(WordUtil.isNewZh() ? "請輸入貨幣數量" : "Please enter the amount of currency");
} else { } else {
gameSill.setHint(WordUtil.isNewZh() ? "選擇星幣數量" : "Please enter the number of Coins"); gameSill.setHint(WordUtil.isNewZh() ? "輸入貨幣數量" : "Please enter the amount of currency");
} }
} }
} }

View File

@ -51,6 +51,7 @@ import com.yunbao.common.bean.MicUserBean;
import com.yunbao.common.bean.UserBean; import com.yunbao.common.bean.UserBean;
import com.yunbao.common.dialog.NotCancelableDialog; import com.yunbao.common.dialog.NotCancelableDialog;
import com.yunbao.common.event.GiftWallIlluminateEvent; import com.yunbao.common.event.GiftWallIlluminateEvent;
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
import com.yunbao.common.event.LoginInvalidEvent; import com.yunbao.common.event.LoginInvalidEvent;
import com.yunbao.common.event.SendBlindGiftEvent; import com.yunbao.common.event.SendBlindGiftEvent;
import com.yunbao.common.event.ShowHideEvent; import com.yunbao.common.event.ShowHideEvent;
@ -78,6 +79,7 @@ import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.LiveNewWishListPopup; import com.yunbao.common.views.LiveNewWishListPopup;
import com.yunbao.common.views.LiveRobotSettingCustomPopup; import com.yunbao.common.views.LiveRobotSettingCustomPopup;
import com.yunbao.common.views.LiveSudGamePopup;
import com.yunbao.faceunity.FaceManager; import com.yunbao.faceunity.FaceManager;
import com.yunbao.live.R; import com.yunbao.live.R;
import com.yunbao.live.bean.LiveChatBean; import com.yunbao.live.bean.LiveChatBean;
@ -1857,4 +1859,44 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
}); });
robotHandler.postDelayed(robotRunnable, robotTime); robotHandler.postDelayed(robotRunnable, robotTime);
} }
private LiveSudGamePopup liveSudGamePopupXPopup = null;
@Subscribe(threadMode = ThreadMode.MAIN)
public void onLiveSudGamePopupShowOrHideEvent(LiveSudGamePopupShowOrHideEvent event) {
switch (event.getType()) {
case 0:
if (liveSudGamePopupXPopup == null) {
liveSudGamePopupXPopup = new LiveSudGamePopup(mContext, event.getCreateSudRoomModel());
new XPopup.Builder(mContext)
.enableDrag(false)
.dismissOnTouchOutside(false)
.dismissOnBackPressed(false)
.asCustom(liveSudGamePopupXPopup).show();
} else {
if (liveSudGamePopupXPopup != null) {
liveSudGamePopupXPopup.dialog.show();
}
}
break;
case 1:
if (liveSudGamePopupXPopup != null) {
liveSudGamePopupXPopup.dialog.hide();
}
break;
case 2:
if (liveSudGamePopupXPopup != null) {
liveSudGamePopupXPopup.BusGetOff();
liveSudGamePopupXPopup.dialog.dismiss();
liveSudGamePopupXPopup = null;
}
break;
}
}
} }

View File

@ -410,7 +410,7 @@ public class SocketRyClient {
= new AllServerNotifyEvent() = new AllServerNotifyEvent()
.setBlindBoxId(map.getString("blind_box_id")) .setBlindBoxId(map.getString("blind_box_id"))
.setBoxType(boxType) .setBoxType(boxType)
.setBoxTypeName(map.getString(boxTypeName)) .setBoxTypeName(boxTypeName)
.setDressName(WordUtil.isNewZh() ? map.getString("dress_name") : TextUtils.isEmpty(map.getString("dress_nameen")) ? map.getString("dress_name") : map.getString("dress_nameen")) .setDressName(WordUtil.isNewZh() ? map.getString("dress_name") : TextUtils.isEmpty(map.getString("dress_nameen")) ? map.getString("dress_name") : map.getString("dress_nameen"))
.setGiftNotification(map.getString("gift_notification")) .setGiftNotification(map.getString("gift_notification"))
.setGiftName(WordUtil.isNewZh() ? mCt.getString("giftname") : mCt.getString("giftnameen")) .setGiftName(WordUtil.isNewZh() ? mCt.getString("giftname") : mCt.getString("giftnameen"))
@ -767,9 +767,23 @@ public class SocketRyClient {
} }
private void buyGuardInSameRoom(JSONObject map) { private void buyGuardInSameRoom(JSONObject map) {
String guardName = WordUtil.isNewZh() ? "周守護" : "Week Guardian";
switch (map.getIntValue("guard_type")) {
case 1:
guardName = WordUtil.isNewZh() ? "周守護" : "Week Guardian";
break;
case 2:
guardName = WordUtil.isNewZh() ? "月守護" : "Month Guardian";
break;
case 3:
guardName = WordUtil.isNewZh() ? "年守護" : "Year Guardian";
break;
}
String content = WordUtil.isNewZh() ? "%s在%s的直播間開通了%s" : "%s has been opened in %s live broadcast room %s";
content = String.format(content, map.getString("uname"), map.getString("ancherName"), guardName);
LiveBuyGuardMsgBean buyGuardMsgBean = new LiveBuyGuardMsgBean(); LiveBuyGuardMsgBean buyGuardMsgBean = new LiveBuyGuardMsgBean();
buyGuardMsgBean.setUid(map.getString("uid")); buyGuardMsgBean.setUid(map.getString("uid"));
buyGuardMsgBean.setUserName(map.getString("ct")); buyGuardMsgBean.setUserName(content);
buyGuardMsgBean.setVotes(map.getString("votestotal")); buyGuardMsgBean.setVotes(map.getString("votestotal"));
buyGuardMsgBean.setGuardNum(map.getIntValue("guard_nums")); buyGuardMsgBean.setGuardNum(map.getIntValue("guard_nums"));
buyGuardMsgBean.setGuardType(map.getIntValue("guard_type")); buyGuardMsgBean.setGuardType(map.getIntValue("guard_type"));

View File

@ -932,7 +932,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
* 申请连麦但是主播还未同意的状态 * 申请连麦但是主播还未同意的状态
*/ */
public void micIngTypeOne(LiveBean bean, int liveType, int liveTypeVal) { public void micIngTypeOne(LiveBean bean, int liveType, int liveTypeVal) {
DialogUitl.showSimpleDialog(mContext, null, "您已申請,退出將取消語音連麥申請!", false, new DialogUitl.SimpleCallback3() { DialogUitl.showSimpleDialog(mContext, null, WordUtil.isNewZh()?"您已申請,退出將取消語音連麥申請!":"You have applied, logout will cancel the voice connection application!", false, new DialogUitl.SimpleCallback3() {
@Override @Override
public void onConfirmClick(Dialog dialog) { public void onConfirmClick(Dialog dialog) {
MicStatusManager.getInstance().clear(); MicStatusManager.getInstance().clear();
@ -1381,7 +1381,13 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
@Override @Override
public void onBuyGuard(LiveBuyGuardMsgBean bean) { public void onBuyGuard(LiveBuyGuardMsgBean bean) {
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.onGuardInfoChanged(bean);
LiveChatBean chatBean = new LiveChatBean();
chatBean.setContent(bean.getUserName());
chatBean.setType(LiveChatBean.SYSTEM);
mLiveRoomViewHolder.insertChat(chatBean, 1);
}
} }
@Override @Override

View File

@ -73,6 +73,7 @@ import com.yunbao.main.http.MainHttpUtil;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import java.math.BigDecimal;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
@ -249,10 +250,12 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
} else { } else {
coin.setText(coins); coin.setText(coins);
} }
if (yuanbaos.length() > 8) { BigDecimal yuanbao = new BigDecimal(yuanbaos);
star_coin.setText(yuanbaos.substring(0, yuanbaos.length() - 6) + "M"); String yuanbaoStr =String.valueOf(yuanbao.intValue());
} else if (yuanbaos.length() > 6) { if (yuanbaoStr.length() > 9) {
star_coin.setText(yuanbaos.substring(0, yuanbaos.length() - 3) + "K"); star_coin.setText(yuanbaoStr.substring(0,yuanbaoStr.length() - 6) + "M");
} else if (yuanbaoStr.length()>7) {
star_coin.setText(yuanbaoStr.substring(0, yuanbaoStr.length() - 3) + "K");
} else { } else {
star_coin.setText(yuanbaos); star_coin.setText(yuanbaos);
} }
@ -307,7 +310,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
user_noble_text.setText(mContext.getResources().getString(R.string.now_noble) + u.getNoble_name()); user_noble_text.setText(mContext.getResources().getString(R.string.now_noble) + u.getNoble_name());
user_noble_time.setText(mContext.getResources().getString(R.string.now_noble_time) + u.getNoble_end_time()); user_noble_time.setText(mContext.getResources().getString(R.string.now_noble_time) + u.getNoble_end_time());
} else { } else {
user_noble_text.setText(WordUtil.isNewZh()?"貴族中心":"VIP Center"); user_noble_text.setText(WordUtil.isNewZh() ? "貴族中心" : "VIP Center");
user_noble_time.setText(mContext.getResources().getString(R.string.open_noble_text)); user_noble_time.setText(mContext.getResources().getString(R.string.open_noble_text));
} }
String singnature = u.getSignature(); String singnature = u.getSignature();
@ -484,13 +487,13 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
Constants.isTitle = false; Constants.isTitle = false;
ZhuangBanActivity.forward(mContext, url); ZhuangBanActivity.forward(mContext, url);
} else { } else {
if (bean.getId() == 11){ if (bean.getId() == 11) {
MobclickAgent.onEvent(mContext, "my_anchor", "个人中心点主播中心"); MobclickAgent.onEvent(mContext, "my_anchor", "个人中心点主播中心");
} }
if (bean.getId() == 25){ if (bean.getId() == 25) {
MobclickAgent.onEvent(mContext, "my_friend_invitation", "个人中心点好友邀请"); MobclickAgent.onEvent(mContext, "my_friend_invitation", "个人中心点好友邀请");
} }
if (bean.getId() == 24){ if (bean.getId() == 24) {
MobclickAgent.onEvent(mContext, "my_pack", "个人中心点包裹"); MobclickAgent.onEvent(mContext, "my_pack", "个人中心点包裹");
} }
WebViewActivity.forward(mContext, url, false); WebViewActivity.forward(mContext, url, false);
@ -532,7 +535,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
MobclickAgent.onEvent(mContext, "my_noble", "个人中心点贵族"); MobclickAgent.onEvent(mContext, "my_noble", "个人中心点贵族");
Constants.isTitle = true; Constants.isTitle = true;
UserBean u = CommonAppConfig.getInstance().getUserBean(); UserBean u = CommonAppConfig.getInstance().getUserBean();
String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : "0"); String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
ZhuangBanActivity.forward(mContext, url, false); ZhuangBanActivity.forward(mContext, url, false);
} }
@ -625,7 +628,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
SlideBean bean = mBannerList.get(p); SlideBean bean = mBannerList.get(p);
if (!bean.getSlide_url().equals("")) { if (!bean.getSlide_url().equals("")) {
Constants.isTitle = true; Constants.isTitle = true;
String url = bean.getSlide_url() + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : "0"); String url = bean.getSlide_url() + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
WebViewActivity.forward(mContext, url, false, false); WebViewActivity.forward(mContext, url, false, false);
Map<String, String> map_ekv = new HashMap<String, String>(); Map<String, String> map_ekv = new HashMap<String, String>();
@ -651,7 +654,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
SlideBean bean = mBannerList.get(p); SlideBean bean = mBannerList.get(p);
if (!bean.getSlide_url().equals("")) { if (!bean.getSlide_url().equals("")) {
Constants.isTitle = true; Constants.isTitle = true;
String url = bean.getSlide_url() + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : "0"); String url = bean.getSlide_url() + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
RouteUtil.forwardCustomerService(url); RouteUtil.forwardCustomerService(url);
Map<String, String> map_ekv = new HashMap<String, String>(); Map<String, String> map_ekv = new HashMap<String, String>();

View File

@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginBottom="20dp"
android:background="@mipmap/bg_main_home_sub_game" android:background="@mipmap/bg_main_home_sub_game"
android:orientation="vertical"> android:orientation="vertical">
@ -193,6 +194,7 @@
android:id="@+id/refreshView" android:id="@+id/refreshView"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"