From 0425b561066205cb237610a837c6906d310e22b9 Mon Sep 17 00:00:00 2001 From: Martin <13046765170@163.com> Date: Tue, 11 Jun 2024 16:55:07 +0800 Subject: [PATCH] =?UTF-8?q?add[=E6=95=B4=E8=9B=8A=E7=BF=BB=E8=AF=91]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/res/values-en-rUS/string.xml | 10 +- common/src/main/res/values/strings.xml | 10 +- common/src/main/res/values/style.xml | 6 + .../adapter/LivePrankRecyclerAdapter.java | 55 ++++++--- .../live/dialog/LivePrankAddGiftDialog.java | 25 +++- .../live/dialog/LivePrankDialogFragment.java | 108 +++++++++++------- .../live/dialog/LivePrankExplainDialog.java | 89 +++++++++++---- .../src/main/res/layout/dialog_live_prank.xml | 1 + .../res/layout/dialog_live_prank_add_gift.xml | 16 +-- .../res/layout/dialog_live_prank_explain.xml | 75 ++++++------ .../res/layout/view_live_prank_turntable.xml | 19 +-- live/src/main/res/layout/view_live_room.xml | 1 + live/src/main/res/values-en/strings.xml | 14 ++- 13 files changed, 281 insertions(+), 148 deletions(-) diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index cf8ac1696..f7b69bd82 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -1353,11 +1353,11 @@ Limited ride And limited avatar frame Whether to enter the live broadcast room No,only enter the game There are currently no rooms to join - Turntable prank switch - After closing, all users will not be able to see the contents of the turntable - The turntable consumes diamonds every time - Minimum requirement of 1000 diamonds - Fill in the content of the prank,Fill in a minimum of 2 words and a maximum of 10 words + Turntable Trick Switch + After turning it on, all users will not be able to see the content of the carousel. + Each turn of the wheel consumes diamonds + Starting with at least 1000 diamonds + Choose a gift You have not set up the prank content yet Choose a prank gift Enter the prank content... diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index c937e7e14..f3f4d18bd 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1356,11 +1356,11 @@ Limited ride And limited avatar frame Whether to enter the live broadcast room No,only enter the game There are currently no rooms to join - Turntable prank switch - After closing, all users will not be able to see the contents of the turntable - The turntable consumes diamonds every time - Minimum requirement of 1000 diamonds - Fill in the content of the prank,Fill in a minimum of 2 words and a maximum of 10 words + Turntable Trick Switch + After turning it on, all users will not be able to see the content of the carousel. + Each turn of the wheel consumes diamonds + Starting with at least 1000 diamonds + Choose a gift You have not set up the prank content yet Choose a prank gift Enter the prank content... diff --git a/common/src/main/res/values/style.xml b/common/src/main/res/values/style.xml index c444de78d..190d8d7e2 100644 --- a/common/src/main/res/values/style.xml +++ b/common/src/main/res/values/style.xml @@ -131,4 +131,10 @@ @anim/out_to_right_abit @anim/out_to_right + + + \ No newline at end of file diff --git a/live/src/main/java/com/yunbao/live/adapter/LivePrankRecyclerAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LivePrankRecyclerAdapter.java index d88f1c850..25cf9ef60 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LivePrankRecyclerAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LivePrankRecyclerAdapter.java @@ -235,19 +235,36 @@ public class LivePrankRecyclerAdapter extends RecyclerView.Adapter onItemClickListener; @@ -42,7 +45,8 @@ public class LivePrankAddGiftDialog extends AbsDialogPopupWindow { } - public LivePrankAddGiftDialog setGiftBeans(List giftBeans) { + public LivePrankAddGiftDialog setGiftBeans(List giftBeans,boolean isShow) { + this.isShowGiftNumber = isShow; this.giftBeans = giftBeans; return this; } @@ -68,6 +72,10 @@ public class LivePrankAddGiftDialog extends AbsDialogPopupWindow { giftText = findViewById(R.id.gift_text); numberText = findViewById(R.id.number_text); contentText = findViewById(R.id.content_text); + giftNumberLayout= findViewById(R.id.giftNumberLayout); + if(isShowGiftNumber){ + giftNumberLayout.setVisibility(VISIBLE); + } ViewClicksAntiShake.clicksAntiShake(backBtn, new ViewClicksAntiShake.ViewClicksCallBack() { @Override @@ -131,11 +139,18 @@ public class LivePrankAddGiftDialog extends AbsDialogPopupWindow { ToastUtil.show(WordUtil.isNewZh() ? "整蠱禮物不能為空" : "A trick gift can't be empty"); return; } - if (numberText.getTag()==null||StringUtil.isEmpty(prankContent)){ - ToastUtil.show(WordUtil.isNewZh() ? "整蠱內容或數量不能為空" : "The content or number of pranks cannot be empty"); - return; + if(isShowGiftNumber){ + if (numberText.getTag()==null||StringUtil.isEmpty(prankContent)){ + ToastUtil.show(WordUtil.isNewZh() ? "整蠱內容或數量不能為空" : "The content or number of pranks cannot be empty"); + return; + } + bean.setNum(Integer.parseInt(numberText.getText().toString())); + }else{ + if (StringUtil.isEmpty(prankContent)){ + ToastUtil.show(WordUtil.isNewZh() ? "整蠱內容或數量不能為空" : "The content or number of pranks cannot be empty"); + return; + } } - bean.setNum(Integer.parseInt(numberText.getText().toString())); bean.setTitle(prankContent); onItemClickListener.onItemClick(bean,0); dismiss(); diff --git a/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java index 45c28a730..6d9e7f6aa 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java @@ -69,6 +69,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O private TextView giftTypeTodoText; private TextView giftTypeNowSwitchText; private Button mBtnAddGift; + private ImageView help; public void setmLiveUid(String mLiveUid) { this.mLiveUid = mLiveUid; @@ -109,6 +110,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O } private void initView() { + help = (ImageView) findViewById(R.id.help); mTabLayout = (TabLayout) findViewById(R.id.prank_tabLayout); mTurntableConfigLayout = findViewById(R.id.turntable_layout); mGiftConfigLayout = findViewById(R.id.gift_layout); @@ -122,6 +124,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O mPrankRecyclerView.setAdapter(recyclerAdapter); mCoinTextView.setOnClickListener(this); mTurntableConfigImageView.setOnClickListener(this); + help.setOnClickListener(this); if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { mPrankBtn.setText("發送圖標"); } else { @@ -159,6 +162,15 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O giftBeans.remove(position); recyclerAdapter.setList(giftBeans); recyclerAdapter.notifyDataSetChanged(); + if (giftBeans.size() < 6) { + mBtnAddGift.setVisibility(View.VISIBLE); + mGiftNotDate.setVisibility(View.VISIBLE); + mPrankBtn.setVisibility(View.VISIBLE); + } else { + mBtnAddGift.setVisibility(View.GONE); + mGiftNotDate.setVisibility(View.GONE); + mPrankBtn.setVisibility(View.GONE); + } } } }); @@ -202,7 +214,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O if (mPrankBtn.getTag() != null && Integer.parseInt(mPrankBtn.getTag().toString()) == 0) { SocketRyChatUtil.sendPrankIcon(); } else { - + showGiftDialog(); } } }); @@ -223,9 +235,14 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O if ((int) mPrankBtn.getTag() == 0) { clearPrankConfig(); } else { + giftSwitch1Btn.setTag("false"); + giftSwitch1Btn.setImageResource(R.mipmap.special_icon_off); giftBeans = new ArrayList<>(); recyclerAdapter.setList(giftBeans); recyclerAdapter.notifyDataSetChanged(); + mPrankBtn.setVisibility(View.VISIBLE); + mBtnAddGift.setVisibility(View.VISIBLE); + mGiftNotDate.setVisibility(View.VISIBLE); } } }); @@ -239,10 +256,9 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O turntable.setText("轉盤整蠱"); gift.setText("禮物整蠱"); } else { - turntable.setText("Turntable prank"); - gift.setText("Gift prank"); + turntable.setText("Turntable"); + gift.setText("Gift"); } - turntable.setTag(0); gift.setTag(1); mTabLayout.addTab(turntable); @@ -261,6 +277,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O mBtnAddGift.setVisibility(View.GONE); mGiftNotDate.setVisibility(View.GONE); recyclerAdapter.setViewType(LivePrankRecyclerAdapter.TYPE_TURNTABLE); + mPrankBtn.setVisibility(View.VISIBLE); mPrankBtn.setBackgroundResource(R.drawable.bg_live_prank_turntable_save); if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { mPrankBtn.setText("發送圖標"); @@ -303,7 +320,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O } private void showGiftDialog() { - LivePrankAddGiftDialog livePrankAddGiftDialog = new LivePrankAddGiftDialog(mContext).setGiftBeans(giftBeans); + LivePrankAddGiftDialog livePrankAddGiftDialog = new LivePrankAddGiftDialog(mContext).setGiftBeans(giftBeans, giftTypeNowText.getTag().equals("1")); livePrankAddGiftDialog.setOnItemClickListener(new OnItemClickListener() { @SuppressLint("NotifyDataSetChanged") @Override @@ -314,9 +331,11 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O if (giftBeans.size() < 6) { mBtnAddGift.setVisibility(View.VISIBLE); mGiftNotDate.setVisibility(View.VISIBLE); + mPrankBtn.setVisibility(View.VISIBLE); } else { mBtnAddGift.setVisibility(View.GONE); - mGiftNotDate.setVisibility(View.VISIBLE); + mGiftNotDate.setVisibility(View.GONE); + mPrankBtn.setVisibility(View.GONE); } } }); @@ -330,8 +349,10 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O giftTypeNowText = (TextView) findViewById(R.id.gift_type_now_text); giftTypeTodoText = (TextView) findViewById(R.id.gift_type_todo); giftTypeNowSwitchText = (TextView) findViewById(R.id.gift_type_now_switch); + giftTypeNowText.setTag("2"); mBtnAddGift = (Button) findViewById(R.id.gift_add_btn); mBtnAddGift.setVisibility(View.GONE); + mGiftNotDate.setVisibility(View.GONE); ViewClicksAntiShake.clicksAntiShake(giftSwitch1Btn, new ViewClicksAntiShake.ViewClicksCallBack() { @Override @@ -351,6 +372,12 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O CharSequence tmp = giftTypeNowText.getText(); giftTypeNowText.setText(giftTypeNowSwitchText.getText()); giftTypeNowSwitchText.setText(tmp); + if (giftTypeNowText.getTag().equals("1")) { + giftTypeNowText.setTag("2"); + } else { + giftTypeNowText.setTag("1"); + } + initGiftData(); } }); ViewClicksAntiShake.clicksAntiShake(mBtnAddGift, new ViewClicksAntiShake.ViewClicksCallBack() { @@ -378,7 +405,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O private void setGiftBean(List prankGiftBeans) { JSONArray prankJson = getJsonObjects(prankGiftBeans); - LiveNetManager.get(mContext).setPrankGift(mLiveUid, giftSwitch1Btn.getTag().equals("true")?"1":"0", new Gson().toJson(prankJson), "1", new HttpCallback() { + LiveNetManager.get(mContext).setPrankGift(mLiveUid, giftSwitch1Btn.getTag().equals("true") ? "1" : "0", new Gson().toJson(prankJson), giftTypeNowText.getTag().toString(), new HttpCallback() { @Override public void onSuccess(PrankHttpTurntableBean data) { initGiftData(); @@ -410,23 +437,31 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O } private void initGiftData() { - LiveNetManager.get(mContext).getPrankGiftList(mLiveUid, mPrankBtn.getTag().equals("0")?"2":"1",new HttpCallback() { + LiveNetManager.get(mContext).getPrankGiftList(mLiveUid, giftTypeNowText.getTag().toString(), new HttpCallback() { @Override public void onSuccess(PrankGiftResultBean data) { - if(mPrankBtn.getTag().toString().equals("1")){ - if(data.getPrank_list()!=null){ + if (mPrankBtn.getTag().toString().equals("1")) { + if (data.getPrank_list() != null) { if (data.getPrank_list().size() < 6) { mBtnAddGift.setVisibility(View.VISIBLE); mGiftNotDate.setVisibility(View.VISIBLE); } else { mBtnAddGift.setVisibility(View.GONE); - mGiftNotDate.setVisibility(View.VISIBLE); + mGiftNotDate.setVisibility(View.GONE); + mPrankBtn.setVisibility(View.GONE); } mPrankRecyclerView.setVisibility(View.VISIBLE); recyclerAdapter.setViewType(LivePrankRecyclerAdapter.TYPE_GIFT); giftBeans = data.getPrank_list(); recyclerAdapter.setList(giftBeans); recyclerAdapter.notifyDataSetChanged(); + if (data.getStatus().equals("1")) { + giftSwitch1Btn.setTag("true"); + giftSwitch1Btn.setImageResource(R.mipmap.special_icon_on); + } else { + giftSwitch1Btn.setTag("false"); + giftSwitch1Btn.setImageResource(R.mipmap.special_icon_off); + } } } @@ -491,37 +526,26 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O } return; } - LiveNetManager.get(mContext).setAnchorPrankTurntable( - mLiveUid, - bean.getCoin() + "", - bean.getTurntable1(), - bean.getTurntable2(), - bean.getTurntable3(), - bean.getTurntable4(), - bean.getTurntable5(), - bean.getTurntable6(), - bean.getStatus() + "", - new HttpCallback() { - @Override - public void onSuccess(Object data) { + LiveNetManager.get(mContext).setAnchorPrankTurntable(mLiveUid, bean.getCoin() + "", bean.getTurntable1(), bean.getTurntable2(), bean.getTurntable3(), bean.getTurntable4(), bean.getTurntable5(), bean.getTurntable6(), bean.getStatus() + "", new HttpCallback() { + @Override + public void onSuccess(Object data) { - if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { - ToastUtil.show("保存成功"); - } else { - ToastUtil.show("Save success"); - } - } - - @Override - public void onError(String error) { - if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { - ToastUtil.show("保存失败:" + error); - } else { - ToastUtil.show("Save failed" + error); - } - } + if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { + ToastUtil.show("保存成功"); + } else { + ToastUtil.show("Save success"); } - ); + } + + @Override + public void onError(String error) { + if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { + ToastUtil.show("保存失败:" + error); + } else { + ToastUtil.show("Save failed" + error); + } + } + }); } @Override @@ -572,7 +596,9 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O } }); } - + } else if (id == R.id.help) { + LivePrankExplainDialog livePrankExplainDialog = new LivePrankExplainDialog(mContext); + livePrankExplainDialog.showDialog(); } } } diff --git a/live/src/main/java/com/yunbao/live/dialog/LivePrankExplainDialog.java b/live/src/main/java/com/yunbao/live/dialog/LivePrankExplainDialog.java index 05fff8d0e..1d9001578 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LivePrankExplainDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/LivePrankExplainDialog.java @@ -2,35 +2,18 @@ package com.yunbao.live.dialog; import android.content.Context; import android.text.Html; +import android.view.View; import android.widget.TextView; import androidx.annotation.NonNull; import com.lxj.xpopup.XPopup; import com.yunbao.common.dialog.AbsDialogPopupWindow; +import com.yunbao.common.utils.WordUtil; import com.yunbao.live.R; public class LivePrankExplainDialog extends AbsDialogPopupWindow { TextView content; - String contentText = "" + - "1、當前整蠱分類有哪些? 當前分爲轉盤整蠱和禮物整蠱。可根據實際情況決定,例如都設置或只設置一種。" + - " " + - "2、轉盤整蠱如何填寫? \n" + - "打開開關→設置價格→填寫6個整蠱→保存設置。\n" + - "\n" + - " 注意:若有人發起整蠱,將提示你完成該整蠱,期間若有人花費鑽石拯救你,則不用完成整蠱。\n" + - "3、禮物整蠱如何填寫? \n" + - "當前分爲禮物數達成整蠱和連擊數最高整蠱。\n" + - "\n" + - "禮物數達成整蠱:打開開關→選擇禮物→填寫數量→填寫整蠱→保存設置。\n" + - "\n" + - "連擊數最高整蠱:打開開關→切換→選擇禮物→填寫整蠱→保存設置。\n" + - "4、整蠱如何填寫? \n" + - "根據你的實際情況決定。例如:唱歌、跳舞、情書、下蹲、吃辣或其他任意才藝。\n" + - "5、我怎麽知道該做哪些整蠱? \n" + - "系統將發送消息至彈幕;\n" + - "你需要做的整蠱會自動挂起。"; - public LivePrankExplainDialog(@NonNull Context context) { super(context); } @@ -42,7 +25,7 @@ public class LivePrankExplainDialog extends AbsDialogPopupWindow { @Override public int bindLayoutId() { - return R.layout.dialog_live_prank_add_gift_number; + return R.layout.dialog_live_prank_explain; } @Override @@ -58,6 +41,70 @@ public class LivePrankExplainDialog extends AbsDialogPopupWindow { void initView() { content = findViewById(R.id.content); - content.setText(Html.fromHtml(contentText)); + findViewById(R.id.back).setOnClickListener(new OnClickListener() { + @Override + public void onClick(View view) { + dialog.dismiss(); + } + }); + StringBuffer stringBuffer = new StringBuffer(); + if(WordUtil.isNewZh()){ + stringBuffer.append(getHtmlContent(true,"1、當前整蠱分類有哪些?","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"當前分爲轉盤整蠱和禮物整蠱。可根據實際情況決定,例如都設置或只設置一種。","\"#FFFFFF\"",true)); + + stringBuffer.append(getHtmlContent(true,"2、轉盤整蠱如何填寫?","\"#F9B003\"",false)); + stringBuffer.append(getHtmlContent(false,"打開開關→設置價格→填寫6個整蠱→保存設置。","\"#F9B003\"",true)); + stringBuffer.append(getHtmlContent(false,"注意:若有人發起整蠱,將提示你完成該整蠱,期間若有人花費鑽石拯救你,則不用完成整蠱。","\"#FFFFFF\"",true)); + + stringBuffer.append(getHtmlContent(true,"3、禮物整蠱如何填寫?","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"當前分爲禮物數達成整蠱和連擊數最高整蠱。","\"#FFFFFF\"",true)); + stringBuffer.append(getHtmlContent(false,"禮物數達成整蠱:打開開關→選擇禮物→填寫數量→填寫整蠱→保存設置。","\"#F9B003\"",true)); + stringBuffer.append(getHtmlContent(false,"連擊數最高整蠱:打開開關→切換→選擇禮物→填寫整蠱→保存設置。","\"#F9B003\"",true)); + + stringBuffer.append(getHtmlContent(true,"4、整蠱如何填寫?","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"根據你的實際情況決定。例如:唱歌、跳舞、情書、下蹲、吃辣或其他任意才藝。","\"#FFFFFF\"",true)); + + stringBuffer.append(getHtmlContent(true,"5、我怎麽知道該做哪些整蠱?","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"系統將發送消息至彈幕;","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"你需要做的整蠱會自動挂起。","\"#FFFFFF\"",false)); + }else{ + stringBuffer.append(getHtmlContent(true,"1. What are the current categories of pranks?","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"Currently it is divided into turntable tricking and gift tricking. It can be decided according to the actual situation, for example, setting both or only one type.","\"#FFFFFF\"",true)); + + stringBuffer.append(getHtmlContent(true,"2. How to fill in the turntable trick?","\"#F9B003\"",false)); + stringBuffer.append(getHtmlContent(false,"Turn on the switch → set the price → fill in 6 tricks → save the settings.","\"#F9B003\"",true)); + stringBuffer.append(getHtmlContent(false,"Note: If someone initiates a trick, you will be prompted to complete the trick. If someone spends diamonds to save you during this period, you do not need to complete the trick.","\"#FFFFFF\"",true)); + + stringBuffer.append(getHtmlContent(true,"3. How to fill in the gift form?","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"Currently, it is divided into the number of gifts to reach Tricky and the number of combos to reach Tricky.","\"#FFFFFF\"",true)); + stringBuffer.append(getHtmlContent(false,"The number of gifts reaches Trick: turn on the switch → select the gift → fill in the quantity → fill in the trick → save the settings.","\"#F9B003\"",true)); + stringBuffer.append(getHtmlContent(false,"The trick with the highest number of combos: turn on the switch → switch → select the gift → fill in the trick → save the settings.","\"#F9B003\"",true)); + + stringBuffer.append(getHtmlContent(true,"4. How to fill in Tricky?","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"Decide based on your actual situation. For example: singing, dancing, love letters, squatting, eating spicy food or any other talent.","\"#FFFFFF\"",true)); + + stringBuffer.append(getHtmlContent(true,"5. How do I know which tricks to do?","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"The system will send a message to the barrage;","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"The tricks you need to do will automatically hang.","\"#FFFFFF\"",false)); + } + + content.setText(Html.fromHtml(stringBuffer.toString())); } + public String getHtmlContent(boolean isTitle, String content, String color, boolean linebreak) { + StringBuffer result = new StringBuffer(); + if (isTitle) { + result.append("
"); + result.append(content); + result.append("
"); + } else { + result.append("
"); + result.append(content); + result.append("
"); + } + if (linebreak) { + result.append("

"); + } + return result.toString(); + } + } diff --git a/live/src/main/res/layout/dialog_live_prank.xml b/live/src/main/res/layout/dialog_live_prank.xml index ffbb8f729..274df02ee 100644 --- a/live/src/main/res/layout/dialog_live_prank.xml +++ b/live/src/main/res/layout/dialog_live_prank.xml @@ -16,6 +16,7 @@ app:tabIndicator="@drawable/random_pk_shape_tab_indicator" app:tabIndicatorColor="#F6F7FB" app:tabIndicatorFullWidth="false" + app:tabTextAppearance="@style/PrankTabLayoutTextStyle" app:tabMaxWidth="100dp" app:tabMode="scrollable" app:tabSelectedTextColor="#F6F7FB" diff --git a/live/src/main/res/layout/dialog_live_prank_add_gift.xml b/live/src/main/res/layout/dialog_live_prank_add_gift.xml index 07cadbf99..a69da4e61 100644 --- a/live/src/main/res/layout/dialog_live_prank_add_gift.xml +++ b/live/src/main/res/layout/dialog_live_prank_add_gift.xml @@ -65,12 +65,12 @@ android:orientation="horizontal"> @@ -97,17 +97,19 @@ @@ -140,11 +142,11 @@ android:orientation="horizontal"> diff --git a/live/src/main/res/layout/dialog_live_prank_explain.xml b/live/src/main/res/layout/dialog_live_prank_explain.xml index 5aee17c77..848e42890 100644 --- a/live/src/main/res/layout/dialog_live_prank_explain.xml +++ b/live/src/main/res/layout/dialog_live_prank_explain.xml @@ -1,46 +1,53 @@ - + - + - + - + + + android:layout_marginTop="10dp"> - + - \ No newline at end of file + + + + \ No newline at end of file diff --git a/live/src/main/res/layout/view_live_prank_turntable.xml b/live/src/main/res/layout/view_live_prank_turntable.xml index 5b070de75..7c01875b7 100644 --- a/live/src/main/res/layout/view_live_prank_turntable.xml +++ b/live/src/main/res/layout/view_live_prank_turntable.xml @@ -22,7 +22,7 @@ android:layout_marginTop="10dp" android:orientation="vertical" android:visibility="visible" - tools:visibility="gone"> + tools:visibility="visible"> @@ -70,13 +72,15 @@ @@ -116,7 +120,7 @@ android:layout_marginTop="10dp" android:orientation="vertical" android:visibility="gone" - tools:visibility="visible"> + tools:visibility="gone"> @@ -188,7 +193,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right" - android:layout_marginStart="10dp" + android:layout_marginStart="5dp" android:layout_marginEnd="16dp" android:drawableEnd="@mipmap/ic_prank_gift_switch" android:text="@string/live_prank_dialog_gift_type_number" diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index 7165d8a47..8eb6252fc 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -2417,6 +2417,7 @@ android:layout_gravity="end" android:visibility="gone" android:layout_marginBottom="5dp" + tools:visibility="visible" android:layout_marginEnd="16dp" android:layout_width="44dp" android:layout_height="46dp"/> diff --git a/live/src/main/res/values-en/strings.xml b/live/src/main/res/values-en/strings.xml index 95be733a7..ee71f5c1e 100644 --- a/live/src/main/res/values-en/strings.xml +++ b/live/src/main/res/values-en/strings.xml @@ -123,17 +123,23 @@ Details> Combo Most first - Clear - Save + Save + Clear Switch to - Highest combo + highest combo Quantity achieved gift trick switch After closing, the user cannot see the gift trick + Add gift trick You can add up to 6, and it is recommended to add 4. + Add gift + Gift + Quantity + Fill in the number + Content + Please enter prank content, such as a dance. - Confirm + confirm Quantity + Set other quantity (up to 9999) Trick instructions