修改中英文

This commit is contained in:
18401019693 2023-10-12 16:19:27 +08:00
parent e081f1e058
commit c5d537fb4d
96 changed files with 319 additions and 286 deletions

View File

@ -129,7 +129,7 @@ public class CustomDrawerPopupAdapter extends RecyclerView.Adapter {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(mContext.getString(R.string.net_error));
} }
}); });
} }

View File

@ -13,6 +13,7 @@ import com.yunbao.common.bean.WishModel;
import com.yunbao.common.event.LiveNewWishListCloseEvent; import com.yunbao.common.event.LiveNewWishListCloseEvent;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.DayWishItemViewHolder; import com.yunbao.common.views.DayWishItemViewHolder;
import com.yunbao.common.views.LunarWishItemViewHolder; import com.yunbao.common.views.LunarWishItemViewHolder;
import com.yunbao.common.views.SeasonalWishItemViewHolder; import com.yunbao.common.views.SeasonalWishItemViewHolder;
@ -53,7 +54,7 @@ public class LiveNewWishAdapter extends RecyclerView.Adapter {
if (wishList.get(i)!=null){ if (wishList.get(i)!=null){
if (!TextUtils.isEmpty(wishList.get(i).getLid()) && !TextUtils.isEmpty(model.getLid()) if (!TextUtils.isEmpty(wishList.get(i).getLid()) && !TextUtils.isEmpty(model.getLid())
&& TextUtils.equals(wishList.get(i).getLid(), model.getLid())) { && TextUtils.equals(wishList.get(i).getLid(), model.getLid())) {
ToastUtil.show(R.string.too_many_gifts); ToastUtil.show(WordUtil.isNewZh()?"重複添加禮物":"Too many gifts");
isAdd = true; isAdd = true;
} }
} }

View File

@ -17,7 +17,6 @@ import androidx.recyclerview.widget.SimpleItemAnimator;
import com.scwang.smartrefresh.layout.SmartRefreshLayout; import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.scwang.smartrefresh.layout.api.RefreshLayout; import com.scwang.smartrefresh.layout.api.RefreshLayout;
import com.scwang.smartrefresh.layout.footer.ClassicsFooter; import com.scwang.smartrefresh.layout.footer.ClassicsFooter;
import com.scwang.smartrefresh.layout.header.ClassicsHeader;
import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener; import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener;
import com.scwang.smartrefresh.layout.listener.OnRefreshListener; import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
import com.yunbao.common.R; import com.yunbao.common.R;
@ -188,7 +187,7 @@ public class CommonRefreshView extends FrameLayout implements View.OnClickListen
if (mRecyclerView != null) { if (mRecyclerView != null) {
RecyclerView.Adapter adapter = mRecyclerView.getAdapter(); RecyclerView.Adapter adapter = mRecyclerView.getAdapter();
if (adapter != null && adapter.getItemCount() > 0) { if (adapter != null && adapter.getItemCount() > 0) {
ToastUtil.show(R.string.load_failure); ToastUtil.show(mContext.getString(R.string.load_failure));
} else { } else {
mLoadFailureView.setVisibility(View.VISIBLE); mLoadFailureView.setVisibility(View.VISIBLE);
} }
@ -196,7 +195,7 @@ public class CommonRefreshView extends FrameLayout implements View.OnClickListen
mLoadFailureView.setVisibility(View.VISIBLE); mLoadFailureView.setVisibility(View.VISIBLE);
} }
} else { } else {
ToastUtil.show(R.string.load_failure); ToastUtil.show(mContext.getString(R.string.load_failure));
} }
} }
if (mDataHelper != null) { if (mDataHelper != null) {

View File

@ -14,6 +14,7 @@ import com.yunbao.common.event.LiveNewRoleEvent;
import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode; import org.greenrobot.eventbus.ThreadMode;
@ -59,7 +60,7 @@ public class LiveNewRolePopup extends BottomPopupView {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
} }

View File

@ -155,7 +155,7 @@ public class LiveNewWishListFragment extends BaseFragment {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
} else if (wishList2.size() == 1) { } else if (wishList2.size() == 1) {
@ -175,7 +175,7 @@ public class LiveNewWishListFragment extends BaseFragment {
public void onCancel() { public void onCancel() {
if (wishList2.size() > 10) { if (wishList2.size() > 10) {
ToastUtil.show(R.string.must_hint); ToastUtil.show(getActivity().getString(R.string.must_hint));
return; return;
} }
LiveNetManager.get(getContext()). LiveNetManager.get(getContext()).
@ -187,14 +187,14 @@ public class LiveNewWishListFragment extends BaseFragment {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
} }
})).show(); })).show();
} else { } else {
if (wishList2.size() > 10) { if (wishList2.size() > 10) {
ToastUtil.show(R.string.must_hint); ToastUtil.show(getContext().getString(R.string.must_hint));
return; return;
} }
LiveNetManager.get(getContext()). LiveNetManager.get(getContext()).
@ -206,7 +206,7 @@ public class LiveNewWishListFragment extends BaseFragment {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });

View File

@ -81,20 +81,20 @@ public class ProcessFragment extends Fragment {
switch (permission) { switch (permission) {
case Manifest.permission.READ_EXTERNAL_STORAGE: case Manifest.permission.READ_EXTERNAL_STORAGE:
case Manifest.permission.WRITE_EXTERNAL_STORAGE: case Manifest.permission.WRITE_EXTERNAL_STORAGE:
ToastUtil.show(R.string.permission_storage_refused); ToastUtil.show(getActivity().getString(R.string.permission_storage_refused));
break; break;
case Manifest.permission.CAMERA: case Manifest.permission.CAMERA:
ToastUtil.show(R.string.permission_camera_refused); ToastUtil.show(getActivity().getString(R.string.permission_camera_refused));
break; break;
case Manifest.permission.RECORD_AUDIO: case Manifest.permission.RECORD_AUDIO:
ToastUtil.show(R.string.permission_record_audio_refused); ToastUtil.show(getActivity().getString(R.string.permission_record_audio_refused));
break; break;
case Manifest.permission.ACCESS_COARSE_LOCATION: case Manifest.permission.ACCESS_COARSE_LOCATION:
ToastUtil.show(R.string.permission_location_refused); ToastUtil.show(getActivity().getString(R.string.permission_location_refused));
CommonAppConfig.getInstance().clearLocationInfo(); CommonAppConfig.getInstance().clearLocationInfo();
break; break;
case Manifest.permission.READ_PHONE_STATE: case Manifest.permission.READ_PHONE_STATE:
ToastUtil.show(R.string.permission_read_phone_state_refused); ToastUtil.show(getActivity().getString(R.string.permission_read_phone_state_refused));
break; break;
} }
} }

View File

@ -8,10 +8,10 @@ import com.google.gson.Gson;
import com.lzy.okgo.callback.AbsCallback; import com.lzy.okgo.callback.AbsCallback;
import com.lzy.okgo.model.Response; import com.lzy.okgo.model.Response;
import com.lzy.okgo.request.base.Request; import com.lzy.okgo.request.base.Request;
import com.yunbao.common.R;
import com.yunbao.common.utils.L; import com.yunbao.common.utils.L;
import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import java.net.ConnectException; import java.net.ConnectException;
import java.net.SocketException; import java.net.SocketException;
@ -36,7 +36,7 @@ public abstract class HttpCallback extends AbsCallback<JsonBean> {
public void onSuccess(Response<JsonBean> response) { public void onSuccess(Response<JsonBean> response) {
JsonBean bean = response.body(); JsonBean bean = response.body();
String gson = new Gson().toJson(bean); String gson = new Gson().toJson(bean);
Log.e("onSuccess",gson); Log.e("onSuccess", gson);
if (bean != null) { if (bean != null) {
if (200 == bean.getRet()) { if (200 == bean.getRet()) {
Data data = bean.getData(); Data data = bean.getData();
@ -65,7 +65,7 @@ public abstract class HttpCallback extends AbsCallback<JsonBean> {
t.printStackTrace(); t.printStackTrace();
L.e("网络请求错误---->" + t.getClass() + " : " + t.getMessage()); L.e("网络请求错误---->" + t.getClass() + " : " + t.getMessage());
if (t instanceof SocketTimeoutException || t instanceof ConnectException || t instanceof UnknownHostException || t instanceof UnknownServiceException || t instanceof SocketException) { if (t instanceof SocketTimeoutException || t instanceof ConnectException || t instanceof UnknownHostException || t instanceof UnknownServiceException || t instanceof SocketException) {
ToastUtil.show(R.string.load_failure); ToastUtil.show(WordUtil.isNewZh() ? "網絡請求失敗" : "Network request failed");
} }
// if (showLoadingDialog() && mLoadingDialog != null) { // if (showLoadingDialog() && mLoadingDialog != null) {
// mLoadingDialog.dismiss(); // mLoadingDialog.dismiss();

View File

@ -10,6 +10,7 @@ import com.yunbao.common.bean.RankPkInfoBean;
import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -342,7 +343,7 @@ public class RandomPkManager {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
} }

View File

@ -1,11 +1,11 @@
package com.yunbao.common.pay; package com.yunbao.common.pay;
import android.app.Activity; import android.app.Activity;
import androidx.annotation.NonNull;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import androidx.annotation.NonNull;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.android.billingclient.api.Purchase; import com.android.billingclient.api.Purchase;
@ -18,13 +18,14 @@ import com.yunbao.common.bean.UserBean;
import com.yunbao.common.event.CoinChangeEvent; import com.yunbao.common.event.CoinChangeEvent;
import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.CommonHttpUtil;
import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.pay.ali.AliPayBuilder;
import com.yunbao.common.pay.wx.WxPayBuilder; import com.yunbao.common.pay.wx.WxPayBuilder;
import com.yunbao.common.utils.GoogleBillingUtil; import com.yunbao.common.utils.GoogleBillingUtil;
import com.yunbao.common.utils.OnGoogleBillingListener; import com.yunbao.common.utils.OnGoogleBillingListener;
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 org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
@ -48,16 +49,16 @@ public class PayPresenter {
private GoogleBillingUtil googleBillingUtil; private GoogleBillingUtil googleBillingUtil;
private String TAG="PayPresenter"; private String TAG = "PayPresenter";
private String [] arrPro = {"1"}; private String[] arrPro = {"1"};
private String mOrderid; private String mOrderid;
public PayPresenter(Activity activity) { public PayPresenter(Activity activity) {
mActivity = new WeakReference<>(activity).get(); mActivity = new WeakReference<>(activity).get();
} }
public void setPayCallback(PayCallback callback){ public void setPayCallback(PayCallback callback) {
mPayCallback=callback; mPayCallback = callback;
} }
public long getBalanceValue() { public long getBalanceValue() {
@ -96,9 +97,10 @@ public class PayPresenter {
public void setAliCallbackUrl(String aliCallbackUrl) { public void setAliCallbackUrl(String aliCallbackUrl) {
mAliCallbackUrl = aliCallbackUrl; mAliCallbackUrl = aliCallbackUrl;
} }
public void pay(String payType, String money, String goodsName, String orderParams) { public void pay(String payType, String money, String goodsName, String orderParams) {
if (TextUtils.isEmpty(payType)) { if (TextUtils.isEmpty(payType)) {
ToastUtil.show(R.string.wallet_tip_5); ToastUtil.show(mActivity.getString(R.string.wallet_tip_5));
return; return;
} }
//L.e("《==》支付按钮4--->" +payType); //L.e("《==》支付按钮4--->" +payType);
@ -128,40 +130,42 @@ public class PayPresenter {
case Constants.PAY_TYPE_GOOGLE://google支付 case Constants.PAY_TYPE_GOOGLE://google支付
googlePay(orderParams); googlePay(orderParams);
break; break;
default: default:
otherPay(orderParams,payType); otherPay(orderParams, payType);
break; break;
} }
} }
//谷歌支付 //谷歌支付
private void googlePay(String orderParams) { private void googlePay(String orderParams) {
mOrderid="1"; mOrderid = "1";
String pid="2"; String pid = "2";
if (pid != null && !pid.isEmpty()){ if (pid != null && !pid.isEmpty()) {
arrPro[0]=pid; arrPro[0] = pid;
initGooglePay(); initGooglePay();
} }
String newParm= StringUtil.contact("Charge.getGoogleOrder",orderParams,"&type=android", String newParm = StringUtil.contact("Charge.getGoogleOrder", orderParams, "&type=android",
"&appname=",mActivity.getString(R.string.app_name), "&appname=", mActivity.getString(R.string.app_name),
"&desc="+mActivity.getPackageName()+"&source=android" "&desc=" + mActivity.getPackageName() + "&source=android"
); );
CommonHttpUtil.getWxH5Order(newParm, new HttpCallback() { CommonHttpUtil.getWxH5Order(newParm, new HttpCallback() {
@Override @Override
public void onSuccess(int code, String msg, String[] info) { public void onSuccess(int code, String msg, String[] info) {
if(code==0){ if (code == 0) {
try { try {
ToastUtil.show("开始支付,请稍后"); ToastUtil.show("开始支付,请稍后");
org.json.JSONObject jsonObject=new org.json.JSONObject(info[0]); org.json.JSONObject jsonObject = new org.json.JSONObject(info[0]);
mOrderid=jsonObject.getString("orderid"); mOrderid = jsonObject.getString("orderid");
String pid=jsonObject.getString("pid"); String pid = jsonObject.getString("pid");
if (pid != null && !pid.isEmpty()){ if (pid != null && !pid.isEmpty()) {
arrPro[0]=pid; arrPro[0] = pid;
initGooglePay(); initGooglePay();
} }
}catch (Exception e){ e.printStackTrace(); } } catch (Exception e) {
}else { e.printStackTrace();
}
} else {
ToastUtil.show("无法支付,请联系客服"); ToastUtil.show("无法支付,请联系客服");
} }
@ -171,7 +175,7 @@ public class PayPresenter {
private void initGooglePay() { private void initGooglePay() {
GoogleBillingUtil.isDebug(true); GoogleBillingUtil.isDebug(true);
GoogleBillingUtil.setSkus(arrPro,null); GoogleBillingUtil.setSkus(arrPro, null);
GoogleBillingUtil.setIsAutoAcknowledgePurchase(true);//设置自动确认购买 GoogleBillingUtil.setIsAutoAcknowledgePurchase(true);//设置自动确认购买
googleBillingUtil = GoogleBillingUtil.getInstance() googleBillingUtil = GoogleBillingUtil.getInstance()
.addOnGoogleBillingListener(mActivity, mOnMyGoogleBillingListener) .addOnGoogleBillingListener(mActivity, mOnMyGoogleBillingListener)
@ -179,35 +183,35 @@ public class PayPresenter {
} }
private void paypalPay(String orderParams) { private void paypalPay(String orderParams) {
String url1="/index.php?m=App&a=paypal" +orderParams +"&source=android"; String url1 = "/index.php?m=App&a=paypal" + orderParams + "&source=android";
String url2= CommonAppConfig.HOST+url1; String url2 = CommonAppConfig.HOST + url1;
open(url2); open(url2);
} }
private void payssionPay(String orderParams) { private void payssionPay(String orderParams) {
String url1="/index.php?m=App&a=pay" +orderParams +"&source=android"; String url1 = "/index.php?m=App&a=pay" + orderParams + "&source=android";
String url2= CommonAppConfig.HOST+url1; String url2 = CommonAppConfig.HOST + url1;
open(url2); open(url2);
} }
private void yunquPay(String orderParams) { private void yunquPay(String orderParams) {
String newParm= StringUtil.contact("Charge.getYunquOrder",orderParams,"&type=android", String newParm = StringUtil.contact("Charge.getYunquOrder", orderParams, "&type=android",
"&appname=",mActivity.getString(R.string.app_name), "&appname=", mActivity.getString(R.string.app_name),
"&desc="+mActivity.getPackageName()+"&source=android" "&desc=" + mActivity.getPackageName() + "&source=android"
); );
//L.e("《==》支付URL--->" +newParm); //L.e("《==》支付URL--->" +newParm);
CommonHttpUtil.getWxH5Order(newParm, new HttpCallback() { CommonHttpUtil.getWxH5Order(newParm, new HttpCallback() {
@Override @Override
public void onSuccess(int code, String msg, String[] info) { public void onSuccess(int code, String msg, String[] info) {
if(code==0){ if (code == 0) {
try { try {
org.json.JSONObject jsonObject=new org.json.JSONObject(info[0]); org.json.JSONObject jsonObject = new org.json.JSONObject(info[0]);
String payment_url=jsonObject.getString("payment_url"); String payment_url = jsonObject.getString("payment_url");
open(payment_url); open(payment_url);
// L.e("《==》支付URL--->" +payment_url); // L.e("《==》支付URL--->" +payment_url);
}catch (Exception e){ } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
@ -216,20 +220,20 @@ public class PayPresenter {
} }
private void hfbPay(String orderParams) { private void hfbPay(String orderParams) {
String newParm= StringUtil.contact("Charge.getWxH5Order",orderParams,"&type=android", String newParm = StringUtil.contact("Charge.getWxH5Order", orderParams, "&type=android",
"&appname=",mActivity.getString(R.string.app_name), "&appname=", mActivity.getString(R.string.app_name),
"&desc="+mActivity.getPackageName() "&desc=" + mActivity.getPackageName()
); );
CommonHttpUtil.getCashierOrder(newParm, new HttpCallback() { CommonHttpUtil.getCashierOrder(newParm, new HttpCallback() {
@Override @Override
public void onSuccess(int code, String msg, String[] info) { public void onSuccess(int code, String msg, String[] info) {
if(code==0){ if (code == 0) {
try { try {
org.json.JSONObject jsonObject=new org.json.JSONObject(info[0]); org.json.JSONObject jsonObject = new org.json.JSONObject(info[0]);
String redirectUrl=jsonObject.getString("redirectUrl"); String redirectUrl = jsonObject.getString("redirectUrl");
open(redirectUrl); open(redirectUrl);
}catch (Exception e){ } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
@ -237,66 +241,68 @@ public class PayPresenter {
}); });
} }
public void open(String url){ public void open(String url) {
//支付时内部跳转 false要添加 //支付时内部跳转 false要添加
WebViewActivity.forward(mActivity,url,false,false); WebViewActivity.forward(mActivity, url, false, false);
} }
private void hwPay(String orderParams) { private void hwPay(String orderParams) {
String newParm= StringUtil.contact("Charge.getCashierOrder",orderParams,"&type=android", String newParm = StringUtil.contact("Charge.getCashierOrder", orderParams, "&type=android",
"&appname=",mActivity.getString(R.string.app_name), "&appname=", mActivity.getString(R.string.app_name),
"&desc="+mActivity.getPackageName()+"&source=android" "&desc=" + mActivity.getPackageName() + "&source=android"
); );
//L.e("《==》支付URL--->" +newParm); //L.e("《==》支付URL--->" +newParm);
CommonHttpUtil.getWxH5Order(newParm, new HttpCallback() { CommonHttpUtil.getWxH5Order(newParm, new HttpCallback() {
@Override @Override
public void onSuccess(int code, String msg, String[] info) { public void onSuccess(int code, String msg, String[] info) {
if(code==0){ if (code == 0) {
try { try {
org.json.JSONObject jsonObject=new org.json.JSONObject(info[0]); org.json.JSONObject jsonObject = new org.json.JSONObject(info[0]);
String payment_url=jsonObject.getString("payment_url"); String payment_url = jsonObject.getString("payment_url");
open(payment_url); open(payment_url);
// L.e("《==》支付URL--->" +payment_url); // L.e("《==》支付URL--->" +payment_url);
}catch (Exception e){ } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
} }
}); });
} }
private void otherPay(String orderParams,String payType) {
String newParm= StringUtil.contact("Charge.getOtherPayOrder",orderParams,"&type=android", private void otherPay(String orderParams, String payType) {
"&appname=",mActivity.getString(R.string.app_name), String newParm = StringUtil.contact("Charge.getOtherPayOrder", orderParams, "&type=android",
"&desc="+mActivity.getPackageName()+"&source=android&payType="+payType "&appname=", mActivity.getString(R.string.app_name),
"&desc=" + mActivity.getPackageName() + "&source=android&payType=" + payType
); );
CommonHttpUtil.getWxH5Order(newParm, new HttpCallback() { CommonHttpUtil.getWxH5Order(newParm, new HttpCallback() {
@Override @Override
public void onSuccess(int code, String msg, String[] info) { public void onSuccess(int code, String msg, String[] info) {
if(code==0){ if (code == 0) {
try { try {
org.json.JSONObject jsonObject=new org.json.JSONObject(info[0]); org.json.JSONObject jsonObject = new org.json.JSONObject(info[0]);
String payment_url=jsonObject.getString("payment_url"); String payment_url = jsonObject.getString("payment_url");
open(payment_url); open(payment_url);
// L.e("《==》支付URL--->" +payment_url); // L.e("《==》支付URL--->" +payment_url);
}catch (Exception e){ } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
} }
}); });
} }
/** /**
* 支付宝支付 * 支付宝支付
*/ */
private void aliPay(String money, String goodsName, String orderParams) { private void aliPay(String money, String goodsName, String orderParams) {
if (mActivity == null || TextUtils.isEmpty(mServiceNameAli)|| TextUtils.isEmpty(mAliCallbackUrl)) { if (mActivity == null || TextUtils.isEmpty(mServiceNameAli) || TextUtils.isEmpty(mAliCallbackUrl)) {
return; return;
} }
// if (!CommonAppConfig.isAppExist(Constants.PACKAGE_NAME_ALI)) { // if (!CommonAppConfig.isAppExist(Constants.PACKAGE_NAME_ALI)) {
// ToastUtil.show(R.string.coin_ali_not_install); // ToastUtil.show(mContext.getString(R.string.coin_ali_not_install);
// return; // return;
// } // }
if (TextUtils.isEmpty(mAliPartner) || TextUtils.isEmpty(mAliSellerId) || TextUtils.isEmpty(mAliPrivateKey)) { if (TextUtils.isEmpty(mAliPartner) || TextUtils.isEmpty(mAliSellerId) || TextUtils.isEmpty(mAliPrivateKey)) {
@ -321,7 +327,7 @@ public class PayPresenter {
return; return;
} }
if (!CommonAppConfig.isAppExist(Constants.PACKAGE_NAME_WX)) { if (!CommonAppConfig.isAppExist(Constants.PACKAGE_NAME_WX)) {
ToastUtil.show(R.string.coin_wx_not_install); ToastUtil.show(mActivity.getString(R.string.coin_wx_not_install));
return; return;
} }
if (TextUtils.isEmpty(mWxAppID)) { if (TextUtils.isEmpty(mWxAppID)) {
@ -351,12 +357,12 @@ public class PayPresenter {
long goldValue = Long.parseLong(goldCoin); long goldValue = Long.parseLong(goldCoin);
if (balanceValue > mBalanceValue) { if (balanceValue > mBalanceValue) {
mBalanceValue = balanceValue; mBalanceValue = balanceValue;
ToastUtil.show(R.string.coin_charge_success); ToastUtil.show(mActivity.getString(R.string.coin_charge_success));
UserBean u = CommonAppConfig.getInstance().getUserBean(); UserBean u = CommonAppConfig.getInstance().getUserBean();
if (u != null) { if (u != null) {
u.setCoin(coin); u.setCoin(coin);
} }
EventBus.getDefault().post(new CoinChangeEvent(coin,goldCoin, true)); EventBus.getDefault().post(new CoinChangeEvent(coin, goldCoin, true));
} }
} }
} }
@ -364,11 +370,11 @@ public class PayPresenter {
} }
private OnGoogleBillingListener mOnMyGoogleBillingListener=new OnGoogleBillingListener(){ private OnGoogleBillingListener mOnMyGoogleBillingListener = new OnGoogleBillingListener() {
@Override @Override
public void onSetupSuccess(boolean isSelf) { public void onSetupSuccess(boolean isSelf) {
super.onSetupSuccess(isSelf); super.onSetupSuccess(isSelf);
Log.d(TAG,"内购服务初始化完成"); Log.d(TAG, "内购服务初始化完成");
checkSubs(); checkSubs();
} }
@ -393,30 +399,30 @@ public class PayPresenter {
// } // }
// googleBillingUtil.purchaseInApp(mActivity,"zs640"); // googleBillingUtil.purchaseInApp(mActivity,"zs640");
googleBillingUtil.purchaseInApp(mActivity,googleBillingUtil.getInAppSkuByPosition(0)); googleBillingUtil.purchaseInApp(mActivity, googleBillingUtil.getInAppSkuByPosition(0));
// Log.d(TAG,tempBuffer.toString()); // Log.d(TAG,tempBuffer.toString());
} }
@Override @Override
public boolean onPurchaseSuccess(@NonNull Purchase purchase, boolean isSelf) { public boolean onPurchaseSuccess(@NonNull Purchase purchase, boolean isSelf) {
StringBuffer tempBuffer =new StringBuffer(); StringBuffer tempBuffer = new StringBuffer();
if(purchase.getPurchaseState()==Purchase.PurchaseState.PURCHASED){ if (purchase.getPurchaseState() == Purchase.PurchaseState.PURCHASED) {
tempBuffer.append("购买成功:"); tempBuffer.append("购买成功:");
//通知自己服务器 //通知自己服务器
if (mOrderid == null || purchase.getOrderId() == null){ if (mOrderid == null || purchase.getOrderId() == null) {
return false; return false;
} }
String allData=""; String allData = "";
allData="OrderId=" +purchase.getOrderId()+ allData = "OrderId=" + purchase.getOrderId() +
",PackageName="+purchase.getPackageName() + ",PackageName=" + purchase.getPackageName() +
",Sku=" +"purchase.getSku()"+ ",Sku=" + "purchase.getSku()" +
",PurchaseTime=" +purchase.getPurchaseTime()+ ",PurchaseTime=" + purchase.getPurchaseTime() +
",PurchaseToken=" +purchase.getPurchaseToken()+ ",PurchaseToken=" + purchase.getPurchaseToken() +
",DeveloperPayload=" +purchase.getDeveloperPayload()+ ",DeveloperPayload=" + purchase.getDeveloperPayload() +
",OriginalJson=" +purchase.getOriginalJson()+ ",OriginalJson=" + purchase.getOriginalJson() +
",PurchaseState=" +purchase.getPurchaseState()+ ",PurchaseState=" + purchase.getPurchaseState() +
",Signature="+purchase.getSignature(); ",Signature=" + purchase.getSignature();
// CommonHttpUtil.notifyGoogle("1",mOrderid,purchase.getOrderId(),allData, new HttpCallback() { // CommonHttpUtil.notifyGoogle("1",mOrderid,purchase.getOrderId(),allData, new HttpCallback() {
// @Override // @Override
// public void onSuccess(int code, String msg, String[] info) { // public void onSuccess(int code, String msg, String[] info) {
@ -433,22 +439,21 @@ public class PayPresenter {
// }); // });
}else{ } else {
tempBuffer.append("暂未支付:"); tempBuffer.append("暂未支付:");
} }
String details = String.format(Locale.getDefault(),"%s \n"," purchase.getSku()"); String details = String.format(Locale.getDefault(), "%s \n", " purchase.getSku()");
tempBuffer.append(details); tempBuffer.append(details);
Log.d(TAG,tempBuffer.toString()); Log.d(TAG, tempBuffer.toString());
return true ;//自动消耗(只有当isSelf为true,并且支付状态为PURCHASED时该值才会生效) return true;//自动消耗(只有当isSelf为true,并且支付状态为PURCHASED时该值才会生效)
} }
@Override @Override
public boolean onRecheck(@NonNull String skuType, @NonNull Purchase purchase, boolean isSelf) { public boolean onRecheck(@NonNull String skuType, @NonNull Purchase purchase, boolean isSelf) {
StringBuffer tempBuffer =new StringBuffer(); StringBuffer tempBuffer = new StringBuffer();
tempBuffer.append("检测到未处理的订单($skuType):${purchase.sku}()"); tempBuffer.append("检测到未处理的订单($skuType):${purchase.sku}()");
Log.d(TAG,tempBuffer.toString()); Log.d(TAG, tempBuffer.toString());
return true; return true;
} }
@ -459,43 +464,43 @@ public class PayPresenter {
@Override @Override
public void onConsumeSuccess(@NonNull String purchaseToken, boolean isSelf) { public void onConsumeSuccess(@NonNull String purchaseToken, boolean isSelf) {
Log.d(TAG,"消耗商品成功:$purchaseToken"); Log.d(TAG, "消耗商品成功:$purchaseToken");
} }
@Override @Override
public void onAcknowledgePurchaseSuccess(boolean isSelf) { public void onAcknowledgePurchaseSuccess(boolean isSelf) {
Log.d(TAG,"确认购买商品成功"); Log.d(TAG, "确认购买商品成功");
} }
@Override @Override
public void onFail(@NonNull GoogleBillingUtil.GoogleBillingListenerTag tag, int responseCode, boolean isSelf) { public void onFail(@NonNull GoogleBillingUtil.GoogleBillingListenerTag tag, int responseCode, boolean isSelf) {
Log.d(TAG,"操作失败:tag=${" + tag.name() + "responseCode=" + responseCode); Log.d(TAG, "操作失败:tag=${" + tag.name() + "responseCode=" + responseCode);
} }
@Override @Override
public void onError(@NonNull GoogleBillingUtil.GoogleBillingListenerTag tag, boolean isSelf) { public void onError(@NonNull GoogleBillingUtil.GoogleBillingListenerTag tag, boolean isSelf) {
Log.d(TAG,"发生错误:tag="+tag.name()); Log.d(TAG, "发生错误:tag=" + tag.name());
} }
}; };
private void checkSubs() { private void checkSubs() {
int size = googleBillingUtil.getPurchasesSizeSubs(mActivity); int size = googleBillingUtil.getPurchasesSizeSubs(mActivity);
switch (size){ switch (size) {
case 0: case 0:
//不具备有效订阅 //不具备有效订阅
Log.d(TAG,"有效订阅数:0(无有效订阅)"); Log.d(TAG, "有效订阅数:0(无有效订阅)");
break; break;
case -1: case -1:
//查询失败 //查询失败
Log.d(TAG,"有效订阅数:-1(查询失败)"); Log.d(TAG, "有效订阅数:-1(查询失败)");
break; break;
default: default:
//具有有效订阅 //具有有效订阅
Log.d(TAG,"有效订阅数:$size(具备有效订阅)"); Log.d(TAG, "有效订阅数:$size(具备有效订阅)");
break; break;
} }
} }
@ -504,7 +509,7 @@ public class PayPresenter {
mActivity = null; mActivity = null;
mPayCallback = null; mPayCallback = null;
if (googleBillingUtil != null){ if (googleBillingUtil != null) {
googleBillingUtil.onDestroy(mActivity); googleBillingUtil.onDestroy(mActivity);
//退出程序的时候可以调用(实验性) //退出程序的时候可以调用(实验性)
GoogleBillingUtil.endConnection(); GoogleBillingUtil.endConnection();

View File

@ -80,12 +80,12 @@ public class WxPayBuilder {
// req.sign = sign; // req.sign = sign;
// IWXAPI wxApi = WxApiWrapper.getInstance().getWxApi(); // IWXAPI wxApi = WxApiWrapper.getInstance().getWxApi();
// if (wxApi == null) { // if (wxApi == null) {
// ToastUtil.show(R.string.coin_charge_failed); // ToastUtil.show(mContext.getString(R.string.coin_charge_failed);
// return; // return;
// } // }
// boolean result = wxApi.sendReq(req); // boolean result = wxApi.sendReq(req);
// if (!result) { // if (!result) {
// ToastUtil.show(R.string.coin_charge_failed); // ToastUtil.show(mContext.getString(R.string.coin_charge_failed);
// } // }
} }
} }

View File

@ -92,7 +92,7 @@ public class ProcessImageUtil extends ProcessResultUtil {
@Override @Override
public void onFailure() { public void onFailure() {
ToastUtil.show(R.string.img_camera_cancel); ToastUtil.show(mContext.getString(R.string.img_camera_cancel));
} }
}; };
mAlumbResultCallback = new ActivityResultCallback() { mAlumbResultCallback = new ActivityResultCallback() {
@ -103,7 +103,7 @@ public class ProcessImageUtil extends ProcessResultUtil {
@Override @Override
public void onFailure() { public void onFailure() {
ToastUtil.show(R.string.img_alumb_cancel); ToastUtil.show(mContext.getString(R.string.img_alumb_cancel));
} }
}; };
mCropResultCallback = new ActivityResultCallback() { mCropResultCallback = new ActivityResultCallback() {
@ -116,7 +116,7 @@ public class ProcessImageUtil extends ProcessResultUtil {
@Override @Override
public void onFailure() { public void onFailure() {
ToastUtil.show(R.string.img_crop_cancel); ToastUtil.show(mContext.getString(R.string.img_crop_cancel));
} }
}; };
} }

View File

@ -1,5 +1,6 @@
package com.yunbao.common.utils; package com.yunbao.common.utils;
import android.app.Activity;
import android.app.Dialog; import android.app.Dialog;
import android.content.Context; import android.content.Context;
import android.graphics.Color; import android.graphics.Color;
@ -43,7 +44,7 @@ public class ToastUtil {
public static void show(int res) { public static void show(int res) {
show(CommonAppContext.sInstance.getString(res)); show(WordUtil.getNewString(res));
} }
/** /**
@ -85,9 +86,10 @@ public class ToastUtil {
} }
public static void showDebug(int s){ public static void showDebug(int s){
if(BuildConfig.DEBUG){ if(BuildConfig.DEBUG){
show(s); show("开发模式:"+s);
} }
} }
public static void show(String s) { public static void show(String s) {
if (TextUtils.isEmpty(s)) { if (TextUtils.isEmpty(s)) {
return; return;

View File

@ -179,7 +179,7 @@ public class CustomDrawerPopupView extends DrawerPopupView {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(mContext.getString(R.string.net_error));
} }
}); });
} }

View File

@ -19,6 +19,7 @@ import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class DrawerTaskChildViewHolder extends RecyclerView.ViewHolder { public class DrawerTaskChildViewHolder extends RecyclerView.ViewHolder {
@ -110,7 +111,7 @@ public class DrawerTaskChildViewHolder extends RecyclerView.ViewHolder {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
} else { } else {

View File

@ -13,6 +13,7 @@ import com.yunbao.common.bean.ListInfoMessageModel;
import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.OnRecyclerViewScrollListener; import com.yunbao.common.views.weight.OnRecyclerViewScrollListener;
import java.util.List; import java.util.List;
@ -68,7 +69,7 @@ public class LiveAnchorMessageCustomPopup extends BottomPopupView {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show( R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });

View File

@ -116,9 +116,9 @@ public class LiveClarityCustomPopup extends BottomPopupView implements View.OnCl
ViewClicksAntiShake.clicksAntiShake(lineHd, () -> { ViewClicksAntiShake.clicksAntiShake(lineHd, () -> {
if (lineHd.getTag() != null) { if (lineHd.getTag() != null) {
if (isUser) {//用户端 if (isUser) {//用户端
ToastUtil.show(R.string.live_user_ban_hd); ToastUtil.show(getContext().getString(R.string.live_user_ban_hd));
} else {//主播端 } else {//主播端
ToastUtil.show(R.string.function_is_suspended); ToastUtil.show(getContext().getString(R.string.function_is_suspended));
} }
return; return;
} }
@ -151,9 +151,9 @@ public class LiveClarityCustomPopup extends BottomPopupView implements View.OnCl
ViewClicksAntiShake.clicksAntiShake(lineFhd, () -> { ViewClicksAntiShake.clicksAntiShake(lineFhd, () -> {
if (lineFhd.getTag() != null) { if (lineFhd.getTag() != null) {
if (isUser) {//用户端 if (isUser) {//用户端
ToastUtil.show(R.string.live_user_ban_fhd); ToastUtil.show(getContext().getString(R.string.live_user_ban_fhd));
} else {//主播端 } else {//主播端
ToastUtil.show(R.string.function_is_suspended); ToastUtil.show(getContext().getString(R.string.function_is_suspended));
} }
return; return;
} }

View File

@ -29,6 +29,7 @@ import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.common.views.weight.ViewClicksAntiShake;
import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.Subscribe;
@ -166,7 +167,7 @@ public class LiveNewWishGiftPopup extends BottomPopupView {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });

View File

@ -326,7 +326,7 @@ public class LiveNewWishListPopup extends BottomPopupView {
List<WishModel2> wishList2 = new ArrayList<>(); List<WishModel2> wishList2 = new ArrayList<>();
Gson gson = new Gson(); Gson gson = new Gson();
if (wishList2.size()>10){ if (wishList2.size()>10){
ToastUtil.show(R.string.must_hint); ToastUtil.show(mContext.getString(R.string.must_hint));
return; return;
} }
LiveNetManager.get(getContext()). LiveNetManager.get(getContext()).
@ -338,7 +338,7 @@ public class LiveNewWishListPopup extends BottomPopupView {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
})) }))

View File

@ -195,7 +195,7 @@ public class LiveOpenCustomPopup extends CenterPopupView {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });

View File

@ -24,6 +24,7 @@ import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode; import org.greenrobot.eventbus.ThreadMode;
@ -130,7 +131,7 @@ public class LiveRobotMessageCustomPopup extends BottomPopupView {
} }
}); });
} else { } else {
ToastUtil.show(R.string.robot_minimum_interval); ToastUtil.show(getContext().getString(R.string.robot_minimum_interval));
} }
@ -181,7 +182,7 @@ public class LiveRobotMessageCustomPopup extends BottomPopupView {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show( R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
} }

View File

@ -19,6 +19,7 @@ import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode; import org.greenrobot.eventbus.ThreadMode;
@ -125,7 +126,7 @@ public class LiveRobotSayHelloCustomPopup extends BottomPopupView {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show( R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
} }

View File

@ -22,6 +22,7 @@ import com.yunbao.common.bean.LiveAiRobotBean;
import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
public class LiveRobotSettingCustomPopup extends BottomPopupView implements View.OnClickListener { public class LiveRobotSettingCustomPopup extends BottomPopupView implements View.OnClickListener {
private static String TAG = "AI机器人"; private static String TAG = "AI机器人";
@ -251,7 +252,7 @@ public class LiveRobotSettingCustomPopup extends BottomPopupView implements View
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show( R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });

View File

@ -16,6 +16,7 @@ import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
public class RobotMessageViewHolder extends RecyclerView.ViewHolder { public class RobotMessageViewHolder extends RecyclerView.ViewHolder {
@ -44,7 +45,7 @@ public class RobotMessageViewHolder extends RecyclerView.ViewHolder {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show( R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
} }

View File

@ -16,6 +16,7 @@ import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
public class RobotSayHelloViewHoler extends RecyclerView.ViewHolder { public class RobotSayHelloViewHoler extends RecyclerView.ViewHolder {
private TextView serialNumber, messageText; private TextView serialNumber, messageText;
@ -44,7 +45,7 @@ public class RobotSayHelloViewHoler extends RecyclerView.ViewHolder {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show( R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
} }

View File

@ -191,7 +191,7 @@
<string name="live_wrap">Pack</string> <string name="live_wrap">Pack</string>
<string name="guard_list">Guardian list</string> <string name="guard_list">Guardian list</string>
<string name="guard_buy_msg">Guard the anchor</string> <string name="guard_buy_msg">Guard the anchor</string>
<string name="home_page">homepage</string> <string name="home_page">Homepage</string>
<string name="home_page_share_1">"%1$s" is also in%2$s, ~ Click to view TA\'s story</string> <string name="home_page_share_1">"%1$s" is also in%2$s, ~ Click to view TA\'s story</string>
<string name="home_page_share_2">TA has%1$s fans. Come and watch!</string> <string name="home_page_share_2">TA has%1$s fans. Come and watch!</string>
<string name="im_live_anchor_msg">Hi ~ I\'m the anchor. Come and talk to me.</string> <string name="im_live_anchor_msg">Hi ~ I\'m the anchor. Come and talk to me.</string>

View File

@ -191,7 +191,7 @@
<string name="live_wrap">Pack</string> <string name="live_wrap">Pack</string>
<string name="guard_list">Guardian list</string> <string name="guard_list">Guardian list</string>
<string name="guard_buy_msg">Guard the anchor</string> <string name="guard_buy_msg">Guard the anchor</string>
<string name="home_page">homepage</string> <string name="home_page">Homepage</string>
<string name="home_page_share_1">"%1$s" is also in%2$s, ~ Click to view TA\'s story</string> <string name="home_page_share_1">"%1$s" is also in%2$s, ~ Click to view TA\'s story</string>
<string name="home_page_share_2">TA has%1$s fans. Come and watch!</string> <string name="home_page_share_2">TA has%1$s fans. Come and watch!</string>
<string name="im_live_anchor_msg">Hi ~ I\'m the anchor. Come and talk to me.</string> <string name="im_live_anchor_msg">Hi ~ I\'m the anchor. Come and talk to me.</string>

View File

@ -1331,7 +1331,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
@Override @Override
public void onError(String error) { public void onError(String error) {
Log.e("LiveUserMoreDialog", error); Log.e("LiveUserMoreDialog", error);
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
} else { } else {

View File

@ -159,7 +159,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
@Override @Override
public void onPushFailed() { public void onPushFailed() {
//推流失败回调 //推流失败回调
ToastUtil.show(R.string.live_push_failed); ToastUtil.show(mContext.getString(R.string.live_push_failed));
} }
}); });
mLivePushViewHolder.addToParent(); mLivePushViewHolder.addToParent();
@ -370,7 +370,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
*/ */
private void openMusicWindow() { private void openMusicWindow() {
if (isLinkMicAnchor() || isLinkMicAnchor()) { if (isLinkMicAnchor() || isLinkMicAnchor()) {
ToastUtil.show(R.string.link_mic_not_bgm); ToastUtil.show(mContext.getString(R.string.link_mic_not_bgm));
return; return;
} }
LiveMusicDialogFragment fragment = new LiveMusicDialogFragment(); LiveMusicDialogFragment fragment = new LiveMusicDialogFragment();
@ -442,7 +442,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
*/ */
private void openGameWindow() { private void openGameWindow() {
if (isLinkMic() || isLinkMicAnchor()) { if (isLinkMic() || isLinkMicAnchor()) {
ToastUtil.show(R.string.live_link_mic_cannot_game); ToastUtil.show(mContext.getString(R.string.live_link_mic_cannot_game));
return; return;
} }
} }

View File

@ -739,7 +739,7 @@ public class LiveAudienceActivity extends LiveActivity {
public void onLiveRoomChangeEvent(LiveRoomChangeEvent e) { public void onLiveRoomChangeEvent(LiveRoomChangeEvent e) {
LiveBean liveBean = e.getLiveBean(); LiveBean liveBean = e.getLiveBean();
if (TextUtils.equals(mLiveUid, liveBean.getUid())) { if (TextUtils.equals(mLiveUid, liveBean.getUid())) {
ToastUtil.show(R.string.current_live_room); ToastUtil.show(mContext.getString(R.string.current_live_room));
} else { } else {
if (e.isLiveEnd()) { if (e.isLiveEnd()) {
manager.removeLiveEnd(); manager.removeLiveEnd();
@ -1594,7 +1594,7 @@ public class LiveAudienceActivity extends LiveActivity {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });

View File

@ -104,7 +104,7 @@ public class LiveReportActivity extends AbsActivity implements LiveReportAdapter
// return; // return;
// } // }
// if (bean == null) { // if (bean == null) {
// ToastUtil.show(R.string.video_report_tip_3); // ToastUtil.show(mContext.getString(R.string.video_report_tip_3);
// return; // return;
// } // }
// String content = bean.getName(); // String content = bean.getName();
@ -120,7 +120,7 @@ public class LiveReportActivity extends AbsActivity implements LiveReportAdapter
mToUid = ""; mToUid = "";
} }
if (bean == null) { if (bean == null) {
ToastUtil.show(R.string.video_report_tip_3); ToastUtil.show(mContext.getString(R.string.video_report_tip_3));
return; return;
} }
String content = ""; String content = "";
@ -137,7 +137,7 @@ public class LiveReportActivity extends AbsActivity implements LiveReportAdapter
@Override @Override
public void onSuccess(int code, String msg, String[] info) { public void onSuccess(int code, String msg, String[] info) {
if (code == 0) { if (code == 0) {
ToastUtil.show(R.string.video_report_tip_4); ToastUtil.show(mContext.getString(R.string.video_report_tip_4));
onBackPressed(); onBackPressed();
} else { } else {
ToastUtil.show(msg); ToastUtil.show(msg);
@ -149,7 +149,7 @@ public class LiveReportActivity extends AbsActivity implements LiveReportAdapter
@Override @Override
public void onSuccess(int code, String msg, String[] info) { public void onSuccess(int code, String msg, String[] info) {
if (code == 0) { if (code == 0) {
ToastUtil.show(R.string.video_report_tip_4); ToastUtil.show(mContext.getString(R.string.video_report_tip_4));
onBackPressed(); onBackPressed();
} else { } else {
ToastUtil.show(msg); ToastUtil.show(msg);

View File

@ -288,7 +288,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
@Override @Override
public void onPushFailed() { public void onPushFailed() {
//推流失败回调 //推流失败回调
ToastUtil.show(R.string.live_push_failed); ToastUtil.show(mContext.getString(R.string.live_push_failed));
} }
}); });
@ -638,7 +638,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
*/ */
private void openMusicWindow() { private void openMusicWindow() {
if (isLinkMicAnchor() || isLinkMicAnchor()) { if (isLinkMicAnchor() || isLinkMicAnchor()) {
ToastUtil.show(R.string.link_mic_not_bgm); ToastUtil.show(mContext.getString(R.string.link_mic_not_bgm));
return; return;
} }
LiveMusicDialogFragment fragment = new LiveMusicDialogFragment(); LiveMusicDialogFragment fragment = new LiveMusicDialogFragment();
@ -736,7 +736,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
*/ */
private void openGameWindow() { private void openGameWindow() {
if (isLinkMic() || isLinkMicAnchor()) { if (isLinkMic() || isLinkMicAnchor()) {
ToastUtil.show(R.string.live_link_mic_cannot_game); ToastUtil.show(mContext.getString(R.string.live_link_mic_cannot_game));
return; return;
} }
} }
@ -1773,7 +1773,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
} }

View File

@ -344,7 +344,7 @@ public class LiveTRTCAnchorActivity extends TRTCBaseActivity {
@Override @Override
public void onConfirmClick(Dialog dialog, String content) { public void onConfirmClick(Dialog dialog, String content) {
if (TextUtils.isEmpty(content)) { if (TextUtils.isEmpty(content)) {
ToastUtil.show(R.string.live_set_pwd_empty); ToastUtil.show(getString(R.string.live_set_pwd_empty));
} else { } else {
mLiveType = bean.getId(); mLiveType = bean.getId();
mLiveTypeTextView.setText(bean.getName()); mLiveTypeTextView.setText(bean.getName());

View File

@ -118,11 +118,11 @@ public class FreePkRecyclerAdapter extends RefreshAdapter<RandomPkUserBean> {
mPkStatus.setOnClickListener(v -> { mPkStatus.setOnClickListener(v -> {
RandomPkUserBean bean = (RandomPkUserBean) itemView.getTag(); RandomPkUserBean bean = (RandomPkUserBean) itemView.getTag();
if (bean.isPk()) { if (bean.isPk()) {
ToastUtil.show(R.string.free_pk_user_pking); ToastUtil.show(mContext.getString(R.string.free_pk_user_pking));
return; return;
} }
if (freePkNum == 0 && mDrPkNum == -1) { if (freePkNum == 0 && mDrPkNum == -1) {
ToastUtil.show(R.string.free_pk_num_null); ToastUtil.show(mContext.getString(R.string.free_pk_num_null));
// return; // return;
} }
@ -172,10 +172,10 @@ public class FreePkRecyclerAdapter extends RefreshAdapter<RandomPkUserBean> {
public void onSuccess(SetAttentsModel data) { public void onSuccess(SetAttentsModel data) {
bean.setAttention(data.getIsattent()); bean.setAttention(data.getIsattent());
if ("1".equals(data.getIsattent())) { if ("1".equals(data.getIsattent())) {
ToastUtil.show(R.string.following); ToastUtil.show(mContext.getString(R.string.following));
mOnItemClickListener.onItemClick(bean, 1); mOnItemClickListener.onItemClick(bean, 1);
} else { } else {
ToastUtil.show(R.string.unfollow_cancel); ToastUtil.show(mContext.getString(R.string.unfollow_cancel));
mOnItemClickListener.onItemClick(bean, 0); mOnItemClickListener.onItemClick(bean, 0);
} }
@ -183,7 +183,7 @@ public class FreePkRecyclerAdapter extends RefreshAdapter<RandomPkUserBean> {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
}); });

View File

@ -174,7 +174,7 @@ public class LiveNewWishListAdapter extends RecyclerView.Adapter<LiveNewWishList
@Override @Override
public void onConfirmClick(Dialog dialog, String content) { public void onConfirmClick(Dialog dialog, String content) {
if (TextUtils.isEmpty(content)) { if (TextUtils.isEmpty(content)) {
ToastUtil.show(R.string.live_set_wishlist_num); ToastUtil.show(mContext.getString(R.string.live_set_wishlist_num));
} else { } else {
int num; int num;
if (StringUtil.isInt(content)) { if (StringUtil.isInt(content)) {

View File

@ -173,7 +173,7 @@ public class LiveWishListAdapter extends RecyclerView.Adapter<LiveWishListAdapte
@Override @Override
public void onConfirmClick(Dialog dialog, String content) { public void onConfirmClick(Dialog dialog, String content) {
if (TextUtils.isEmpty(content)) { if (TextUtils.isEmpty(content)) {
ToastUtil.show(R.string.live_set_wishlist_num); ToastUtil.show(mContext.getString(R.string.live_set_wishlist_num));
} else { } else {
int num; int num;
if (StringUtil.isInt(content)) { if (StringUtil.isInt(content)) {

View File

@ -140,7 +140,7 @@ public class UserMoreInfoAdapter extends RefreshAdapter<UserBean> {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (bean.isHide() && (type.equals("5") || type.equals("4"))) { if (bean.isHide() && (type.equals("5") || type.equals("4"))) {
ToastUtil.show(R.string.can_not_go); ToastUtil.show(mContext.getString(R.string.can_not_go));
} else { } else {
((LiveActivity) mContext).showUserDialog(bean.getId()); ((LiveActivity) mContext).showUserDialog(bean.getId());
fragments.dismiss(); fragments.dismiss();

View File

@ -179,7 +179,7 @@ public class FreePkDialogFragment extends AbsDialogFragment implements View.OnCl
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(com.yunbao.common.R.string.net_error); ToastUtil.show(mContext.getString(com.yunbao.common.R.string.net_error));
} }
}); });
} }

View File

@ -119,11 +119,11 @@ public class LiveAnchorEditCallMeDialog extends AbsDialogPopupWindow {
status.setTag(0); status.setTag(0);
status.setOnClickListener(v -> { status.setOnClickListener(v -> {
if (callMeModel.getGiftId() == 0) { if (callMeModel.getGiftId() == 0) {
ToastUtil.show(R.string.live_anchor_edit_call_me_not_gift_toash); ToastUtil.show(mContext.getString(R.string.live_anchor_edit_call_me_not_gift_toash));
return; return;
} }
if (callMeModel.getWechat().getIsShow() == 0 && callMeModel.getLine().getIsShow() == 0 && callMeModel.getWhatsApp().getIsShow() == 0) { if (callMeModel.getWechat().getIsShow() == 0 && callMeModel.getLine().getIsShow() == 0 && callMeModel.getWhatsApp().getIsShow() == 0) {
ToastUtil.show(R.string.live_anchor_edit_call_me_not_call_info_toash); ToastUtil.show(mContext.getString(R.string.live_anchor_edit_call_me_not_call_info_toash));
return; return;
} }
int tag = (int) v.getTag(); int tag = (int) v.getTag();

View File

@ -89,7 +89,7 @@ public class LiveDataInfoDialog extends AbsDialogPopupWindow {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(com.yunbao.common.R.string.net_error); ToastUtil.show(mContext.getString(com.yunbao.common.R.string.net_error));
} }
}); });

View File

@ -137,7 +137,7 @@ public class LiveFansFragment extends AbsDialogFragment {
} else if (TextUtils.equals(event.getMethod(), "sendFansCard")) { } else if (TextUtils.equals(event.getMethod(), "sendFansCard")) {
if (LiveRoomViewHolder.mBtnFollow != null && LiveRoomViewHolder.mBtnFollow.getVisibility() == View.VISIBLE) { if (LiveRoomViewHolder.mBtnFollow != null && LiveRoomViewHolder.mBtnFollow.getVisibility() == View.VISIBLE) {
LiveRoomViewHolder.follow(); LiveRoomViewHolder.follow();
ToastUtil.show(R.string.live_fans_follow_toast); ToastUtil.show(mContext.getString(R.string.live_fans_follow_toast));
} }
//点击 开通粉丝勋章,打开礼物列表送礼物 //点击 开通粉丝勋章,打开礼物列表送礼物
((LiveAudienceActivity) mContext).openGiftWindow(event.getLiveId(), "0"); ((LiveAudienceActivity) mContext).openGiftWindow(event.getLiveId(), "0");

View File

@ -206,7 +206,7 @@ public class LiveGameDialogFragment extends AbsDialogFragment {
@Override @Override
public void onError(String error) { public void onError(String error) {
Log.i("debug", "onError: " + error); Log.i("debug", "onError: " + error);
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
dismiss(); dismiss();
} }
}); });
@ -401,7 +401,7 @@ public class LiveGameDialogFragment extends AbsDialogFragment {
return; return;
} }
if (TextUtils.equals(roomId, event.getLiveId())) { if (TextUtils.equals(roomId, event.getLiveId())) {
ToastUtil.show(R.string.current_live_room); ToastUtil.show(mContext.getString(R.string.current_live_room));
dismiss(); dismiss();
} else { } else {
//看直播 //看直播

View File

@ -913,7 +913,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
} }
}); });
} else { } else {
ToastUtil.show(R.string.only_one); ToastUtil.show(mContext.getString(R.string.only_one));
} }
} else { } else {
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream) || mLiveGiftBean == null) { if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream) || mLiveGiftBean == null) {
@ -921,7 +921,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
} }
if (mLiveGuardInfo != null) { if (mLiveGuardInfo != null) {
if (mLiveGiftBean.getMark() == LiveGiftBean2.MARK_GUARD && mLiveGuardInfo.getMyGuardType() != Constants.GUARD_TYPE_YEAR) { if (mLiveGiftBean.getMark() == LiveGiftBean2.MARK_GUARD && mLiveGuardInfo.getMyGuardType() != Constants.GUARD_TYPE_YEAR) {
ToastUtil.show(R.string.guard_gift_tip); ToastUtil.show(mContext.getString(R.string.guard_gift_tip));
return; return;
} }
} }

View File

@ -384,7 +384,7 @@ public class LiveGiftDialogFragment4Wishlist extends AbsDialogFragment implement
// } // }
// if (mLiveGuardInfo != null) { // if (mLiveGuardInfo != null) {
// if (mLiveGiftBean.getMark() == LiveGiftBean.MARK_GUARD && mLiveGuardInfo.getMyGuardType() != Constants.GUARD_TYPE_YEAR) { // if (mLiveGiftBean.getMark() == LiveGiftBean.MARK_GUARD && mLiveGuardInfo.getMyGuardType() != Constants.GUARD_TYPE_YEAR) {
// ToastUtil.show(R.string.guard_gift_tip); // ToastUtil.show(mContext.getString(R.string.guard_gift_tip);
// return; // return;
// } // }
// } // }

View File

@ -715,7 +715,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
} }
}); });
} else { } else {
ToastUtil.show(com.yunbao.live.R.string.only_one); ToastUtil.show(mContext.getString(com.yunbao.live.R.string.only_one));
} }
} else { } else {
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream) || liveGiftModel == null) { if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream) || liveGiftModel == null) {
@ -723,7 +723,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
} }
if (mLiveGuardInfo != null) { if (mLiveGuardInfo != null) {
if (liveGiftModel.getMark() == LiveGiftBean2.MARK_GUARD && mLiveGuardInfo.getMyGuardType() != Constants.GUARD_TYPE_YEAR) { if (liveGiftModel.getMark() == LiveGiftBean2.MARK_GUARD && mLiveGuardInfo.getMyGuardType() != Constants.GUARD_TYPE_YEAR) {
ToastUtil.show(com.yunbao.live.R.string.guard_gift_tip); ToastUtil.show(mContext.getString(com.yunbao.live.R.string.guard_gift_tip));
return; return;
} }
} }

View File

@ -350,7 +350,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
return; return;
} }
if (TextUtils.equals(roomId, event.getLiveId())) { if (TextUtils.equals(roomId, event.getLiveId())) {
ToastUtil.show(R.string.current_live_room); ToastUtil.show(mContext.getString(R.string.current_live_room));
dismiss(); dismiss();
} else { } else {
//看直播 //看直播

View File

@ -40,6 +40,7 @@ import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.AtTextWatcher; import com.yunbao.common.views.weight.AtTextWatcher;
import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.R; import com.yunbao.live.R;
@ -222,7 +223,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
private void sendMessage() { private void sendMessage() {
String content = mInput.getText().toString().trim(); String content = mInput.getText().toString().trim();
if (TextUtils.isEmpty(content)) { if (TextUtils.isEmpty(content)) {
ToastUtil.show(R.string.cannot_be_empty); ToastUtil.show(mContext.getString(R.string.cannot_be_empty));
return; return;
} }
switch (messageType) { switch (messageType) {
@ -244,7 +245,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
} }
}); });
} else { } else {
ToastUtil.show(R.string.enough_speakers); ToastUtil.show(mContext.getString(R.string.enough_speakers));
// dismiss(); // dismiss();
} }
@ -384,7 +385,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
} }

View File

@ -302,7 +302,7 @@ public class LiveLinkMicListDialogFragment extends AbsDialogFragment implements
private void searchOnLineAnchor() { private void searchOnLineAnchor() {
String key = mEditText.getText().toString().trim(); String key = mEditText.getText().toString().trim();
if (TextUtils.isEmpty(key)) { if (TextUtils.isEmpty(key)) {
ToastUtil.show(R.string.content_empty); ToastUtil.show(mContext.getString(R.string.content_empty));
return; return;
} }
LiveHttpUtil.cancel(LiveHttpConsts.LIVE_PK_SEARCH_ANCHOR); LiveHttpUtil.cancel(LiveHttpConsts.LIVE_PK_SEARCH_ANCHOR);

View File

@ -26,6 +26,7 @@ import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.DpUtil;
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.live.R; import com.yunbao.live.R;
import com.yunbao.live.adapter.LivePrankRecyclerAdapter; import com.yunbao.live.adapter.LivePrankRecyclerAdapter;
@ -288,7 +289,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
} }

View File

@ -223,11 +223,11 @@ public class LiveRedPackSendDialogFragment extends AbsDialogFragment implements
count = mEditCountPj.getText().toString().trim(); count = mEditCountPj.getText().toString().trim();
} }
if (TextUtils.isEmpty(coin)) { if (TextUtils.isEmpty(coin)) {
ToastUtil.show(R.string.red_pack_7); ToastUtil.show(mContext.getString(R.string.red_pack_7));
return; return;
} }
if (TextUtils.isEmpty(count)) { if (TextUtils.isEmpty(count)) {
ToastUtil.show(R.string.red_pack_8); ToastUtil.show(mContext.getString(R.string.red_pack_8));
return; return;
} }
String title = mEditTitle.getText().toString().trim(); String title = mEditTitle.getText().toString().trim();

View File

@ -174,7 +174,7 @@ public class LiveTaskDialog extends AbsDialogPopupWindow {
if (loadDialog != null) { if (loadDialog != null) {
loadDialog.dismiss(); loadDialog.dismiss();
} }
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
} }

View File

@ -93,7 +93,7 @@ public class LiveTotalDialog extends AbsDialogFragment {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show( R.string.net_error); ToastUtil.show( mContext.getString(R.string.net_error));
} }
}); });
} else { } else {

View File

@ -197,7 +197,7 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
} }

View File

@ -154,7 +154,7 @@ public class ResultRendPacketPopup extends CenterPopupView {
} }
} else { } else {
ToastUtil.show(R.string.no_data); ToastUtil.show(getContext().getString(R.string.no_data));
} }
} }
}); });

View File

@ -255,7 +255,7 @@ public class LiveMusicDialogFragment extends AbsDialogFragment implements View.O
}); });
} }
} else { } else {
ToastUtil.show(R.string.music_url_empty); ToastUtil.show(mContext.getString(R.string.music_url_empty));
} }
} else { } else {
ToastUtil.show(msg); ToastUtil.show(msg);

View File

@ -128,7 +128,7 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
playUrl = mPlayUrl; playUrl = mPlayUrl;
} }
SocketLinkMicAnchorUtil.linkMicAnchorApply(mSocketClient, playUrl, stream, pkUid); SocketLinkMicAnchorUtil.linkMicAnchorApply(mSocketClient, playUrl, stream, pkUid);
ToastUtil.show(R.string.link_mic_apply); ToastUtil.show(mContext.getString(R.string.link_mic_apply));
} }
/** /**
@ -198,7 +198,7 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
} }
if (mAcceptLinkMic) { if (mAcceptLinkMic) {
if (((LiveActivity) mContext).isGamePlaying()) { if (((LiveActivity) mContext).isGamePlaying()) {
ToastUtil.show(R.string.live_game_cannot_link_mic); ToastUtil.show(mContext.getString(R.string.live_game_cannot_link_mic));
SocketLinkMicAnchorUtil.linkMicPlayGaming(mSocketClient, mApplyUid); SocketLinkMicAnchorUtil.linkMicPlayGaming(mSocketClient, mApplyUid);
} else { } else {
LiveHttpUtil.livePkCheckLive(mApplyUid, mApplyStream, mSelfStream, new HttpCallback() { LiveHttpUtil.livePkCheckLive(mApplyUid, mApplyStream, mSelfStream, new HttpCallback() {
@ -330,7 +330,7 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
mLiveLinkMicPlayViewHolder.addToParent(); mLiveLinkMicPlayViewHolder.addToParent();
mLiveLinkMicPlayViewHolder.play(playUrl); mLiveLinkMicPlayViewHolder.play(playUrl);
if (mIsAnchor) { if (mIsAnchor) {
ToastUtil.show(R.string.link_mic_anchor_accept_2); ToastUtil.show(mContext.getString(R.string.link_mic_anchor_accept_2));
((LiveAnchorActivity) mContext).setPkBtnVisible(true); ((LiveAnchorActivity) mContext).setPkBtnVisible(true);
if (mLiveSdk == Constants.LIVE_SDK_TX) { if (mLiveSdk == Constants.LIVE_SDK_TX) {
//主播混流 //主播混流
@ -376,7 +376,7 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
mApplyUid = null; mApplyUid = null;
mApplyStream = null; mApplyStream = null;
mPkUid = null; mPkUid = null;
ToastUtil.show(R.string.link_mic_anchor_close); ToastUtil.show(mContext.getString(R.string.link_mic_anchor_close));
if (mIsAnchor) { if (mIsAnchor) {
((LiveAnchorActivity) mContext).setPkBtnVisible(false); ((LiveAnchorActivity) mContext).setPkBtnVisible(false);
if (mLiveSdk == Constants.LIVE_SDK_TX) { if (mLiveSdk == Constants.LIVE_SDK_TX) {
@ -390,7 +390,7 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
*/ */
public void onLinkMicAnchorRefuse() { public void onLinkMicAnchorRefuse() {
mLastApplyLinkMicTime = 0; mLastApplyLinkMicTime = 0;
ToastUtil.show(R.string.link_mic_refuse_2); ToastUtil.show(mContext.getString(R.string.link_mic_refuse_2));
} }
/** /**
@ -398,7 +398,7 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
*/ */
public void onLinkMicNotResponse() { public void onLinkMicNotResponse() {
mLastApplyLinkMicTime = 0; mLastApplyLinkMicTime = 0;
ToastUtil.show(R.string.link_mic_anchor_not_response_2); ToastUtil.show(mContext.getString(R.string.link_mic_anchor_not_response_2));
} }
/** /**
@ -406,7 +406,7 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
*/ */
public void onLinkMicAnchorBusy() { public void onLinkMicAnchorBusy() {
mLastApplyLinkMicTime = 0; mLastApplyLinkMicTime = 0;
ToastUtil.show(R.string.link_mic_anchor_busy_2); ToastUtil.show(mContext.getString(R.string.link_mic_anchor_busy_2));
} }
public void pause() { public void pause() {
@ -442,15 +442,15 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
*/ */
public boolean canOpenLinkMicAnchor() { public boolean canOpenLinkMicAnchor() {
if (((LiveActivity) mContext).isGamePlaying()) { if (((LiveActivity) mContext).isGamePlaying()) {
ToastUtil.show(R.string.live_game_cannot_link_mic); ToastUtil.show(mContext.getString(R.string.live_game_cannot_link_mic));
return false; return false;
} }
if (mIsLinkMic || ((LiveActivity) mContext).isLinkMic()) { if (mIsLinkMic || ((LiveActivity) mContext).isLinkMic()) {
ToastUtil.show(mIsAnchor ? R.string.live_link_mic_cannot_link_2 : R.string.live_link_mic_cannot_link); ToastUtil.show(mIsAnchor ? mContext.getString(R.string.live_link_mic_cannot_link_2) : mContext.getString(R.string.live_link_mic_cannot_link));
return false; return false;
} }
if (System.currentTimeMillis() - mLastApplyLinkMicTime < 11000) { if (System.currentTimeMillis() - mLastApplyLinkMicTime < 11000) {
ToastUtil.show(R.string.link_mic_apply_waiting); ToastUtil.show(mContext.getString(R.string.link_mic_apply_waiting));
return false; return false;
} }
return true; return true;

View File

@ -320,16 +320,16 @@ public class LiveLinkMicPkPresenter implements View.OnClickListener {
*/ */
public void applyLinkMicPk(String pkUid, String stream) { public void applyLinkMicPk(String pkUid, String stream) {
if (mPkSend) { if (mPkSend) {
ToastUtil.show(R.string.link_mic_apply_waiting); ToastUtil.show(mContext.getString(R.string.link_mic_apply_waiting));
return; return;
} }
if (mIsPk) { if (mIsPk) {
ToastUtil.show(R.string.live_link_mic_cannot_pk); ToastUtil.show(mContext.getString(R.string.live_link_mic_cannot_pk));
return; return;
} }
mPkSend = true; mPkSend = true;
SocketLinkMicPkUtil.linkMicPkApply(mSocketClient, pkUid, stream); SocketLinkMicPkUtil.linkMicPkApply(mSocketClient, pkUid, stream);
ToastUtil.show(R.string.link_mic_apply_pk); ToastUtil.show(mContext.getString(R.string.link_mic_apply_pk));
if (mLiveLinkMicPkViewHolder == null) { if (mLiveLinkMicPkViewHolder == null) {
mLiveLinkMicPkViewHolder = new LiveLinkMicPkViewHolder(mContext, mPkContainer); mLiveLinkMicPkViewHolder = new LiveLinkMicPkViewHolder(mContext, mPkContainer);
@ -1119,7 +1119,7 @@ public class LiveLinkMicPkPresenter implements View.OnClickListener {
if (mIsAnchor) { if (mIsAnchor) {
((LiveAnchorActivity) mContext).setPkBtnVisible(true); ((LiveAnchorActivity) mContext).setPkBtnVisible(true);
} }
ToastUtil.show(R.string.link_mic_refuse_pk); ToastUtil.show(mContext.getString(R.string.link_mic_refuse_pk));
} }
/** /**
@ -1130,7 +1130,7 @@ public class LiveLinkMicPkPresenter implements View.OnClickListener {
if (mIsAnchor) { if (mIsAnchor) {
((LiveAnchorActivity) mContext).setPkBtnVisible(true); ((LiveAnchorActivity) mContext).setPkBtnVisible(true);
} }
ToastUtil.show(R.string.link_mic_anchor_not_response_2); ToastUtil.show(mContext.getString(R.string.link_mic_anchor_not_response_2));
} }
/** /**
@ -1141,7 +1141,7 @@ public class LiveLinkMicPkPresenter implements View.OnClickListener {
if (mIsAnchor) { if (mIsAnchor) {
((LiveAnchorActivity) mContext).setPkBtnVisible(true); ((LiveAnchorActivity) mContext).setPkBtnVisible(true);
} }
ToastUtil.show(R.string.link_mic_anchor_busy_2); ToastUtil.show(mContext.getString(R.string.link_mic_anchor_busy_2));
} }

View File

@ -254,7 +254,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
public void onAnchorAcceptLinkMic() { public void onAnchorAcceptLinkMic() {
if (!mIsAnchor) { if (!mIsAnchor) {
mLastApplyLinkMicTime = 0; mLastApplyLinkMicTime = 0;
ToastUtil.show(R.string.link_mic_anchor_accept); ToastUtil.show(mContext.getString(R.string.link_mic_anchor_accept));
mIsLinkMic = true; mIsLinkMic = true;
mLinkMicUid = CommonAppConfig.getInstance().getUid(); mLinkMicUid = CommonAppConfig.getInstance().getUid();
if (mLinkMicTip != null) { if (mLinkMicTip != null) {
@ -304,7 +304,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
*/ */
public void onAnchorRefuseLinkMic() { public void onAnchorRefuseLinkMic() {
mLastApplyLinkMicTime = 0; mLastApplyLinkMicTime = 0;
ToastUtil.show(R.string.link_mic_refuse); ToastUtil.show(mContext.getString(R.string.link_mic_refuse));
} }
/** /**
@ -411,7 +411,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
*/ */
public void onAnchorNotResponse() { public void onAnchorNotResponse() {
mLastApplyLinkMicTime = 0; mLastApplyLinkMicTime = 0;
ToastUtil.show(R.string.link_mic_anchor_not_response); ToastUtil.show(mContext.getString(R.string.link_mic_anchor_not_response));
} }
/** /**
@ -419,7 +419,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
*/ */
public void onAnchorBusy() { public void onAnchorBusy() {
mLastApplyLinkMicTime = 0; mLastApplyLinkMicTime = 0;
ToastUtil.show(R.string.link_mic_anchor_busy); ToastUtil.show(mContext.getString(R.string.link_mic_anchor_busy));
} }
/** /**
@ -509,11 +509,11 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
private void onLinkMicBtnClick() { private void onLinkMicBtnClick() {
if (((LiveActivity) mContext).isGamePlaying()) { if (((LiveActivity) mContext).isGamePlaying()) {
ToastUtil.show(R.string.live_game_cannot_link_mic); ToastUtil.show(mContext.getString(R.string.live_game_cannot_link_mic));
return; return;
} }
if (((LiveActivity) mContext).isLinkMicAnchor()) { if (((LiveActivity) mContext).isLinkMicAnchor()) {
ToastUtil.show(R.string.live_link_mic_cannot_link); ToastUtil.show(mContext.getString(R.string.live_link_mic_cannot_link));
return; return;
} }
if (mIsLinkMic) { if (mIsLinkMic) {
@ -580,7 +580,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
private void audienceApplyLinkMic() { private void audienceApplyLinkMic() {
long curTime = System.currentTimeMillis(); long curTime = System.currentTimeMillis();
if (curTime - mLastApplyLinkMicTime < 11000) {//时间间隔11秒 if (curTime - mLastApplyLinkMicTime < 11000) {//时间间隔11秒
ToastUtil.show(R.string.link_mic_apply_waiting); ToastUtil.show(mContext.getString(R.string.link_mic_apply_waiting));
} else { } else {
mLastApplyLinkMicTime = curTime; mLastApplyLinkMicTime = curTime;
//请求权限 //请求权限
@ -607,7 +607,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
@Override @Override
public void run() { public void run() {
SocketLinkMicUtil.audienceApplyLinkMic(mSocketClient); SocketLinkMicUtil.audienceApplyLinkMic(mSocketClient);
ToastUtil.show(R.string.link_mic_apply); ToastUtil.show(mContext.getString(R.string.link_mic_apply));
} }
}); });
} }
@ -648,12 +648,12 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
} }
if (mAcceptLinkMic) { if (mAcceptLinkMic) {
if (((LiveActivity) mContext).isGamePlaying()) { if (((LiveActivity) mContext).isGamePlaying()) {
ToastUtil.show(R.string.live_game_cannot_link_mic); ToastUtil.show(mContext.getString(R.string.live_game_cannot_link_mic));
SocketLinkMicUtil.anchorRefuseLinkMic(mSocketClient, mApplyUid); SocketLinkMicUtil.anchorRefuseLinkMic(mSocketClient, mApplyUid);
return; return;
} }
if (((LiveActivity) mContext).isLinkMicAnchor()) { if (((LiveActivity) mContext).isLinkMicAnchor()) {
ToastUtil.show(R.string.live_link_mic_cannot_link_2); ToastUtil.show(mContext.getString(R.string.live_link_mic_cannot_link_2));
return; return;
} }
SocketLinkMicUtil.anchorAcceptLinkMic(mSocketClient, mApplyUid); SocketLinkMicUtil.anchorAcceptLinkMic(mSocketClient, mApplyUid);

View File

@ -489,16 +489,16 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
*/ */
public void applyLinkMicPk(String pkUid, String stream) { public void applyLinkMicPk(String pkUid, String stream) {
if (mPkSend) { if (mPkSend) {
ToastUtil.show(R.string.link_mic_apply_waiting); ToastUtil.show(mContext.getString(R.string.link_mic_apply_waiting));
return; return;
} }
if (mIsPk) { if (mIsPk) {
ToastUtil.show(R.string.live_link_mic_cannot_pk); ToastUtil.show(mContext.getString(R.string.live_link_mic_cannot_pk));
return; return;
} }
mPkSend = true; mPkSend = true;
SocketRyLinkMicPkUtil.linkMicPkApply(mSocketRyClient, pkUid, stream); SocketRyLinkMicPkUtil.linkMicPkApply(mSocketRyClient, pkUid, stream);
ToastUtil.show(R.string.link_mic_apply_pk); ToastUtil.show(mContext.getString(R.string.link_mic_apply_pk));
if (mLiveLinkMicPkViewHolder == null) { if (mLiveLinkMicPkViewHolder == null) {
mLiveLinkMicPkViewHolder = new LiveLinkMicPkViewHolder(mContext, mPkContainer); mLiveLinkMicPkViewHolder = new LiveLinkMicPkViewHolder(mContext, mPkContainer);
@ -1697,7 +1697,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
@ -2429,7 +2429,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
if (mIsAnchor) { if (mIsAnchor) {
((LiveRyAnchorActivity) mContext).setPkBtnVisible(true); ((LiveRyAnchorActivity) mContext).setPkBtnVisible(true);
} }
ToastUtil.show(R.string.link_mic_refuse_pk); ToastUtil.show(mContext.getString(R.string.link_mic_refuse_pk));
} }
/** /**
@ -2440,7 +2440,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
if (mIsAnchor) { if (mIsAnchor) {
((LiveRyAnchorActivity) mContext).setPkBtnVisible(true); ((LiveRyAnchorActivity) mContext).setPkBtnVisible(true);
} }
ToastUtil.show(R.string.link_mic_anchor_not_response_2); ToastUtil.show(mContext.getString(R.string.link_mic_anchor_not_response_2));
} }
/** /**
@ -2451,7 +2451,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
if (mIsAnchor) { if (mIsAnchor) {
((LiveRyAnchorActivity) mContext).setPkBtnVisible(true); ((LiveRyAnchorActivity) mContext).setPkBtnVisible(true);
} }
ToastUtil.show(R.string.link_mic_anchor_busy_2); ToastUtil.show(mContext.getString(R.string.link_mic_anchor_busy_2));
} }

View File

@ -62,7 +62,7 @@ public class UserHomeSharePresenter {
ClipboardManager cm = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); ClipboardManager cm = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
ClipData clipData = ClipData.newPlainText("text", link); ClipData clipData = ClipData.newPlainText("text", link);
cm.setPrimaryClip(clipData); cm.setPrimaryClip(clipData);
ToastUtil.show(R.string.copy_success); ToastUtil.show(mContext.getString(com.yunbao.common.R.string.copy_success));
} }

View File

@ -25,6 +25,7 @@ import com.yunbao.common.manager.NewLevelManager;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.L; import com.yunbao.common.utils.L;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R; import com.yunbao.live.R;
import com.yunbao.live.activity.LiveAudienceActivity; import com.yunbao.live.activity.LiveAudienceActivity;
import com.yunbao.live.bean.LiveBuyGuardMsgBean; import com.yunbao.live.bean.LiveBuyGuardMsgBean;
@ -409,7 +410,7 @@ public class SocketClient {
String msgtype = map.getString("msgtype"); String msgtype = map.getString("msgtype");
if ("2".equals(msgtype)) {//发言点亮 if ("2".equals(msgtype)) {//发言点亮
if ("409002".equals(received.getRetcode())) { if ("409002".equals(received.getRetcode())) {
ToastUtil.show(R.string.live_you_are_shut); ToastUtil.show(WordUtil.isNewZh()?"你已經被禁言":"You\'ve been banned");
return; return;
} }

View File

@ -134,7 +134,7 @@ public class SocketRyChatUtil {
public void onError(Message message, RongIMClient.ErrorCode errorCode) { public void onError(Message message, RongIMClient.ErrorCode errorCode) {
Log.e("tx", "aaa" + errorCode.toString()); Log.e("tx", "aaa" + errorCode.toString());
if (errorCode.code == 23408) { if (errorCode.code == 23408) {
ToastUtil.show(R.string.live_ban_tip); ToastUtil.show(WordUtil.isNewZh()?"您已被禁言":"You have been banned");
} else { } else {
ToastUtil.show(errorCode.code + ":" + errorCode.msg); ToastUtil.show(errorCode.code + ":" + errorCode.msg);
} }
@ -257,7 +257,7 @@ public class SocketRyChatUtil {
public void onError(Message message, RongIMClient.ErrorCode errorCode) { public void onError(Message message, RongIMClient.ErrorCode errorCode) {
Log.e("tx", "aaa" + errorCode.toString()); Log.e("tx", "aaa" + errorCode.toString());
if (errorCode.code == 23408) { if (errorCode.code == 23408) {
ToastUtil.show(R.string.live_ban_tip); ToastUtil.show(WordUtil.isNewZh()?"您已被禁言":"You have been banned");
} else { } else {
ToastUtil.show(errorCode.code + ":" + errorCode.msg); ToastUtil.show(errorCode.code + ":" + errorCode.msg);
} }

View File

@ -865,7 +865,7 @@ public class SocketRyClient {
String msgtype = map.getString("msgtype"); String msgtype = map.getString("msgtype");
if ("2".equals(msgtype)) {//发言点亮 if ("2".equals(msgtype)) {//发言点亮
if ("409002".equals(received.getRetcode())) { if ("409002".equals(received.getRetcode())) {
ToastUtil.show(R.string.live_you_are_shut); ToastUtil.show(WordUtil.isNewZh()?"你已經被禁言":"You\'ve been banned");
return; return;
} }

View File

@ -19,6 +19,7 @@ import com.yunbao.common.http.CommonHttpUtil;
import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.utils.SpUtil; import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.AbsMainViewHolder; import com.yunbao.common.views.AbsMainViewHolder;
import com.yunbao.live.R; import com.yunbao.live.R;
import com.yunbao.live.activity.MyTUIConversationFragment; import com.yunbao.live.activity.MyTUIConversationFragment;
@ -180,7 +181,7 @@ public class ChatListViewHolder extends AbsMainViewHolder implements View.OnClic
mSystemMsgRedPoint.setVisibility(View.INVISIBLE); mSystemMsgRedPoint.setVisibility(View.INVISIBLE);
} }
// ImMessageUtil.getInstance().markAllConversationAsRead(); // ImMessageUtil.getInstance().markAllConversationAsRead();
ToastUtil.show(R.string.im_msg_ignore_unread_2); ToastUtil.show(WordUtil.isNewZh()?"已忽略未讀消息":"Unread message ignored");
} }
} }

View File

@ -66,7 +66,7 @@ public class LiveAddImpressViewHolder extends AbsLivePageViewHolder {
addId(mtv.getBean().getId()); addId(mtv.getBean().getId());
mChanged = true; mChanged = true;
} else { } else {
ToastUtil.show(R.string.impress_add_max); ToastUtil.show(mContext.getString(R.string.impress_add_max));
} }
} else { } else {
removeId(mtv.getBean().getId()); removeId(mtv.getBean().getId());
@ -168,11 +168,11 @@ public class LiveAddImpressViewHolder extends AbsLivePageViewHolder {
private void save() { private void save() {
if (mLinkedList.size() == 0) { if (mLinkedList.size() == 0) {
ToastUtil.show(R.string.impress_please_choose); ToastUtil.show(mContext.getString(R.string.impress_please_choose));
return; return;
} }
if (!mChanged) { if (!mChanged) {
ToastUtil.show(R.string.impress_not_changed); ToastUtil.show(mContext.getString(R.string.impress_not_changed));
return; return;
} }
String ids = ""; String ids = "";

View File

@ -30,6 +30,7 @@ import com.yunbao.common.utils.MicStatusManager;
import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.RouteUtil;
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.views.AbsViewHolder; import com.yunbao.common.views.AbsViewHolder;
import com.yunbao.common.views.weight.ClipPathCircleImage; import com.yunbao.common.views.weight.ClipPathCircleImage;
import com.yunbao.live.R; import com.yunbao.live.R;
@ -200,7 +201,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
} }

View File

@ -108,12 +108,12 @@ public class LiveLinkMicPushTxViewHolder extends AbsLiveLinkMicPushViewHolder im
@Override @Override
public void onPushEvent(int e, Bundle bundle) { public void onPushEvent(int e, Bundle bundle) {
if (e == TXLiveConstants.PUSH_ERR_OPEN_CAMERA_FAIL) { if (e == TXLiveConstants.PUSH_ERR_OPEN_CAMERA_FAIL) {
ToastUtil.show(R.string.live_push_failed_1); ToastUtil.show(mContext.getString(R.string.live_push_failed_1));
if (mLivePushListener != null) { if (mLivePushListener != null) {
mLivePushListener.onPushFailed(); mLivePushListener.onPushFailed();
} }
} else if (e == TXLiveConstants.PUSH_ERR_OPEN_MIC_FAIL) { } else if (e == TXLiveConstants.PUSH_ERR_OPEN_MIC_FAIL) {
ToastUtil.show(R.string.live_push_failed_1); ToastUtil.show(mContext.getString(R.string.live_push_failed_1));
if (mLivePushListener != null) { if (mLivePushListener != null) {
mLivePushListener.onPushFailed(); mLivePushListener.onPushFailed();
} }

View File

@ -388,7 +388,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
chooseLiveType(); chooseLiveType();
} else if (i == R.id.btn_start_live) { } else if (i == R.id.btn_start_live) {
if (!selector) { if (!selector) {
ToastUtil.show(R.string.anchor_agreement_hint); ToastUtil.show(mContext.getString(R.string.anchor_agreement_hint));
return; return;
} }
if (mLiveClassID == 0) { if (mLiveClassID == 0) {
@ -813,7 +813,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
@Override @Override
public void onConfirmClick(Dialog dialog, String content) { public void onConfirmClick(Dialog dialog, String content) {
if (TextUtils.isEmpty(content)) { if (TextUtils.isEmpty(content)) {
ToastUtil.show(R.string.live_set_pwd_empty); ToastUtil.show(mContext.getString(R.string.live_set_pwd_empty));
} else { } else {
mLiveType = bean.getId(); mLiveType = bean.getId();
mLiveTypeTextView.setText(WordUtil.isNewZh() ? "密碼房" : "password room"); mLiveTypeTextView.setText(WordUtil.isNewZh() ? "密碼房" : "password room");
@ -835,7 +835,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
@Override @Override
public void onConfirmClick(Dialog dialog, String content) { public void onConfirmClick(Dialog dialog, String content) {
if (TextUtils.isEmpty(content)) { if (TextUtils.isEmpty(content)) {
ToastUtil.show(R.string.live_set_fee_empty); ToastUtil.show(mContext.getString(R.string.live_set_fee_empty));
} else { } else {
mLiveType = bean.getId(); mLiveType = bean.getId();
mLiveTypeTextView.setText(bean.getName()); mLiveTypeTextView.setText(bean.getName());

View File

@ -265,7 +265,7 @@ public class LivePlayTxViewHolder_backup extends LiveRoomPlayViewHolder implemen
playType = TXLivePlayer.PLAY_TYPE_VOD_MP4; playType = TXLivePlayer.PLAY_TYPE_VOD_MP4;
} }
if (playType == -1) { if (playType == -1) {
ToastUtil.show(R.string.live_play_error_2); ToastUtil.show(mContext.getString(R.string.live_play_error_2));
return; return;
} }
if (mPlayer != null) { if (mPlayer != null) {

View File

@ -414,7 +414,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });
@ -834,7 +834,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
@Override @Override
public void toggleFlash() { public void toggleFlash() {
if (mCameraFront) { if (mCameraFront) {
ToastUtil.show(R.string.live_open_flash); ToastUtil.show(mContext.getString(R.string.live_open_flash));
return; return;
} }
@ -999,10 +999,10 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
@Override @Override
public void onPushEvent(int e, Bundle bundle) { public void onPushEvent(int e, Bundle bundle) {
if (e == TXLiveConstants.PUSH_ERR_OPEN_CAMERA_FAIL) { if (e == TXLiveConstants.PUSH_ERR_OPEN_CAMERA_FAIL) {
ToastUtil.show(R.string.live_push_failed_1); ToastUtil.show(mContext.getString(R.string.live_push_failed_1));
} else if (e == TXLiveConstants.PUSH_ERR_OPEN_MIC_FAIL) { } else if (e == TXLiveConstants.PUSH_ERR_OPEN_MIC_FAIL) {
ToastUtil.show(R.string.live_push_failed_2); ToastUtil.show(mContext.getString(R.string.live_push_failed_2));
} else if (e == TXLiveConstants.PUSH_ERR_NET_DISCONNECT || e == TXLiveConstants.PUSH_ERR_INVALID_ADDRESS) { } else if (e == TXLiveConstants.PUSH_ERR_NET_DISCONNECT || e == TXLiveConstants.PUSH_ERR_INVALID_ADDRESS) {
L.e(TAG, "网络断开,推流失败------>"); L.e(TAG, "网络断开,推流失败------>");

View File

@ -269,7 +269,7 @@ public class LivePushTxViewHolder extends AbsLivePushViewHolder implements ITXLi
@Override @Override
public void toggleFlash() { public void toggleFlash() {
if (mCameraFront) { if (mCameraFront) {
ToastUtil.show(R.string.live_open_flash); ToastUtil.show(mContext.getString(R.string.live_open_flash));
return; return;
} }
// if (mLivePusher != null) { // if (mLivePusher != null) {
@ -486,10 +486,10 @@ public class LivePushTxViewHolder extends AbsLivePushViewHolder implements ITXLi
@Override @Override
public void onPushEvent(int e, Bundle bundle) { public void onPushEvent(int e, Bundle bundle) {
if (e == TXLiveConstants.PUSH_ERR_OPEN_CAMERA_FAIL) { if (e == TXLiveConstants.PUSH_ERR_OPEN_CAMERA_FAIL) {
ToastUtil.show(R.string.live_push_failed_1); ToastUtil.show(mContext.getString(R.string.live_push_failed_1));
} else if (e == TXLiveConstants.PUSH_ERR_OPEN_MIC_FAIL) { } else if (e == TXLiveConstants.PUSH_ERR_OPEN_MIC_FAIL) {
ToastUtil.show(R.string.live_push_failed_2); ToastUtil.show(mContext.getString(R.string.live_push_failed_2));
} else if (e == TXLiveConstants.PUSH_ERR_NET_DISCONNECT || e == TXLiveConstants.PUSH_ERR_INVALID_ADDRESS) { } else if (e == TXLiveConstants.PUSH_ERR_NET_DISCONNECT || e == TXLiveConstants.PUSH_ERR_INVALID_ADDRESS) {
L.e(TAG, "网络断开,推流失败------>"); L.e(TAG, "网络断开,推流失败------>");

View File

@ -314,7 +314,7 @@ public class LivePushTxViewHolder360Beauty extends AbsLivePushViewHolder impleme
@Override @Override
public void toggleFlash() { public void toggleFlash() {
if (mCameraFront) { if (mCameraFront) {
ToastUtil.show(R.string.live_open_flash); ToastUtil.show(mContext.getString(R.string.live_open_flash));
return; return;
} }
if (mLivePusher != null) { if (mLivePusher != null) {
@ -471,10 +471,10 @@ public class LivePushTxViewHolder360Beauty extends AbsLivePushViewHolder impleme
Log.d("onPushEvent",""+e+" "+bundle.toString()); Log.d("onPushEvent",""+e+" "+bundle.toString());
if (e == TXLiveConstants.PUSH_ERR_OPEN_CAMERA_FAIL) { if (e == TXLiveConstants.PUSH_ERR_OPEN_CAMERA_FAIL) {
ToastUtil.show(R.string.live_push_failed_1); ToastUtil.show(mContext.getString(R.string.live_push_failed_1));
} else if (e == TXLiveConstants.PUSH_ERR_OPEN_MIC_FAIL) { } else if (e == TXLiveConstants.PUSH_ERR_OPEN_MIC_FAIL) {
ToastUtil.show(R.string.live_push_failed_2); ToastUtil.show(mContext.getString(R.string.live_push_failed_2));
} else if (e == TXLiveConstants.PUSH_ERR_NET_DISCONNECT || e == TXLiveConstants.PUSH_ERR_INVALID_ADDRESS) { } else if (e == TXLiveConstants.PUSH_ERR_NET_DISCONNECT || e == TXLiveConstants.PUSH_ERR_INVALID_ADDRESS) {
L.e(TAG, "网络断开,推流失败------>"); L.e(TAG, "网络断开,推流失败------>");

View File

@ -345,7 +345,7 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick
@Override @Override
public void onConfirmClick(Dialog dialog, String content) { public void onConfirmClick(Dialog dialog, String content) {
if (TextUtils.isEmpty(content)) { if (TextUtils.isEmpty(content)) {
ToastUtil.show(R.string.live_set_pwd_empty); ToastUtil.show(mContext.getString(R.string.live_set_pwd_empty));
} else { } else {
mLiveType = bean.getId(); mLiveType = bean.getId();
mLiveTypeTextView.setText(bean.getName()); mLiveTypeTextView.setText(bean.getName());
@ -367,7 +367,7 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick
@Override @Override
public void onConfirmClick(Dialog dialog, String content) { public void onConfirmClick(Dialog dialog, String content) {
if (TextUtils.isEmpty(content)) { if (TextUtils.isEmpty(content)) {
ToastUtil.show(R.string.live_set_fee_empty); ToastUtil.show(mContext.getString(R.string.live_set_fee_empty));
} else { } else {
mLiveType = bean.getId(); mLiveType = bean.getId();
mLiveTypeTextView.setText(bean.getName()); mLiveTypeTextView.setText(bean.getName());

View File

@ -369,7 +369,7 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi
@Override @Override
public void onConfirmClick(Dialog dialog, String content) { public void onConfirmClick(Dialog dialog, String content) {
if (TextUtils.isEmpty(content)) { if (TextUtils.isEmpty(content)) {
ToastUtil.show(R.string.live_set_pwd_empty); ToastUtil.show(mContext.getString(R.string.live_set_pwd_empty));
} else { } else {
mLiveType = bean.getId(); mLiveType = bean.getId();
mLiveTypeTextView.setText(bean.getName()); mLiveTypeTextView.setText(bean.getName());
@ -391,7 +391,7 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi
@Override @Override
public void onConfirmClick(Dialog dialog, String content) { public void onConfirmClick(Dialog dialog, String content) {
if (TextUtils.isEmpty(content)) { if (TextUtils.isEmpty(content)) {
ToastUtil.show(R.string.live_set_fee_empty); ToastUtil.show(mContext.getString(R.string.live_set_fee_empty));
} else { } else {
mLiveType = bean.getId(); mLiveType = bean.getId();
mLiveTypeTextView.setText(bean.getName()); mLiveTypeTextView.setText(bean.getName());

View File

@ -2380,7 +2380,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
pkUidTmp = ""; pkUidTmp = "";
} }
}); });

View File

@ -349,7 +349,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
@Override @Override
public void onError(String error) { public void onError(String error) {
Log.e("PortraitLiveManager", error); Log.e("PortraitLiveManager", error);
ToastUtil.show( R.string.net_error); ToastUtil.show( mContext.getString(R.string.net_error));
} }
}); });
} }

View File

@ -201,7 +201,7 @@ public class OlineListActivity extends AbsActivity {
public void onOlineEvent(OlineEvent event) { public void onOlineEvent(OlineEvent event) {
IMLoginModel model = IMLoginManager.get(mContext).getUserInfo(); IMLoginModel model = IMLoginManager.get(mContext).getUserInfo();
if (TextUtils.equals(String.valueOf(model.getId()), event.getModel().getId())) { if (TextUtils.equals(String.valueOf(model.getId()), event.getModel().getId())) {
ToastUtil.show(R.string.cannot_yourself); ToastUtil.show(mContext.getString(R.string.cannot_yourself));
} else { } else {
Bus.get().post(new LiveInputEvent().setModel(event.getModel())); Bus.get().post(new LiveInputEvent().setModel(event.getModel()));
finish(); finish();

View File

@ -73,6 +73,7 @@ import com.yunbao.common.utils.RandomUtil;
import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.RouteUtil;
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.formatBigNum; import com.yunbao.common.utils.formatBigNum;
import com.yunbao.common.views.LiveSudGamePopup; import com.yunbao.common.views.LiveSudGamePopup;
import com.yunbao.common.views.weight.LiveFloatView; import com.yunbao.common.views.weight.LiveFloatView;
@ -720,7 +721,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
//直播间上部轮播新人特惠趣味游戏幸运天使 轮播接口 //直播间上部轮播新人特惠趣味游戏幸运天使 轮播接口
mLiveRoomViewHolder.showLiveRoomActivityBanner(); mLiveRoomViewHolder.showLiveRoomActivityBanner();
} }

View File

@ -160,6 +160,7 @@
android:id="@+id/guard_btn_buy" android:id="@+id/guard_btn_buy"
android:layout_width="110dp" android:layout_width="110dp"
android:layout_height="30dp" android:layout_height="30dp"
android:singleLine="true"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="15dp" android:layout_marginEnd="15dp"

View File

@ -51,7 +51,10 @@
<TextView <TextView
android:id="@+id/title" android:id="@+id/title"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:gravity="center"
android:singleLine="true"
android:ellipsize="end"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:textSize="14sp" android:textSize="14sp"
@ -65,6 +68,9 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="6dp" android:layout_marginBottom="6dp"
android:singleLine="true"
android:ellipsize="end"
android:gravity="center"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:textSize="11sp" android:textSize="11sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"

View File

@ -1059,6 +1059,8 @@
android:id="@+id/iv_look" android:id="@+id/iv_look"
android:layout_width="52dp" android:layout_width="52dp"
android:layout_height="24dp" android:layout_height="24dp"
android:singleLine="true"
android:ellipsize="end"
android:layout_marginRight="12dp" android:layout_marginRight="12dp"
android:background="@drawable/bg_all_server_icon" android:background="@drawable/bg_all_server_icon"
android:gravity="center" android:gravity="center"

View File

@ -88,6 +88,7 @@ import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.http.LiveHttpUtil;
import com.yunbao.common.utils.LiveRoomCheckLivePresenter; import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.main.R; import com.yunbao.main.R;
import com.yunbao.main.dialog.LoginTipsDialog; import com.yunbao.main.dialog.LoginTipsDialog;
import com.yunbao.main.http.MainHttpUtil; import com.yunbao.main.http.MainHttpUtil;
@ -275,7 +276,7 @@ public class EntryActivity extends AppCompatActivity {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(R.string.net_error); ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
} }
}); });

View File

@ -616,7 +616,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(com.yunbao.live.R.string.net_error); ToastUtil.show(mContext.getString(R.string.net_error));
} }
}); });

View File

@ -178,7 +178,7 @@ public class MainListActivity extends AbsActivity implements OnItemClickListener
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show( R.string.net_error); ToastUtil.show( mContext.getString(R.string.net_error));
} }
}); });
initView(); initView();

View File

@ -240,7 +240,7 @@ public class MsgSettActivity extends AbsActivity {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(com.yunbao.live.R.string.net_error); ToastUtil.show(mContext.getString(R.string.net_error));
} }
}); });
} }

View File

@ -444,7 +444,7 @@ public class PDLiveConversationListActivity extends AbsActivity implements View.
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show( R.string.net_error); ToastUtil.show( mContext.getString(R.string.net_error));
} }
}); });
MessageIMManager.get(mContext).setSystemNumber(0); MessageIMManager.get(mContext).setSystemNumber(0);

View File

@ -395,7 +395,7 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
mAdapter.setCacheString(getCacheSize()); mAdapter.setCacheString(getCacheSize());
mAdapter.notifyItemChanged(position); mAdapter.notifyItemChanged(position);
} }
ToastUtil.show(R.string.setting_clear_cache); ToastUtil.show(mContext.getString(R.string.setting_clear_cache));
} }
}, 2000); }, 2000);
} }

View File

@ -114,7 +114,7 @@ public class MsgFollowAdapter extends RecyclerView.Adapter<MsgFollowAdapter.Vh>
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show( R.string.net_error); ToastUtil.show( mContext.getString(R.string.net_error));
} }
}); });
} }

View File

@ -61,7 +61,7 @@ public class SearchResultsAdapter extends RecyclerView.Adapter {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(com.yunbao.live.R.string.net_error); ToastUtil.show(R.string.net_error);
} }
}); });
} }

View File

@ -123,11 +123,11 @@ public class OneLoginDialog extends AbsDialogFragment {
}); });
} else { } else {
if (msg.contains("暱稱重複,請重新輸入")) { if (msg.contains("暱稱重複,請重新輸入")) {
ToastUtil.show(R.string.edit_one_5); ToastUtil.show(mContext.getString(R.string.edit_one_5));
} else if (msg.contains("該邀請碼不存在,請重新輸入")) { } else if (msg.contains("該邀請碼不存在,請重新輸入")) {
ToastUtil.show(R.string.edit_one_6); ToastUtil.show(mContext.getString(R.string.edit_one_6));
} else if (msg.contains("暱稱不合法")) { } else if (msg.contains("暱稱不合法")) {
ToastUtil.show(R.string.edit_one_7); ToastUtil.show(mContext.getString(R.string.edit_one_7));
} }
} }
} }

View File

@ -85,7 +85,7 @@ public class SearchRecommendFragment extends BaseFragment {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show( R.string.net_error); ToastUtil.show(R.string.net_error);
} }
}); });
} }

View File

@ -117,7 +117,7 @@ public class SearchResultsItemFragment extends BaseFragment {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show( R.string.net_error); ToastUtil.show( R.string.net_error);
} }
}); });
} }

View File

@ -318,7 +318,7 @@ public class ConversationIMListManager {
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(com.yunbao.live.R.string.net_error);
} }
}); });
} }

View File

@ -394,7 +394,7 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple
}); });
getItem(position, mItem1, mItem2, mItem3).setOnClickListener(v -> { getItem(position, mItem1, mItem2, mItem3).setOnClickListener(v -> {
if (bean.isHide()) { if (bean.isHide()) {
ToastUtil.show(R.string.can_not_go); ToastUtil.show(mContext.getString(R.string.can_not_go));
} else { } else {
if (bean.getIslive() == 1) { if (bean.getIslive() == 1) {

View File

@ -124,39 +124,39 @@ public class CashAccountViewHolder extends AbsViewHolder implements View.OnClick
if (mKey == Constants.CASH_ACCOUNT_ALI) { if (mKey == Constants.CASH_ACCOUNT_ALI) {
account = mEditAliAccount.getText().toString().trim(); account = mEditAliAccount.getText().toString().trim();
if (TextUtils.isEmpty(account)) { if (TextUtils.isEmpty(account)) {
ToastUtil.show(R.string.cash_input_ali_account); ToastUtil.show(mContext.getString(R.string.cash_input_ali_account));
return; return;
} }
mEditAliAccount.setText(""); mEditAliAccount.setText("");
name = mEditAliName.getText().toString().trim(); name = mEditAliName.getText().toString().trim();
if (TextUtils.isEmpty(name)) { if (TextUtils.isEmpty(name)) {
ToastUtil.show(R.string.cash_input_ali_name); ToastUtil.show(mContext.getString(R.string.cash_input_ali_name));
return; return;
} }
mEditAliName.setText(""); mEditAliName.setText("");
} else if (mKey == Constants.CASH_ACCOUNT_WX) { } else if (mKey == Constants.CASH_ACCOUNT_WX) {
account = mEditWxAccount.getText().toString().trim(); account = mEditWxAccount.getText().toString().trim();
if (TextUtils.isEmpty(account)) { if (TextUtils.isEmpty(account)) {
ToastUtil.show(R.string.cash_input_wx_account); ToastUtil.show(mContext.getString(R.string.cash_input_wx_account));
return; return;
} }
mEditWxAccount.setText(""); mEditWxAccount.setText("");
} else { } else {
account = mEditBankAccount.getText().toString().trim(); account = mEditBankAccount.getText().toString().trim();
if (TextUtils.isEmpty(account)) { if (TextUtils.isEmpty(account)) {
ToastUtil.show(R.string.cash_input_bank_account); ToastUtil.show(mContext.getString(R.string.cash_input_bank_account));
return; return;
} }
mEditBankAccount.setText(""); mEditBankAccount.setText("");
name = mEditBankUserName.getText().toString().trim(); name = mEditBankUserName.getText().toString().trim();
if (TextUtils.isEmpty(account)) { if (TextUtils.isEmpty(account)) {
ToastUtil.show(R.string.cash_input_bank_user_name); ToastUtil.show(mContext.getString(R.string.cash_input_bank_user_name));
return; return;
} }
mEditBankUserName.setText(""); mEditBankUserName.setText("");
bank = mEditBankName.getText().toString().trim(); bank = mEditBankName.getText().toString().trim();
if (TextUtils.isEmpty(account)) { if (TextUtils.isEmpty(account)) {
ToastUtil.show(R.string.cash_input_bank_name); ToastUtil.show(mContext.getString(R.string.cash_input_bank_name));
return; return;
} }
mEditBankName.setText(""); mEditBankName.setText("");

View File

@ -265,7 +265,7 @@ public class VideoInputDialogFragment extends AbsDialogFragment implements View.
} }
String content = mInput.getText().toString().trim(); String content = mInput.getText().toString().trim();
if (TextUtils.isEmpty(content)) { if (TextUtils.isEmpty(content)) {
ToastUtil.show(R.string.content_empty); ToastUtil.show(mContext.getString(R.string.content_empty));
return; return;
} }
String toUid = mVideoUid; String toUid = mVideoUid;

View File

@ -218,7 +218,7 @@ public class VideoMusicViewHolder extends AbsViewHolder implements View.OnClickL
} }
String key = mInput.getText().toString().trim(); String key = mInput.getText().toString().trim();
if (TextUtils.isEmpty(key)) { if (TextUtils.isEmpty(key)) {
ToastUtil.show(R.string.content_empty); ToastUtil.show(mContext.getString(R.string.content_empty));
return; return;
} }
VideoHttpUtil.cancel(VideoHttpConsts.VIDEO_SEARCH_MUSIC); VideoHttpUtil.cancel(VideoHttpConsts.VIDEO_SEARCH_MUSIC);