From 420118b6522b314ab7ae688e740122c40eb264bf Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Fri, 17 Mar 2023 15:12:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=95=8C=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E4=B8=AD=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/res/values-en/strings.xml | 27 ++++++++++---- common/src/main/res/values/strings.xml | 18 +++++++++ .../dialog/LiveNewGuardBuyDialogFragment.java | 37 ++++++++++--------- .../dialog/LiveUserMoreDialogFragment.java | 22 +++++------ .../main/res/layout/dialog_new_guard_buy.xml | 8 ++-- .../main/res/layout/dialog_new_guard_list.xml | 2 +- .../main/res/layout/dialog_user_more_list.xml | 4 +- 7 files changed, 76 insertions(+), 42 deletions(-) diff --git a/common/src/main/res/values-en/strings.xml b/common/src/main/res/values-en/strings.xml index 8223456c0..ba779e04e 100644 --- a/common/src/main/res/values-en/strings.xml +++ b/common/src/main/res/values-en/strings.xml @@ -168,6 +168,9 @@ Open guard Renewal Guardian My + Become the guardian of %s + Open a guard for your favorite anchor + The guardian date expires at: %s GET Only one can be given away~ Guard @@ -896,13 +899,13 @@ Limited ride And limited avatar frame onlookers The live broadcast studio was opened - baron - viscount - The marquis DE - The duke - The king - The emperor - Super huang + Baron + Viscount + Marquis + Duke + King + Emperor + Super king Please wait... The slide set Slide up and down to switch the broadcast room @@ -917,16 +920,26 @@ Limited ride And limited avatar frame %sStar challenge Congratulations %s, completed %s %s star challenge, go to meet the host face! star + Join your favorite host fan club Small window play Settings Small window to play Minimize Play + Continue to guard + Join Fan club + Daemon list + You are the weekly guardian of the current anchor + You are the monthly guardian of the current anchor + You are the annual guardian of the current anchor Show when exiting the live room ALL Minimize Play + Anchor is waiting for you to become the guardian of TA, \n escort for TA! + Open a guard for your favorite anchor Show on other apps and pages \n Need to open the display Go to open Don\'t like the small window play?\n You can turn it off in [Personal Center] - [Settings] Go to Settings Got it + Open noble, enjoy a lot of privileges! Personal Settings Rewards Change password diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 1161f2d78..7d686fd4a 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -701,6 +701,13 @@ 消息中心 所屬公會 開通貴族 + 快為您喜歡的主播開通守護吧 + 守護列表 + 主播正在等待您成為TA的守護,\n為TA保駕護航! + 快加入您喜歡的主播粉絲團吧 + 加入粉絲團 + 繼續守護 + 確認支付 確認支付(¥%1$s) 支付方式 @@ -730,6 +737,16 @@ 恢復直播 請輸入數字 您是當前主播的周守護\n守護日期截止到 + 您是當前主播的周守護 + 您是當前主播的月守護 + 您是當前主播的年守護 + 守護日期截止到:%s + + 快为您喜欢的主播开通守护吧 + 成爲%s的守護 + + + 我的%1$s: 充值説明 注冊即代表同意 @@ -1067,6 +1084,7 @@ 歡迎來到PD LIVE。 註冊PD LIVE 註冊並登錄 + 開通貴族,尊享超多特權! diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java index 273f208cf..ac7877b56 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java @@ -82,7 +82,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements private LiveNewGuardBuyItemsAdapter buyItemsAdapter; private GuardRightAdapter mGuardRightAdapter; - private boolean isEmpty,showBuyView; + private boolean isEmpty, showBuyView; private ImageView mBack; private RelativeLayout relativeLayout; @@ -169,13 +169,13 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements mAncherName = bundle.getString(Constants.LIVE_ANCHER_NAME); mAncherIcon = bundle.getString(Constants.LIVE_ANCHER_ICON); mUserIcon = bundle.getString(Constants.USER_ICON); - showBuyView = bundle.getBoolean("showBuyView",true); + showBuyView = bundle.getBoolean("showBuyView", true); String coinName = WordUtil.getString(R.string.diamond); mCoinName = coinName; - isEmpty=bundle.getBoolean("guard",true); + isEmpty = bundle.getBoolean("guard", true); // mCoinNameTextView.setText(WordUtil.getString(R.string.guard_my) + coinName + ":"); - mCoinNameTextView.setText("快为您喜欢的主播开通守护吧"); - anchorName.setText(String.format("成爲%s的守護", mAncherName)); + mCoinNameTextView.setText(R.string.favoriteanchor); + anchorName.setText(String.format(mContext.getString(R.string.theguardianof), mAncherName)); } LiveHttpUtil.getGuardBuyList(new HttpCallback() { @Override @@ -211,11 +211,11 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements private void initView() { int guardType = mLiveGuardInfo.getMyGuardType(); if (guardType == Constants.GUARD_TYPE_NONE) { - if(isEmpty){ + if (isEmpty) { iconCover.setImageResource(R.drawable.guardian_img_wings); userIconOne.setVisibility(View.GONE); userIconTwo.setVisibility(View.GONE); - }else{ + } else { mBack.setVisibility(View.VISIBLE); ImgLoader.display(mContext, mAncherIcon, userIconOne); ImgLoader.display(mContext, mUserIcon, userIconTwo); @@ -223,7 +223,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements userIconTwo.setVisibility(View.VISIBLE); } - // iconCover.setBackgroundResource(R.drawable.guardian_img_wings); + // iconCover.setBackgroundResource(R.drawable.guardian_img_wings); buy1.setVisibility(View.VISIBLE); @@ -240,19 +240,19 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements String title = ""; switch (guardType) { case Constants.GUARD_TYPE_DAY: - title = "您是當前主播的周守護"; + title = mContext.getString(R.string.guard_tip_day1); break; case Constants.GUARD_TYPE_MONTH: - title = "您是當前主播的月守護"; + title = mContext.getString(R.string.guard_tip_day2); break; case Constants.GUARD_TYPE_YEAR: - title = "您是當前主播的年守護"; + title = mContext.getString(R.string.guard_tip_day3); break; } anchorName.setText(title); - guard_tips.setText("守護日期截止到:"+ mLiveGuardInfo.getMyGuardEndTime()); + guard_tips.setText(String.format(mContext.getString(R.string.guardiandate), mLiveGuardInfo.getMyGuardEndTime())); } - if(!showBuyView){ + if (!showBuyView) { relativeLayout.setVisibility(View.GONE); } @@ -267,12 +267,12 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements bean.setChecked(false); } for (int i : guardBuyBean.getPrivilege()) { - if(i= guardBuyBean.getCoin()); + // mBtnBuy.setEnabled(mCoinVal >= guardBuyBean.getCoin()); } } @@ -286,13 +286,14 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements } else if (i == R.id.guard_buy) { forwardMyCoin(); - }else if (i==R.id.guard_back){ + } else if (i == R.id.guard_back) { gotoBack(); } } - private void gotoBack(){ + + private void gotoBack() { dismiss(); - ((LiveActivity)mContext).openNewGuardListWindow(mContext instanceof LiveRyAnchorActivity); + ((LiveActivity) mContext).openNewGuardListWindow(mContext instanceof LiveRyAnchorActivity); } /** diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java index 93ca57183..801cbfe57 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java @@ -25,6 +25,7 @@ import com.blankj.utilcode.util.GsonUtils; import com.google.gson.reflect.TypeToken; import com.yunbao.common.Constants; import com.yunbao.common.adapter.RefreshAdapter; +import com.yunbao.common.bean.LiveUserGiftBean; import com.yunbao.common.bean.LiveUserRankBean; import com.yunbao.common.bean.UserBean; import com.yunbao.common.bean.UserRankModel; @@ -38,7 +39,6 @@ import com.yunbao.live.activity.LiveActivity; import com.yunbao.live.activity.LiveRyAnchorActivity; import com.yunbao.live.adapter.UserMoreInfoAdapter; import com.yunbao.live.bean.LiveGuardInfo; -import com.yunbao.common.bean.LiveUserGiftBean; import com.yunbao.live.http.LiveHttpUtil; import java.util.ArrayList; @@ -68,7 +68,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie private RelativeLayout bottom_msg;//底部信息的布局,在榜单列表下不需要显示底部信息 private String Tips = "1"; private String type = "guanzhong"; - private boolean isOnly, noble,showBuyView; + private boolean isOnly, noble, showBuyView; ImageView no_more; private List outRankHide = new ArrayList<>(); @@ -115,7 +115,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie stream = bundle.getString(Constants.STREAM); isOnly = bundle.getBoolean("only", false); noble = bundle.getBoolean("noble", false); - showBuyView = bundle.getBoolean("showBuyView",true); + showBuyView = bundle.getBoolean("showBuyView", true); String outRankHideString = bundle.getString("outRankHide"); outRankHide = GsonUtils.fromJson(outRankHideString, new TypeToken>() { }.getType()); @@ -373,27 +373,27 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) mRefreshView.getLayoutParams(); params.bottomMargin = DpUtil.dp2px(65); if (Tips.equals("1")) { - tags.setText("開通貴族,尊享超多特權!"); + tags.setText(R.string.enjoy_a_lot); btn.setBackgroundResource(R.mipmap.btn_openvip); - btn.setText("開通貴族"); + btn.setText(R.string.live_ktgz); setTextColor(audience_btn, guard_btn, fans_btn, weekRank, dayRank); gz_view.setVisibility(View.GONE); userMoreInfoAdapter.type = "1"; type = "guanzhong"; } else if (Tips.equals("2")) { - tags.setText("快為您喜歡的主播開通守護吧"); + tags.setText(R.string.guard_for_your); btn.setBackgroundResource(R.mipmap.btn_openprotection); - btn.setText("守護列表"); + btn.setText(R.string.daemon_list); setTextColor(guard_btn, audience_btn, fans_btn, dayRank, weekRank); gz_view.setVisibility(View.GONE); userMoreInfoAdapter.type = "2"; no_more.setImageResource(R.mipmap.ic_guard_not); - noMoreText.setText("主播正在等待您成為TA的守護,\n為TA保駕護航!"); + noMoreText.setText(R.string.waiting_for_you); noMoreText.setVisibility(View.VISIBLE); type = "guard"; } else if (Tips.equals("3")) { - tags.setText("快加入您喜歡的主播粉絲團吧"); - btn.setText("加入粉絲團"); + tags.setText(R.string.favorite_host_fan); + btn.setText(R.string.Join_a_fan_club); btn.setBackgroundResource(R.mipmap.btn_joinfans); setTextColor(fans_btn, audience_btn, guard_btn, dayRank, weekRank); gz_view.setVisibility(View.GONE); @@ -421,7 +421,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie setTextColor(weekRank, audience_btn, guard_btn, fans_btn, gz_view, dayRank); noMoreText.setVisibility(View.VISIBLE); } - if(!showBuyView){ + if (!showBuyView) { bottom_msg.setVisibility(View.GONE); params.bottomMargin = DpUtil.dp2px(0); } diff --git a/live/src/main/res/layout/dialog_new_guard_buy.xml b/live/src/main/res/layout/dialog_new_guard_buy.xml index 5820fb6ba..b2bdcef04 100644 --- a/live/src/main/res/layout/dialog_new_guard_buy.xml +++ b/live/src/main/res/layout/dialog_new_guard_buy.xml @@ -171,8 +171,10 @@ @@ -231,7 +233,7 @@ android:layout_height="35dp" android:layout_marginTop="2dp" android:background="@drawable/bg_new_guard_but" - android:text="繼續守護" + android:text="@string/Continue_to_guard" android:textColor="#FFFFFF" android:textSize="16sp" /> diff --git a/live/src/main/res/layout/dialog_new_guard_list.xml b/live/src/main/res/layout/dialog_new_guard_list.xml index f168cda42..692c0c5c4 100644 --- a/live/src/main/res/layout/dialog_new_guard_list.xml +++ b/live/src/main/res/layout/dialog_new_guard_list.xml @@ -146,7 +146,7 @@ @@ -170,7 +170,7 @@ android:layout_marginRight="20dp" android:background="@mipmap/btn_openvip" android:gravity="center" - android:text="開通貴族" + android:text="@string/live_ktgz" android:textSize="13sp" />