diff --git a/Share/src/main/java/com/yunbao/share/ui/SharePopDialog.java b/Share/src/main/java/com/yunbao/share/ui/SharePopDialog.java index 329fe807b..e70c7a673 100644 --- a/Share/src/main/java/com/yunbao/share/ui/SharePopDialog.java +++ b/Share/src/main/java/com/yunbao/share/ui/SharePopDialog.java @@ -19,8 +19,8 @@ import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; -import com.yunbao.share.bean.ShareBuilder; import com.yunbao.share.adapters.ShareAppAdapter; +import com.yunbao.share.bean.ShareBuilder; import java.util.ArrayList; import java.util.List; @@ -64,7 +64,7 @@ public class SharePopDialog extends AbsDialogPopupWindow { } public SharePopDialog setShareLink(String link) { - this.shareLink = link; + this.shareLink = link + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0); return this; } @@ -113,6 +113,7 @@ public class SharePopDialog extends AbsDialogPopupWindow { url = shareLink; } } + url = url + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0); link.setText(url); info.setText(String.format(getContext().getString(R.string.dialog_share_info), StringUtil.isEmpty(anchorName) ? "" : anchorName)); ImgLoader.display(getContext(), anchorAvatar, avatar); @@ -139,7 +140,7 @@ public class SharePopDialog extends AbsDialogPopupWindow { url = ShareBuilder.createLiveShareLink(uid, anchorId, anchorName, anchorAvatar); } ClipboardManager cm = (ClipboardManager) getContext().getSystemService(CLIPBOARD_SERVICE); - ClipData clipData = ClipData.newPlainText("text",info.getText().toString()+"\n"+url); + ClipData clipData = ClipData.newPlainText("text", info.getText().toString() + "\n" + url + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0)); cm.setPrimaryClip(clipData); ToastUtil.show(getContext().getString(com.yunbao.common.R.string.copy_success)); } diff --git a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java index 03729629d..702e94fe1 100644 --- a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java +++ b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java @@ -7,6 +7,7 @@ import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Build; +import android.os.Handler; import android.provider.MediaStore; import android.text.TextUtils; import android.view.View; @@ -25,7 +26,6 @@ import androidx.annotation.RequiresApi; import com.alibaba.fastjson.JSON; import com.lxj.xpopup.XPopup; -import com.umeng.analytics.MobclickAgent; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; @@ -113,7 +113,13 @@ public class WebViewActivity extends AbsActivity { @Override public void onPageFinished(WebView view, String url) { - setTitle(view.getTitle()); + new Handler().postDelayed(new Runnable() { + @Override + public void run() { + setTitle(view.getTitle()); + } + }, 500); + if (url.contains("for")) { mWebView.loadUrl("javascript:goAnchorTab()"); } @@ -256,7 +262,7 @@ public class WebViewActivity extends AbsActivity { mIsLive = isLive; if (Constants.LoginKefu) { if (addArgs) { - url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0); + url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0); } } Intent intent = new Intent(context, WebViewActivity.class); @@ -264,7 +270,7 @@ public class WebViewActivity extends AbsActivity { context.startActivity(intent); } - public static void forward(Context context, String url,boolean isLive) { + public static void forward(Context context, String url, boolean isLive) { forward(context, url, true, isLive); } @@ -437,6 +443,7 @@ public class WebViewActivity extends AbsActivity { } + @Override protected void onPause() { super.onPause(); diff --git a/common/src/main/res/layout/dialog_live_new_wish_list.xml b/common/src/main/res/layout/dialog_live_new_wish_list.xml index f11c4c827..5d6372c9a 100644 --- a/common/src/main/res/layout/dialog_live_new_wish_list.xml +++ b/common/src/main/res/layout/dialog_live_new_wish_list.xml @@ -10,7 +10,7 @@ android:id="@+id/wish_list_top" android:layout_width="match_parent" android:layout_height="160dp" - android:background="@drawable/wish_list_day_zh" + android:background="@drawable/wish_list_lunar_en" android:scaleType="fitCenter" /> + android:orientation="vertical" + android:paddingBottom="10dp"> + + diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index 59bec0600..889907acb 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -1262,7 +1262,7 @@ Limited ride And limited avatar frame Has been lit %s Illustrated book Not lit up - Platform naming + Platform title Not yet lit No more gifts yet Light up @@ -1360,5 +1360,8 @@ Limited ride And limited avatar frame 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 You have not set up the prank content yet + Choose a prank gift + Enter the prank content... + Input quantity diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index 8394da1c6..a186192f5 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1357,4 +1357,7 @@ 最少1,000鑽石起步 填寫整蠱內容,最少2個字,最多10個字 您目前還未設置整蠱內容 + 選擇整蠱禮物 + 輸入整蠱內容... + 输入数量 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index ac8085ae4..88080a047 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1356,4 +1356,7 @@ 最少1,000鑽石起步 填寫整蠱內容,最少2個字,最多10個字 您目前還未設置整蠱內容 + 選擇整蠱禮物 + 輸入整蠱內容... + 输入数量 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index c80ac437b..a8195214d 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1356,5 +1356,8 @@ 最少1,000鑽石起步 填寫整蠱內容,最少2個字,最多10個字 您目前還未設置整蠱內容 + 選擇整蠱禮物 + 輸入整蠱內容... + 输入数量 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index dff975be6..f9a9fafa6 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1262,7 +1262,7 @@ Limited ride And limited avatar frame Gift wall Has been lit %s Not lit up - Platform naming + Platform title Not yet lit The current event has not sent any gifts No more gifts yet @@ -1363,4 +1363,7 @@ Limited ride And limited avatar frame 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 You have not set up the prank content yet + Choose a prank gift + Enter the prank content... + Input quantity diff --git a/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java b/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java index 9816a54e3..ac1340c5d 100644 --- a/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java @@ -9,6 +9,11 @@ import android.widget.RadioButton; import android.widget.RadioGroup; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.viewpager.widget.ViewPager; + import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; @@ -17,6 +22,7 @@ import com.yunbao.common.bean.LiveGiftBean; import com.yunbao.common.bean.PrankGiftBean; import com.yunbao.common.dialog.AbsDialogPopupWindow; import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; @@ -26,16 +32,10 @@ import com.yunbao.live.adapter.GiftTopAdapter; import com.yunbao.live.adapter.LiveGiftPagerAdapter; import com.yunbao.live.adapter.LiveGiftPagerAdapter.ActionListener; import com.yunbao.live.bean.GiftTopBean; -import com.yunbao.common.http.LiveHttpUtil; import java.util.ArrayList; import java.util.List; -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; -import androidx.viewpager.widget.ViewPager; - public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListener, View.OnClickListener { private Context mContext; @@ -217,7 +217,7 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene for (int i = 0; i < list.size(); i++) { JSONObject data = list.getJSONObject(i); GiftTopBean giftTopBean = new GiftTopBean(); - giftTopBean.setName(data.getString("name")); + giftTopBean.setName(WordUtil.isNewZh()?data.getString("name"):data.getString("en_name")); name.add(giftTopBean); } @@ -265,17 +265,17 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene public void onClick(View view) { int id = view.getId(); if (id == R.id.btn_send) { - DialogUitl.showSimpleInputDialog(mContext, "輸入數量", DialogUitl.INPUT_TYPE_NUMBER, new DialogUitl.SimpleCallback() { + DialogUitl.showSimpleInputDialog(mContext, WordUtil.isNewZh() ?"輸入數量":"Input quantity", DialogUitl.INPUT_TYPE_NUMBER, new DialogUitl.SimpleCallback() { @Override public void onConfirmClick(Dialog dialog, String content) { try { prangNum = Integer.parseInt(content); if (prangNum <= 0) { - ToastUtil.show("數量不能為0或負數"); + ToastUtil.show(WordUtil.isNewZh() ?"數量不能為0或負數":"The quantity cannot be zero or negative"); return; } if (prangNum > 999) { - ToastUtil.show("數量不能大於999"); + ToastUtil.show(WordUtil.isNewZh() ?"數量不能大於999":"The number cannot be greater than 999"); return; } mBtnSend.setText(content); @@ -285,12 +285,12 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene dialog.dismiss(); } catch (Exception e) { e.printStackTrace(); - ToastUtil.show("輸入錯誤"); + ToastUtil.show(WordUtil.isNewZh() ? "輸入錯誤":"Input error"); } } }); } else if (id == R.id.btn_context) { - DialogUitl.showSimpleInputDialog(mContext, "輸入整蠱內容...", new DialogUitl.SimpleCallback() { + DialogUitl.showSimpleInputDialog(mContext, WordUtil.isNewZh() ? "輸入整蠱內容..." : "Enter the prank content...", new DialogUitl.SimpleCallback() { @Override public void onConfirmClick(Dialog dialog, String content) { prangContext = content; @@ -307,29 +307,29 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene }); } else if (id == R.id.gift_btn) { if (bean == null) { - ToastUtil.show("整蠱禮物不能為空"); + ToastUtil.show(WordUtil.isNewZh() ? "整蠱禮物不能為空":"A trick gift can't be empty"); return; } if (StringUtil.isEmpty(prangContext) || prangNum == 0) { - ToastUtil.show("整蠱內容或數量不能為空"); + ToastUtil.show(WordUtil.isNewZh() ?"整蠱內容或數量不能為空":"The content or number of pranks cannot be empty"); return; } if (prangNum >= 999) { - ToastUtil.show("整蠱數量不能過大"); + ToastUtil.show(WordUtil.isNewZh() ?"整蠱數量不能過大":"The number of pranks should not be too large"); return; } if (WordUtil.isSpecialChar(prangContext)) { - ToastUtil.show("整蠱內容不能包含特殊字符"); + ToastUtil.show(WordUtil.isNewZh() ?"整蠱內容不能包含特殊字符":"The prank content must not contain special characters"); return; } if (prangContext.length() > 6) { - ToastUtil.show("整蠱內容過長"); + ToastUtil.show(WordUtil.isNewZh() ?"整蠱內容過長":"The prank is too long"); return; } if (giftBeans != null) { for (PrankGiftBean giftBean : giftBeans) { if (giftBean.getGiftId().equals(bean.getId() + "")) { - ToastUtil.show("整蠱禮物已存在"); + ToastUtil.show(WordUtil.isNewZh() ?"整蠱禮物已存在":"Prank gifts already exist"); return; } } 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 ad0491009..7e77599ab 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java @@ -96,6 +96,11 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O mPrankRecyclerView.setAdapter(recyclerAdapter); mCoinTextView.setOnClickListener(this); mTurntableConfigImageView.setOnClickListener(this); + if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { + mPrankBtn.setText("保存設置"); + } else { + mPrankBtn.setText("Save Settings"); + } recyclerAdapter.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(String bean, int position) { diff --git a/live/src/main/res/layout/dialog_live_gift_wall.xml b/live/src/main/res/layout/dialog_live_gift_wall.xml index d8a374d09..bd8283f91 100644 --- a/live/src/main/res/layout/dialog_live_gift_wall.xml +++ b/live/src/main/res/layout/dialog_live_gift_wall.xml @@ -103,7 +103,7 @@ android:padding="2dp" android:text="@string/lit_icon" android:textColor="#3E68FF" - android:textSize="14sp" + android:textSize="13sp" android:textStyle="italic|bold" /> @@ -159,7 +159,7 @@ android:gravity="start|center" android:paddingStart="10dp" android:paddingEnd="10dp" - android:text="輸入整蠱內容..." + android:text="@string/choose_a_prank_gift_hint" android:textColor="#8C8C8C" android:textSize="14sp" /> diff --git a/live/src/main/res/layout/item_live_gift.xml b/live/src/main/res/layout/item_live_gift.xml index 494524ccf..52942fd6d 100644 --- a/live/src/main/res/layout/item_live_gift.xml +++ b/live/src/main/res/layout/item_live_gift.xml @@ -82,6 +82,7 @@ android:layout_gravity="bottom" android:layout_marginBottom="23dp" android:gravity="center" + android:singleLine="true" android:textColor="@color/white" android:textSize="12sp" /> diff --git a/live/src/main/res/layout/item_live_task.xml b/live/src/main/res/layout/item_live_task.xml index 57cbe7814..0b6f73597 100644 --- a/live/src/main/res/layout/item_live_task.xml +++ b/live/src/main/res/layout/item_live_task.xml @@ -7,34 +7,44 @@ android:layout_marginBottom="10dp" android:background="@drawable/background_151515"> - - - - + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + + + + + + + app:layout_constraintTop_toBottomOf="@+id/item_task_title_lay"> + app:layout_constraintTop_toBottomOf="@+id/item_task_title_lay">