修改中英文
This commit is contained in:
parent
7bedf93dd5
commit
e081f1e058
@ -19,8 +19,8 @@ import com.yunbao.common.glide.ImgLoader;
|
|||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.share.bean.ShareBuilder;
|
|
||||||
import com.yunbao.share.adapters.ShareAppAdapter;
|
import com.yunbao.share.adapters.ShareAppAdapter;
|
||||||
|
import com.yunbao.share.bean.ShareBuilder;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -64,7 +64,7 @@ public class SharePopDialog extends AbsDialogPopupWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public SharePopDialog setShareLink(String link) {
|
public SharePopDialog setShareLink(String link) {
|
||||||
this.shareLink = link;
|
this.shareLink = link + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,6 +113,7 @@ public class SharePopDialog extends AbsDialogPopupWindow {
|
|||||||
url = shareLink;
|
url = shareLink;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
url = url + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||||
link.setText(url);
|
link.setText(url);
|
||||||
info.setText(String.format(getContext().getString(R.string.dialog_share_info), StringUtil.isEmpty(anchorName) ? "" : anchorName));
|
info.setText(String.format(getContext().getString(R.string.dialog_share_info), StringUtil.isEmpty(anchorName) ? "" : anchorName));
|
||||||
ImgLoader.display(getContext(), anchorAvatar, avatar);
|
ImgLoader.display(getContext(), anchorAvatar, avatar);
|
||||||
@ -139,7 +140,7 @@ public class SharePopDialog extends AbsDialogPopupWindow {
|
|||||||
url = ShareBuilder.createLiveShareLink(uid, anchorId, anchorName, anchorAvatar);
|
url = ShareBuilder.createLiveShareLink(uid, anchorId, anchorName, anchorAvatar);
|
||||||
}
|
}
|
||||||
ClipboardManager cm = (ClipboardManager) getContext().getSystemService(CLIPBOARD_SERVICE);
|
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);
|
cm.setPrimaryClip(clipData);
|
||||||
ToastUtil.show(getContext().getString(com.yunbao.common.R.string.copy_success));
|
ToastUtil.show(getContext().getString(com.yunbao.common.R.string.copy_success));
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
import android.os.Handler;
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -25,7 +26,6 @@ import androidx.annotation.RequiresApi;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.umeng.analytics.MobclickAgent;
|
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.CommonAppContext;
|
import com.yunbao.common.CommonAppContext;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
@ -113,7 +113,13 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageFinished(WebView view, String url) {
|
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")) {
|
if (url.contains("for")) {
|
||||||
mWebView.loadUrl("javascript:goAnchorTab()");
|
mWebView.loadUrl("javascript:goAnchorTab()");
|
||||||
}
|
}
|
||||||
@ -256,7 +262,7 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
mIsLive = isLive;
|
mIsLive = isLive;
|
||||||
if (Constants.LoginKefu) {
|
if (Constants.LoginKefu) {
|
||||||
if (addArgs) {
|
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);
|
Intent intent = new Intent(context, WebViewActivity.class);
|
||||||
@ -264,7 +270,7 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
context.startActivity(intent);
|
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);
|
forward(context, url, true, isLive);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -437,6 +443,7 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
android:id="@+id/wish_list_top"
|
android:id="@+id/wish_list_top"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="160dp"
|
android:layout_height="160dp"
|
||||||
android:background="@drawable/wish_list_day_zh"
|
android:background="@drawable/wish_list_lunar_en"
|
||||||
android:scaleType="fitCenter" />
|
android:scaleType="fitCenter" />
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabLayout
|
<com.google.android.material.tabs.TabLayout
|
||||||
@ -36,12 +36,14 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/replacement_wish"
|
android:id="@+id/replacement_wish"
|
||||||
android:layout_width="140dp"
|
android:layout_width="100dp"
|
||||||
android:layout_height="31dp"
|
android:layout_height="31dp"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:background="@drawable/background_wish_replacement"
|
android:background="@drawable/background_wish_replacement"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
@ -1,21 +1,23 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="280dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="194dp"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
|
||||||
app:cardCornerRadius="18dp"
|
app:cardCornerRadius="18dp"
|
||||||
app:cardElevation="18dp">
|
app:cardElevation="18dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="55dp"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_marginTop="30dp">
|
android:layout_marginTop="30dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -72,6 +74,11 @@
|
|||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="10dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1262,7 +1262,7 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="has_been_lit">Has been lit %s</string>
|
<string name="has_been_lit">Has been lit %s</string>
|
||||||
<string name="codex">Illustrated book</string>
|
<string name="codex">Illustrated book</string>
|
||||||
<string name="unlit_icon">Not lit up</string>
|
<string name="unlit_icon">Not lit up</string>
|
||||||
<string name="all_service_champion">Platform naming</string>
|
<string name="all_service_champion">Platform title</string>
|
||||||
<string name="unlit_icon_hint">Not yet lit</string>
|
<string name="unlit_icon_hint">Not yet lit</string>
|
||||||
<string name="lit_icon_hint">No more gifts yet</string>
|
<string name="lit_icon_hint">No more gifts yet</string>
|
||||||
<string name="instant_light">Light up</string>
|
<string name="instant_light">Light up</string>
|
||||||
@ -1360,5 +1360,8 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="diamonds_every_time_requirement_of">Minimum requirement of 1000 diamonds</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="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_content_yet_hint">You have not set up the prank content yet</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>
|
||||||
|
<string name="choose_a_prank_gift_hint2">Input quantity</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1357,4 +1357,7 @@
|
|||||||
<string name="diamonds_every_time_requirement_of">最少1,000鑽石起步</string>
|
<string name="diamonds_every_time_requirement_of">最少1,000鑽石起步</string>
|
||||||
<string name="diamonds_every_time_requirement_of_hint">填寫整蠱內容,最少2個字,最多10個字</string>
|
<string name="diamonds_every_time_requirement_of_hint">填寫整蠱內容,最少2個字,最多10個字</string>
|
||||||
<string name="prank_content_yet_hint">您目前還未設置整蠱內容</string>
|
<string name="prank_content_yet_hint">您目前還未設置整蠱內容</string>
|
||||||
|
<string name="choose_a_prank_gift">選擇整蠱禮物</string>
|
||||||
|
<string name="choose_a_prank_gift_hint">輸入整蠱內容...</string>
|
||||||
|
<string name="choose_a_prank_gift_hint2">输入数量</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1356,4 +1356,7 @@
|
|||||||
<string name="diamonds_every_time_requirement_of">最少1,000鑽石起步</string>
|
<string name="diamonds_every_time_requirement_of">最少1,000鑽石起步</string>
|
||||||
<string name="diamonds_every_time_requirement_of_hint">填寫整蠱內容,最少2個字,最多10個字</string>
|
<string name="diamonds_every_time_requirement_of_hint">填寫整蠱內容,最少2個字,最多10個字</string>
|
||||||
<string name="prank_content_yet_hint">您目前還未設置整蠱內容</string>
|
<string name="prank_content_yet_hint">您目前還未設置整蠱內容</string>
|
||||||
|
<string name="choose_a_prank_gift">選擇整蠱禮物</string>
|
||||||
|
<string name="choose_a_prank_gift_hint">輸入整蠱內容...</string>
|
||||||
|
<string name="choose_a_prank_gift_hint2">输入数量</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1356,5 +1356,8 @@
|
|||||||
<string name="diamonds_every_time_requirement_of">最少1,000鑽石起步</string>
|
<string name="diamonds_every_time_requirement_of">最少1,000鑽石起步</string>
|
||||||
<string name="diamonds_every_time_requirement_of_hint">填寫整蠱內容,最少2個字,最多10個字</string>
|
<string name="diamonds_every_time_requirement_of_hint">填寫整蠱內容,最少2個字,最多10個字</string>
|
||||||
<string name="prank_content_yet_hint">您目前還未設置整蠱內容</string>
|
<string name="prank_content_yet_hint">您目前還未設置整蠱內容</string>
|
||||||
|
<string name="choose_a_prank_gift">選擇整蠱禮物</string>
|
||||||
|
<string name="choose_a_prank_gift_hint">輸入整蠱內容...</string>
|
||||||
|
<string name="choose_a_prank_gift_hint2">输入数量</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1262,7 +1262,7 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="gift_wall">Gift wall</string>
|
<string name="gift_wall">Gift wall</string>
|
||||||
<string name="has_been_lit">Has been lit %s</string>
|
<string name="has_been_lit">Has been lit %s</string>
|
||||||
<string name="unlit_icon">Not lit up</string>
|
<string name="unlit_icon">Not lit up</string>
|
||||||
<string name="all_service_champion">Platform naming</string>
|
<string name="all_service_champion">Platform title</string>
|
||||||
<string name="unlit_icon_hint">Not yet lit</string>
|
<string name="unlit_icon_hint">Not yet lit</string>
|
||||||
<string name="unlit_icon_hint2">The current event has not sent any gifts</string>
|
<string name="unlit_icon_hint2">The current event has not sent any gifts</string>
|
||||||
<string name="lit_icon_hint">No more gifts yet</string>
|
<string name="lit_icon_hint">No more gifts yet</string>
|
||||||
@ -1363,4 +1363,7 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="diamonds_every_time_requirement_of">Minimum requirement of 1000 diamonds</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="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_content_yet_hint">You have not set up the prank content yet</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>
|
||||||
|
<string name="choose_a_prank_gift_hint2">Input quantity</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -9,6 +9,11 @@ import android.widget.RadioButton;
|
|||||||
import android.widget.RadioGroup;
|
import android.widget.RadioGroup;
|
||||||
import android.widget.TextView;
|
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.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
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.bean.PrankGiftBean;
|
||||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
|
import com.yunbao.common.http.LiveHttpUtil;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
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;
|
||||||
import com.yunbao.live.adapter.LiveGiftPagerAdapter.ActionListener;
|
import com.yunbao.live.adapter.LiveGiftPagerAdapter.ActionListener;
|
||||||
import com.yunbao.live.bean.GiftTopBean;
|
import com.yunbao.live.bean.GiftTopBean;
|
||||||
import com.yunbao.common.http.LiveHttpUtil;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
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 {
|
public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListener, View.OnClickListener {
|
||||||
|
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
@ -217,7 +217,7 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene
|
|||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
JSONObject data = list.getJSONObject(i);
|
JSONObject data = list.getJSONObject(i);
|
||||||
GiftTopBean giftTopBean = new GiftTopBean();
|
GiftTopBean giftTopBean = new GiftTopBean();
|
||||||
giftTopBean.setName(data.getString("name"));
|
giftTopBean.setName(WordUtil.isNewZh()?data.getString("name"):data.getString("en_name"));
|
||||||
name.add(giftTopBean);
|
name.add(giftTopBean);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,17 +265,17 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene
|
|||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
int id = view.getId();
|
int id = view.getId();
|
||||||
if (id == R.id.btn_send) {
|
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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
try {
|
try {
|
||||||
prangNum = Integer.parseInt(content);
|
prangNum = Integer.parseInt(content);
|
||||||
if (prangNum <= 0) {
|
if (prangNum <= 0) {
|
||||||
ToastUtil.show("數量不能為0或負數");
|
ToastUtil.show(WordUtil.isNewZh() ?"數量不能為0或負數":"The quantity cannot be zero or negative");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (prangNum > 999) {
|
if (prangNum > 999) {
|
||||||
ToastUtil.show("數量不能大於999");
|
ToastUtil.show(WordUtil.isNewZh() ?"數量不能大於999":"The number cannot be greater than 999");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mBtnSend.setText(content);
|
mBtnSend.setText(content);
|
||||||
@ -285,12 +285,12 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene
|
|||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
ToastUtil.show("輸入錯誤");
|
ToastUtil.show(WordUtil.isNewZh() ? "輸入錯誤":"Input error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (id == R.id.btn_context) {
|
} 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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
prangContext = content;
|
prangContext = content;
|
||||||
@ -307,29 +307,29 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene
|
|||||||
});
|
});
|
||||||
} else if (id == R.id.gift_btn) {
|
} else if (id == R.id.gift_btn) {
|
||||||
if (bean == null) {
|
if (bean == null) {
|
||||||
ToastUtil.show("整蠱禮物不能為空");
|
ToastUtil.show(WordUtil.isNewZh() ? "整蠱禮物不能為空":"A trick gift can't be empty");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (StringUtil.isEmpty(prangContext) || prangNum == 0) {
|
if (StringUtil.isEmpty(prangContext) || prangNum == 0) {
|
||||||
ToastUtil.show("整蠱內容或數量不能為空");
|
ToastUtil.show(WordUtil.isNewZh() ?"整蠱內容或數量不能為空":"The content or number of pranks cannot be empty");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (prangNum >= 999) {
|
if (prangNum >= 999) {
|
||||||
ToastUtil.show("整蠱數量不能過大");
|
ToastUtil.show(WordUtil.isNewZh() ?"整蠱數量不能過大":"The number of pranks should not be too large");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (WordUtil.isSpecialChar(prangContext)) {
|
if (WordUtil.isSpecialChar(prangContext)) {
|
||||||
ToastUtil.show("整蠱內容不能包含特殊字符");
|
ToastUtil.show(WordUtil.isNewZh() ?"整蠱內容不能包含特殊字符":"The prank content must not contain special characters");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (prangContext.length() > 6) {
|
if (prangContext.length() > 6) {
|
||||||
ToastUtil.show("整蠱內容過長");
|
ToastUtil.show(WordUtil.isNewZh() ?"整蠱內容過長":"The prank is too long");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (giftBeans != null) {
|
if (giftBeans != null) {
|
||||||
for (PrankGiftBean giftBean : giftBeans) {
|
for (PrankGiftBean giftBean : giftBeans) {
|
||||||
if (giftBean.getGiftId().equals(bean.getId() + "")) {
|
if (giftBean.getGiftId().equals(bean.getId() + "")) {
|
||||||
ToastUtil.show("整蠱禮物已存在");
|
ToastUtil.show(WordUtil.isNewZh() ?"整蠱禮物已存在":"Prank gifts already exist");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,11 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
|
|||||||
mPrankRecyclerView.setAdapter(recyclerAdapter);
|
mPrankRecyclerView.setAdapter(recyclerAdapter);
|
||||||
mCoinTextView.setOnClickListener(this);
|
mCoinTextView.setOnClickListener(this);
|
||||||
mTurntableConfigImageView.setOnClickListener(this);
|
mTurntableConfigImageView.setOnClickListener(this);
|
||||||
|
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||||
|
mPrankBtn.setText("保存設置");
|
||||||
|
} else {
|
||||||
|
mPrankBtn.setText("Save Settings");
|
||||||
|
}
|
||||||
recyclerAdapter.setOnItemClickListener(new OnItemClickListener<String>() {
|
recyclerAdapter.setOnItemClickListener(new OnItemClickListener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(String bean, int position) {
|
public void onItemClick(String bean, int position) {
|
||||||
|
@ -103,7 +103,7 @@
|
|||||||
android:padding="2dp"
|
android:padding="2dp"
|
||||||
android:text="@string/lit_icon"
|
android:text="@string/lit_icon"
|
||||||
android:textColor="#3E68FF"
|
android:textColor="#3E68FF"
|
||||||
android:textSize="14sp"
|
android:textSize="13sp"
|
||||||
android:textStyle="italic|bold" />
|
android:textStyle="italic|bold" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
@ -129,7 +129,7 @@
|
|||||||
android:padding="2dp"
|
android:padding="2dp"
|
||||||
android:text="@string/unlit_icon"
|
android:text="@string/unlit_icon"
|
||||||
android:textColor="#3E68FF"
|
android:textColor="#3E68FF"
|
||||||
android:textSize="14sp"
|
android:textSize="13sp"
|
||||||
android:textStyle="italic" />
|
android:textStyle="italic" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
@ -154,7 +154,7 @@
|
|||||||
android:padding="2dp"
|
android:padding="2dp"
|
||||||
android:text="@string/all_service_champion"
|
android:text="@string/all_service_champion"
|
||||||
android:textColor="#3E68FF"
|
android:textColor="#3E68FF"
|
||||||
android:textSize="14sp"
|
android:textSize="13sp"
|
||||||
android:textStyle="italic" />
|
android:textStyle="italic" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:background="@drawable/bg_live_prank_turntable_save"
|
android:background="@drawable/bg_live_prank_turntable_save"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="保存設置"
|
|
||||||
android:textColor="#FFF"
|
android:textColor="#FFF"
|
||||||
android:textSize="10sp"
|
android:textSize="10sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="選擇整蠱禮物"
|
android:text="@string/choose_a_prank_gift"
|
||||||
android:textColor="#808080"
|
android:textColor="#808080"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
@ -142,7 +142,7 @@
|
|||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:background="@drawable/bg_prank_gift_item"
|
android:background="@drawable/bg_prank_gift_item"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="输入数量"
|
android:text="@string/choose_a_prank_gift_hint2"
|
||||||
android:textColor="#8C8C8C"
|
android:textColor="#8C8C8C"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
@ -159,7 +159,7 @@
|
|||||||
android:gravity="start|center"
|
android:gravity="start|center"
|
||||||
android:paddingStart="10dp"
|
android:paddingStart="10dp"
|
||||||
android:paddingEnd="10dp"
|
android:paddingEnd="10dp"
|
||||||
android:text="輸入整蠱內容..."
|
android:text="@string/choose_a_prank_gift_hint"
|
||||||
android:textColor="#8C8C8C"
|
android:textColor="#8C8C8C"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -82,6 +82,7 @@
|
|||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:layout_marginBottom="23dp"
|
android:layout_marginBottom="23dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:singleLine="true"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
@ -7,34 +7,44 @@
|
|||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:background="@drawable/background_151515">
|
android:background="@drawable/background_151515">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
<TextView
|
android:id="@+id/item_task_title_lay"
|
||||||
android:id="@+id/item_task_title"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="350dp"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginTop="11dp"
|
android:layout_marginTop="11dp"
|
||||||
android:ellipsize="end"
|
android:orientation="horizontal"
|
||||||
android:singleLine="true"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="14sp"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/item_task_complete"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:background="@drawable/background_6cbe53"
|
|
||||||
android:paddingStart="14dp"
|
|
||||||
android:paddingTop="4dp"
|
|
||||||
android:paddingEnd="14dp"
|
android:paddingEnd="14dp"
|
||||||
android:paddingBottom="4dp"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:textColor="#FFFFFF"
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
android:textSize="10sp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
<TextView
|
||||||
app:layout_constraintTop_toTopOf="@+id/item_task_title" />
|
android:id="@+id/item_task_title"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/item_task_complete"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:background="@drawable/background_6cbe53"
|
||||||
|
android:paddingStart="14dp"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
android:paddingEnd="4dp"
|
||||||
|
android:paddingBottom="4dp"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="10sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/item_task_title" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/item_task_layout"
|
android:id="@+id/item_task_layout"
|
||||||
@ -47,7 +57,7 @@
|
|||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/item_task_title">
|
app:layout_constraintTop_toBottomOf="@+id/item_task_title_lay">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/item_task_hot_img"
|
android:id="@+id/item_task_hot_img"
|
||||||
@ -71,7 +81,7 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintStart_toEndOf="@+id/item_task_layout"
|
app:layout_constraintStart_toEndOf="@+id/item_task_layout"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/item_task_title">
|
app:layout_constraintTop_toBottomOf="@+id/item_task_title_lay">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/item_task_xp_img"
|
android:id="@+id/item_task_xp_img"
|
||||||
|
@ -130,7 +130,9 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView"
|
android:id="@+id/textView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="100dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/random_pk_info_switch"
|
android:text="@string/random_pk_info_switch"
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/switch1_desc_text"
|
android:id="@+id/switch1_desc_text"
|
||||||
android:layout_width="330dp"
|
android:layout_width="300dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/switch2_title_text"
|
android:id="@+id/switch2_title_text"
|
||||||
android:layout_width="290dp"
|
android:layout_width="270dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
@ -110,7 +110,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="250dp"
|
android:layout_height="250dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="您目前還未設置整蠱內容"
|
android:text="@string/prank_content_yet_hint"
|
||||||
android:textColor="#BFBFBF"
|
android:textColor="#BFBFBF"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
Loading…
Reference in New Issue
Block a user