add[整蛊翻译]
This commit is contained in:
parent
c5de062171
commit
0425b56106
@ -1353,11 +1353,11 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="interactive_game_search_room_broadcast_room">Whether to enter the live broadcast room</string>
|
||||
<string name="interactive_game_search_room_bhe_game">No,only enter the game</string>
|
||||
<string name="interactive_game_rooms_oin">There are currently no rooms to join</string>
|
||||
<string name="prank_switch">Turntable prank switch</string>
|
||||
<string name="see_the_contents_of">After closing, all users will not be able to see the contents of the turntable</string>
|
||||
<string name="diamonds_every_time">The turntable consumes diamonds every time</string>
|
||||
<string name="diamonds_every_time_requirement_of">Minimum requirement of 1000 diamonds</string>
|
||||
<string name="diamonds_every_time_requirement_of_hint">Fill in the content of the prank,Fill in a minimum of 2 words and a maximum of 10 words</string>
|
||||
<string name="prank_switch">Turntable Trick Switch</string>
|
||||
<string name="see_the_contents_of">After turning it on, all users will not be able to see the content of the carousel.</string>
|
||||
<string name="diamonds_every_time">Each turn of the wheel consumes diamonds</string>
|
||||
<string name="diamonds_every_time_requirement_of">Starting with at least 1000 diamonds</string>
|
||||
<string name="diamonds_every_time_requirement_of_hint">Choose a gift</string>
|
||||
<string name="prank_content_yet_hint">You have not set up the prank content yet</string>
|
||||
<string name="choose_a_prank_gift">Choose a prank gift</string>
|
||||
<string name="choose_a_prank_gift_hint">Enter the prank content...</string>
|
||||
|
@ -1356,11 +1356,11 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="interactive_game_search_room_broadcast_room">Whether to enter the live broadcast room</string>
|
||||
<string name="interactive_game_search_room_bhe_game">No,only enter the game</string>
|
||||
<string name="interactive_game_rooms_oin">There are currently no rooms to join</string>
|
||||
<string name="prank_switch">Turntable prank switch</string>
|
||||
<string name="see_the_contents_of">After closing, all users will not be able to see the contents of the turntable</string>
|
||||
<string name="diamonds_every_time">The turntable consumes diamonds every time</string>
|
||||
<string name="diamonds_every_time_requirement_of">Minimum requirement of 1000 diamonds</string>
|
||||
<string name="diamonds_every_time_requirement_of_hint">Fill in the content of the prank,Fill in a minimum of 2 words and a maximum of 10 words</string>
|
||||
<string name="prank_switch">Turntable Trick Switch</string>
|
||||
<string name="see_the_contents_of">After turning it on, all users will not be able to see the content of the carousel.</string>
|
||||
<string name="diamonds_every_time">Each turn of the wheel consumes diamonds</string>
|
||||
<string name="diamonds_every_time_requirement_of">Starting with at least 1000 diamonds</string>
|
||||
<string name="diamonds_every_time_requirement_of_hint">Choose a gift</string>
|
||||
<string name="prank_content_yet_hint">You have not set up the prank content yet</string>
|
||||
<string name="choose_a_prank_gift">Choose a prank gift</string>
|
||||
<string name="choose_a_prank_gift_hint">Enter the prank content...</string>
|
||||
|
@ -131,4 +131,10 @@
|
||||
<item name="android:activityCloseEnterAnimation">@anim/out_to_right_abit</item>
|
||||
<item name="android:activityCloseExitAnimation">@anim/out_to_right</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="PrankTabLayoutTextStyle" parent="TextAppearance.Design.Tab">
|
||||
<item name="textAllCaps">false</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
</style>
|
||||
</resources>
|
@ -235,6 +235,7 @@ public class LivePrankRecyclerAdapter extends RecyclerView.Adapter<LivePrankRecy
|
||||
}
|
||||
|
||||
private String getChineseNum(int id) {
|
||||
if(WordUtil.isNewZh()){
|
||||
switch (id) {
|
||||
case 1:
|
||||
return "一";
|
||||
@ -249,6 +250,22 @@ public class LivePrankRecyclerAdapter extends RecyclerView.Adapter<LivePrankRecy
|
||||
case 6:
|
||||
return "六";
|
||||
}
|
||||
}else{
|
||||
switch (id) {
|
||||
case 1:
|
||||
return " No. 1";
|
||||
case 2:
|
||||
return " No. 2";
|
||||
case 3:
|
||||
return " No. 3";
|
||||
case 4:
|
||||
return " No. 4";
|
||||
case 5:
|
||||
return " No. 5";
|
||||
case 6:
|
||||
return " No. 6";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
@ -271,17 +288,17 @@ public class LivePrankRecyclerAdapter extends RecyclerView.Adapter<LivePrankRecy
|
||||
} else {
|
||||
switch (id) {
|
||||
case 1:
|
||||
return "Extraction probability:40%";
|
||||
return "Chance of extraction: 40%";
|
||||
case 2:
|
||||
return "Extraction probability:30%";
|
||||
return "Chance of extraction: 30%";
|
||||
case 3:
|
||||
return "Extraction probability:15%";
|
||||
return "Chance of extraction: 15%";
|
||||
case 4:
|
||||
return "Extraction probability:10%";
|
||||
return "Chance of extraction: 10%";
|
||||
case 5:
|
||||
return "Extraction probability:4%";
|
||||
return "Chance of extraction: 4%";
|
||||
default:
|
||||
return "Extraction probability:1%";
|
||||
return "Chance of extraction: 1%";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package com.yunbao.live.dialog;
|
||||
import android.content.Context;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@ -27,6 +28,8 @@ public class LivePrankAddGiftDialog extends AbsDialogPopupWindow {
|
||||
private TextView giftText;
|
||||
private TextView numberText;
|
||||
private EditText contentText;
|
||||
private LinearLayout giftNumberLayout;
|
||||
private boolean isShowGiftNumber = true;
|
||||
|
||||
private OnItemClickListener<PrankGiftBean> onItemClickListener;
|
||||
|
||||
@ -42,7 +45,8 @@ public class LivePrankAddGiftDialog extends AbsDialogPopupWindow {
|
||||
|
||||
}
|
||||
|
||||
public LivePrankAddGiftDialog setGiftBeans(List<PrankGiftBean> giftBeans) {
|
||||
public LivePrankAddGiftDialog setGiftBeans(List<PrankGiftBean> 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(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.setTitle(prankContent);
|
||||
onItemClickListener.onItemClick(bean,0);
|
||||
dismiss();
|
||||
|
@ -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<PrankGiftBean>() {
|
||||
@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<PrankGiftBean> prankGiftBeans) {
|
||||
JSONArray prankJson = getJsonObjects(prankGiftBeans);
|
||||
LiveNetManager.get(mContext).setPrankGift(mLiveUid, giftSwitch1Btn.getTag().equals("true")?"1":"0", new Gson().toJson(prankJson), "1", new HttpCallback<PrankHttpTurntableBean>() {
|
||||
LiveNetManager.get(mContext).setPrankGift(mLiveUid, giftSwitch1Btn.getTag().equals("true") ? "1" : "0", new Gson().toJson(prankJson), giftTypeNowText.getTag().toString(), new HttpCallback<PrankHttpTurntableBean>() {
|
||||
@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<PrankGiftResultBean>() {
|
||||
LiveNetManager.get(mContext).getPrankGiftList(mLiveUid, giftTypeNowText.getTag().toString(), new HttpCallback<PrankGiftResultBean>() {
|
||||
@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,17 +526,7 @@ 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<Object>() {
|
||||
LiveNetManager.get(mContext).setAnchorPrankTurntable(mLiveUid, bean.getCoin() + "", bean.getTurntable1(), bean.getTurntable2(), bean.getTurntable3(), bean.getTurntable4(), bean.getTurntable5(), bean.getTurntable6(), bean.getStatus() + "", new HttpCallback<Object>() {
|
||||
@Override
|
||||
public void onSuccess(Object data) {
|
||||
|
||||
@ -520,8 +545,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 = "<font color=\"#FFFFFF\">" +
|
||||
"1、當前整蠱分類有哪些?</font> <font color=\"#FFFFFF\"> 當前分爲轉盤整蠱和禮物整蠱。可根據實際情況決定,例如都設置或只設置一種。" +
|
||||
"</font> <font color=\"\">" +
|
||||
"2、轉盤整蠱如何填寫?</font> <font color=\"#F9B003\">\n" +
|
||||
"打開開關→設置價格→填寫6個整蠱→保存設置。\n" +
|
||||
"\n" +
|
||||
"</font> <font color=\"#FFFFFF\">注意:若有人發起整蠱,將提示你完成該整蠱,期間若有人花費鑽石拯救你,則不用完成整蠱。\n</font><font color=\"#FFFFFF\">" +
|
||||
"3、禮物整蠱如何填寫?</font> <font color=\"#F9B003\">\n" +
|
||||
"當前分爲禮物數達成整蠱和連擊數最高整蠱。\n" +
|
||||
"\n" +
|
||||
"禮物數達成整蠱:打開開關→選擇禮物→填寫數量→填寫整蠱→保存設置。\n" +
|
||||
"\n" +
|
||||
"連擊數最高整蠱:打開開關→切換→選擇禮物→填寫整蠱→保存設置。\n</font><font color=\"\">" +
|
||||
"4、整蠱如何填寫?</font> <font color=\"\">\n" +
|
||||
"根據你的實際情況決定。例如:唱歌、跳舞、情書、下蹲、吃辣或其他任意才藝。\n</font><font color=\"\">" +
|
||||
"5、我怎麽知道該做哪些整蠱?</font> <font color=\"\">\n" +
|
||||
"系統將發送消息至彈幕;\n" +
|
||||
"你需要做的整蠱會自動挂起。</font>";
|
||||
|
||||
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("<br><b><font color=" + color + ">");
|
||||
result.append(content);
|
||||
result.append("</br></b></font>");
|
||||
} else {
|
||||
result.append("<br><font color=" + color + ">");
|
||||
result.append(content);
|
||||
result.append("</br></font>");
|
||||
}
|
||||
if (linebreak) {
|
||||
result.append("<br></br>");
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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"
|
||||
|
@ -65,12 +65,12 @@
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/live_prank_gift_add_gift"
|
||||
android:gravity="center|left"
|
||||
android:text= "@string/live_prank_gift_add_gift"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
|
||||
@ -97,17 +97,19 @@
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/giftNumberLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center"
|
||||
android:gravity="center|left"
|
||||
android:text="@string/live_prank_gift_add_gift_number"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
@ -140,11 +142,11 @@
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center"
|
||||
android:gravity="center|left"
|
||||
android:text="@string/live_prank_gift_add_gift_content"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
|
@ -1,22 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="330dp"
|
||||
android:layout_height="400dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="20dp"
|
||||
android:background="#000002">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/alive_prank_gift_dialog_explain"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back"
|
||||
@ -24,23 +18,36 @@
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="18dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/icon_back" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginRight="18dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/alive_prank_gift_dialog_explain"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title">
|
||||
android:orientation="vertical">
|
||||
|
||||
</TextView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
@ -22,7 +22,7 @@
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible"
|
||||
tools:visibility="gone">
|
||||
tools:visibility="visible">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/turntable_config_layout"
|
||||
@ -41,14 +41,16 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/switch1_desc_text"
|
||||
android:layout_width="300dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:maxLines="2"
|
||||
android:text="@string/see_the_contents_of"
|
||||
android:textColor="#B3B3B3"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/switch1_btn"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/switch1_title_text" />
|
||||
|
||||
@ -70,13 +72,15 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/switch2_title_text"
|
||||
android:layout_width="270dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:maxLines="2"
|
||||
android:text="@string/diamonds_every_time"
|
||||
android:textColor="#FFFFFF"
|
||||
app:layout_constraintEnd_toStartOf="@+id/switch2_btn"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@ -116,7 +120,7 @@
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
tools:visibility="gone">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/gift_config_layout"
|
||||
@ -143,6 +147,7 @@
|
||||
android:text="@string/live_prank_switch_info"
|
||||
android:textColor="#B3B3B3"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintRight_toLeftOf="@+id/gift_switch1_btn"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/gift_switch1_title_text" />
|
||||
|
||||
@ -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"
|
||||
|
@ -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"/>
|
||||
|
@ -123,17 +123,23 @@
|
||||
<string name="details">Details></string>
|
||||
<string name="combo_vote">Combo</string>
|
||||
<string name="combo_vote_more">Most first</string>
|
||||
<string name="live_prank_dialog_save">Clear</string>
|
||||
<string name="live_prank_dialog_clear">Save</string>
|
||||
<string name="live_prank_dialog_save">Save</string>
|
||||
<string name="live_prank_dialog_clear">Clear</string>
|
||||
<string name="live_prank_dialog_gift_type_todo">Switch to</string>
|
||||
<string name="live_prank_dialog_gift_type_number">Highest combo</string>
|
||||
<string name="live_prank_dialog_gift_type_number">highest combo</string>
|
||||
<string name="live_prank_dialog_gift_type_achieved">Quantity achieved</string>
|
||||
<string name="live_prank_switch">gift trick switch</string>
|
||||
<string name="live_prank_switch_info">After closing, the user cannot see the gift trick</string>
|
||||
<string name="live_prank_add_gift">+ Add gift trick</string>
|
||||
<string name="live_prank_gift_tips">You can add up to 6, and it is recommended to add 4.</string>
|
||||
<string name="live_prank_gift_add_title">Add gift</string>
|
||||
<string name="live_prank_gift_add_gift">Gift</string>
|
||||
<string name="live_prank_gift_add_gift_number">Quantity</string>
|
||||
<string name="live_prank_gift_add_gift_number_select">Fill in the number</string>
|
||||
<string name="live_prank_gift_add_gift_content">Content</string>
|
||||
<string name="live_prank_gift_add_gift_contnet_select">Please enter prank content, such as a dance.</string>
|
||||
|
||||
<string name="alive_prank_gift_add_gift_content_sub">Confirm</string>
|
||||
<string name="alive_prank_gift_add_gift_content_sub">confirm</string>
|
||||
<string name="alive_prank_gift_dialog_number_title">Quantity</string>
|
||||
<string name="live_prank_gift_dialog_number_btn">+ Set other quantity (up to 9999)</string>
|
||||
<string name="alive_prank_gift_dialog_explain">Trick instructions</string>
|
||||
|
Loading…
Reference in New Issue
Block a user