diff --git a/Share/src/main/java/com/yunbao/share/ui/InvitePopDialog.java b/Share/src/main/java/com/yunbao/share/ui/InvitePopDialog.java index 12930aaec..32fad6d4a 100644 --- a/Share/src/main/java/com/yunbao/share/ui/InvitePopDialog.java +++ b/Share/src/main/java/com/yunbao/share/ui/InvitePopDialog.java @@ -99,7 +99,7 @@ public class InvitePopDialog extends AbsDialogPopupWindow { list.setAdapter(adapter); initData(); link.setText(url.substring(0, 40)); - info.setText(R.string.dialog_invite_info); + info.setText(mContext.getString(R.string.dialog_invite_info)); avatar.setImageResource(R.mipmap.ic_launcher); //title.setTextColor(getContext().getResources().getColorStateList(R.drawable.bg_invite_title)); title.setText(R.string.dialog_invite_title); diff --git a/common/src/main/java/com/yunbao/common/activity/SudGameActivity.java b/common/src/main/java/com/yunbao/common/activity/SudGameActivity.java index 3f18a1990..2add43165 100644 --- a/common/src/main/java/com/yunbao/common/activity/SudGameActivity.java +++ b/common/src/main/java/com/yunbao/common/activity/SudGameActivity.java @@ -16,6 +16,7 @@ import com.yunbao.common.event.CheckRemainingBalanceEvent; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.sud.QuickStartGameViewModel; import com.yunbao.common.sud.model.GameConfigModel; import com.yunbao.common.sud.state.SudMGPMGState; @@ -27,6 +28,7 @@ import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; import java.util.List; +import java.util.Locale; public class SudGameActivity extends AbsActivity { private FrameLayout gameContainer; @@ -124,13 +126,21 @@ public class SudGameActivity extends AbsActivity { if (data.getGoldenBeanRemainingBalance() == 1) { gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(true, event.getSeatIndex(), true, 1); } else { - ToastUtil.show("钱不够,细狗"); + if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { + ToastUtil.show("金豆不够 "); + }else { + ToastUtil.show("Insufficient money "); + } } } @Override public void onError(String error) { - ToastUtil.show("钱不够,细狗"); + if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { + ToastUtil.show("金豆不够 "); + }else { + ToastUtil.show("Insufficient money "); + } } }); } diff --git a/common/src/main/java/com/yunbao/common/views/LiveOpenCustomPopup.java b/common/src/main/java/com/yunbao/common/views/LiveOpenCustomPopup.java index 02ea18b27..e616d8605 100644 --- a/common/src/main/java/com/yunbao/common/views/LiveOpenCustomPopup.java +++ b/common/src/main/java/com/yunbao/common/views/LiveOpenCustomPopup.java @@ -6,6 +6,7 @@ import android.widget.TextView; import androidx.annotation.NonNull; import com.lxj.xpopup.core.CenterPopupView; +import com.yunbao.common.Constants; import com.yunbao.common.R; import com.yunbao.common.bean.LiveClassBean; import com.yunbao.common.bean.LiveRoomTypeBean; @@ -14,6 +15,7 @@ import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; public class LiveOpenCustomPopup extends CenterPopupView { @@ -36,7 +38,12 @@ public class LiveOpenCustomPopup extends CenterPopupView { public LiveOpenCustomPopup setLiveRoomTypeBean(LiveRoomTypeBean liveRoomTypeBean) { this.liveRoomTypeBean = liveRoomTypeBean; - textLiveRoomType.setText(liveRoomTypeBean.getName()); + if (liveRoomTypeBean.getId()== Constants.LIVE_TYPE_PWD){ + textLiveRoomType.setText(WordUtil.isNewZh() ? "密碼房" : "password room"); + }else { + textLiveRoomType.setText(liveRoomTypeBean.getName()); + } + return this; } @@ -73,7 +80,11 @@ public class LiveOpenCustomPopup extends CenterPopupView { textLiveClass.setText(classBean.getName()); } if (liveRoomTypeBean != null) { - textLiveRoomType.setText(liveRoomTypeBean.getName()); + if (liveRoomTypeBean.getId()== Constants.LIVE_TYPE_PWD){ + textLiveRoomType.setText(WordUtil.isNewZh() ? "密碼房" : "password room"); + }else { + textLiveRoomType.setText(liveRoomTypeBean.getName()); + } } setSelectClarity(selectClarity); //關閉彈窗 diff --git a/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java b/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java index 03447ba18..8e1b144ef 100644 --- a/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java +++ b/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java @@ -29,6 +29,8 @@ import com.yunbao.common.views.weight.ViewClicksAntiShake; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; +import java.util.Locale; + /** * sub半屏游戏弹窗 */ @@ -133,13 +135,22 @@ public class LiveSudGamePopup extends BottomPopupView { if (data.getGoldenBeanRemainingBalance() == 1) { gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(true, event.getSeatIndex(), true, 1); } else { - ToastUtil.show("钱不够,细狗"); + if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { + ToastUtil.show("金豆不够 "); + }else { + ToastUtil.show("Insufficient money "); + } + } } @Override public void onError(String error) { - ToastUtil.show("钱不够,细狗"); + if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { + ToastUtil.show("金豆不够 "); + }else { + ToastUtil.show("Insufficient money "); + } } }); } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewFunctionDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewFunctionDialogFragment.java index 803ff5c15..b7f4bc908 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewFunctionDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewFunctionDialogFragment.java @@ -32,6 +32,7 @@ import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.LiveAnchorMessageCustomPopup; import com.yunbao.live.R; import com.yunbao.live.activity.LiveRyAnchorActivity; @@ -129,10 +130,10 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements if (leave == 0) { ((ImageView) mLeaveView.findViewById(R.id.live_tool_leave_img)).setImageResource(R.mipmap.icon_leave); - ((TextView) mLeaveView.findViewById(R.id.live_tool_leave_text)).setText(R.string.live_zslk); + ((TextView) mLeaveView.findViewById(R.id.live_tool_leave_text)).setText(mContext.getString(R.string.live_zslk)); } else { ((ImageView) mLeaveView.findViewById(R.id.live_tool_leave_img)).setImageResource(R.mipmap.icon_leave_p); - ((TextView) mLeaveView.findViewById(R.id.live_tool_leave_text)).setText(R.string.live_zslk1); + ((TextView) mLeaveView.findViewById(R.id.live_tool_leave_text)).setText(mContext.getString(R.string.live_zslk1)); } mLiveRoomHandler = new LiveRoomHandler(); mLiveTimeTextView.setText(StringUtil.getDurationText(mAnchorLiveTime)); @@ -169,7 +170,7 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements mFunctionClickListener.onClick(LIVE_FUNC_CAMERA); } else if (id == R.id.live_tool_leave) { if (isPk) { - ToastUtil.show("PK中禁止离开"); + ToastUtil.show(WordUtil.isNewZh()?"PK中禁止离开":"Do not leave in PK"); return; } mFunctionClickListener.onClick(LIVE_FUNC_ZSLK); diff --git a/live/src/main/res/layout/dialog_new_live_user.xml b/live/src/main/res/layout/dialog_new_live_user.xml index 0ee0b23fe..be6351a6b 100644 --- a/live/src/main/res/layout/dialog_new_live_user.xml +++ b/live/src/main/res/layout/dialog_new_live_user.xml @@ -1,6 +1,7 @@ @@ -55,7 +56,7 @@ android:id="@+id/btn_guard" android:layout_width="88dp" android:layout_height="23dp" - android:layout_marginStart="14dp" + android:layout_marginStart="25dp" android:layout_marginTop="14dp" android:background="@drawable/bg_user_card_guard" android:gravity="center" @@ -89,8 +90,8 @@ android:layout_marginEnd="14dp" android:src="@mipmap/icon_live_usercard_setting" android:visibility="gone" - app:layout_constraintEnd_toStartOf="@+id/btn_report" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent" + tools:ignore="MissingConstraints" /> diff --git a/live/src/main/res/layout/view_live_pk_details.xml b/live/src/main/res/layout/view_live_pk_details.xml index 926203165..1fa312eb6 100644 --- a/live/src/main/res/layout/view_live_pk_details.xml +++ b/live/src/main/res/layout/view_live_pk_details.xml @@ -53,7 +53,7 @@ android:paddingTop="4.33dp" android:paddingEnd="6dp" android:paddingBottom="4.33dp" - android:text="我方" + android:text="@string/live_link_mic_pk_1" android:textColor="@color/white" android:textSize="12sp" /> @@ -110,7 +110,7 @@ android:paddingTop="4.33dp" android:paddingEnd="6dp" android:paddingBottom="4.33dp" - android:text="我方" + android:text="@string/live_link_mic_pk_1" android:textColor="@color/white" android:textSize="12sp" /> @@ -136,7 +136,7 @@ android:paddingTop="4.33dp" android:paddingEnd="6dp" android:paddingBottom="4.33dp" - android:text="我方" + android:text="@string/live_link_mic_pk_1" android:textColor="@color/white" android:textSize="12sp" /> @@ -193,7 +193,7 @@ android:paddingTop="4.33dp" android:paddingEnd="6dp" android:paddingBottom="4.33dp" - android:text="我方" + android:text="@string/live_link_mic_pk_1" android:textColor="@color/white" android:textSize="12sp" /> diff --git a/main/src/main/java/com/yunbao/main/activity/RedPacketInfoActivity.java b/main/src/main/java/com/yunbao/main/activity/RedPacketInfoActivity.java index 43a02db1a..d7c009da0 100644 --- a/main/src/main/java/com/yunbao/main/activity/RedPacketInfoActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/RedPacketInfoActivity.java @@ -59,11 +59,11 @@ public class RedPacketInfoActivity extends AbsActivity implements View.OnClickLi if (bean.getCurrentStatus() == RedPacketListBean.RED_PACKET_CURRENT_STATUS_SUCCESS) { status.setText(R.string.red_packet_info_status_success); } else { - status.setText(R.string.red_packet_info_status_timeout); + status.setText(mContext.getString(R.string.red_packet_info_status_timeout)); } if (bean.getRedPacketStatus() == 1 && bean.getAmountRefund() == 0) { gold.setVisibility(View.GONE); - backAccountText.setText(R.string.red_packet_info_residue_none); + backAccountText.setText(mContext.getString(R.string.red_packet_info_residue_none)); } else { gold.setVisibility(View.VISIBLE); } diff --git a/main/src/main/java/com/yunbao/main/activity/UserAvatarSelectActivity.java b/main/src/main/java/com/yunbao/main/activity/UserAvatarSelectActivity.java index af6ba92a1..1f797bc11 100644 --- a/main/src/main/java/com/yunbao/main/activity/UserAvatarSelectActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/UserAvatarSelectActivity.java @@ -40,7 +40,7 @@ public class UserAvatarSelectActivity extends AbsActivity { super.main(); titleView = findViewById(R.id.titleView); submit = findViewById(R.id.send); - titleView.setText(R.string.me_edit_avatar_title); + titleView.setText(mContext.getString(R.string.me_edit_avatar_title)); recyclerView = findViewById(R.id.recyclerView); adapter = new UserAvatarSelectAdapter(mContext); recyclerView.setLayoutManager(new GridLayoutManager(mContext, 3)); diff --git a/main/src/main/java/com/yunbao/main/adapter/MainHomeRemFollLiveAdapter.java b/main/src/main/java/com/yunbao/main/adapter/MainHomeRemFollLiveAdapter.java index 5a6110abf..db8c75f09 100644 --- a/main/src/main/java/com/yunbao/main/adapter/MainHomeRemFollLiveAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/MainHomeRemFollLiveAdapter.java @@ -208,14 +208,14 @@ public class MainHomeRemFollLiveAdapter extends RefreshAdapter { mLiveIco.setImageResource(R.mipmap.icon_main_rest_work); mNum.setVisibility(View.VISIBLE); live_type.setVisibility(View.VISIBLE); - mLiveState.setText(R.string.lives_state); + mLiveState.setText(mContext.getString(R.string.lives_state)); } else { views.setVisibility(View.VISIBLE); //休息中 mType.setImageResource(MainIconUtil.getLiveTypeIcon(Constants.LIVE_TYPE_RESTING)); mType.setVisibility(View.GONE); mLiveIco.setImageResource(R.mipmap.icon_main_rest_spot); - mLiveState.setText(R.string.rest_state); + mLiveState.setText(mContext.getString(R.string.rest_state)); live_type.setVisibility(View.GONE); mNum.setVisibility(View.GONE); } diff --git a/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java b/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java index c13a3a0b4..a56ee4332 100644 --- a/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java @@ -227,7 +227,7 @@ public class MainListAdapter extends RefreshAdapter { itemView.setTag(bean); mOrder.setText("" + (position + 4)); if (bean.isHide()) { - mName.setText(R.string.mystery_man); + mName.setText(mContext.getString(R.string.mystery_man)); ImgLoader.display(mContext, R.mipmap.hide, mAvatar); mSex.setVisibility(View.GONE); } else { diff --git a/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java b/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java index cef0bed0e..268cab03d 100644 --- a/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java @@ -368,7 +368,7 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple getItem(position, mVotes1, mVotes2, mVotes3).setText(bean.getTotalCoinFormat()); getItem(position, diamond1, diamond2, diamond3).setVisibility(View.VISIBLE); if (bean.isHide()) { - getItem(position, mName1, mName2, mName3).setText(R.string.mystery_man); + getItem(position, mName1, mName2, mName3).setText(mContext.getString(R.string.mystery_man)); ImgLoader.display(mContext, R.mipmap.hide, getItem(position, mAvatar1, mAvatar2, mAvatar3)); getItem(position, mSex1, mSex2, mSex3).setVisibility(View.GONE); diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeLiveItemViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeLiveItemViewHolder.java index d852d4bec..01dea1c5f 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeLiveItemViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeLiveItemViewHolder.java @@ -112,14 +112,14 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder { mLiveIco.setImageResource(R.mipmap.icon_main_rest_work); mNum.setVisibility(View.VISIBLE); liveType.setVisibility(View.VISIBLE); - mLiveState.setText(R.string.lives_state); + mLiveState.setText(mContext.getString(R.string.lives_state)); } else { views.setVisibility(View.VISIBLE); //休息中 mType.setImageResource(MainIconUtil.getLiveTypeIcon(Constants.LIVE_TYPE_RESTING)); mType.setVisibility(View.GONE); mLiveIco.setImageResource(R.mipmap.icon_main_rest_spot); - mLiveState.setText(R.string.rest_state); + mLiveState.setText(mContext.getString(R.string.rest_state)); liveType.setVisibility(View.GONE); mNum.setVisibility(View.GONE); } diff --git a/main/src/main/java/com/yunbao/main/views/SearchRecommendBodyItemViewHolder.java b/main/src/main/java/com/yunbao/main/views/SearchRecommendBodyItemViewHolder.java index 6307e794d..1e66d228c 100644 --- a/main/src/main/java/com/yunbao/main/views/SearchRecommendBodyItemViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/SearchRecommendBodyItemViewHolder.java @@ -102,14 +102,14 @@ public class SearchRecommendBodyItemViewHolder extends RecyclerView.ViewHolder { mLiveIco.setImageResource(R.mipmap.icon_main_rest_work); mNum.setVisibility(View.VISIBLE); liveType.setVisibility(View.VISIBLE); - mLiveState.setText(R.string.lives_state); + mLiveState.setText(mContext.getString(R.string.lives_state)); } else { views.setVisibility(View.VISIBLE); //休息中 mType.setImageResource(MainIconUtil.getLiveTypeIcon(Constants.LIVE_TYPE_RESTING)); mType.setVisibility(View.GONE); mLiveIco.setImageResource(R.mipmap.icon_main_rest_spot); - mLiveState.setText(R.string.rest_state); + mLiveState.setText(mContext.getString(R.string.rest_state)); liveType.setVisibility(View.GONE); mNum.setVisibility(View.GONE); }//防抖 diff --git a/main/src/main/java/com/yunbao/main/views/UserHomeViewHolder.java b/main/src/main/java/com/yunbao/main/views/UserHomeViewHolder.java index 2956722ba..3da1069b4 100644 --- a/main/src/main/java/com/yunbao/main/views/UserHomeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/UserHomeViewHolder.java @@ -550,7 +550,7 @@ public class UserHomeViewHolder extends AbsLivePageViewHolder implements AppBarL } if (mBtnBlack != null) { if (isAttention == 1) { - mBtnBlack.setText(R.string.black); + mBtnBlack.setText(mContext.getString(R.string.black)); } } }