修改中英文
This commit is contained in:
parent
e081f1e058
commit
c5d537fb4d
@ -129,7 +129,7 @@ public class CustomDrawerPopupAdapter extends RecyclerView.Adapter {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(mContext.getString(R.string.net_error));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ import com.yunbao.common.bean.WishModel;
|
||||
import com.yunbao.common.event.LiveNewWishListCloseEvent;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.DayWishItemViewHolder;
|
||||
import com.yunbao.common.views.LunarWishItemViewHolder;
|
||||
import com.yunbao.common.views.SeasonalWishItemViewHolder;
|
||||
@ -53,7 +54,7 @@ public class LiveNewWishAdapter extends RecyclerView.Adapter {
|
||||
if (wishList.get(i)!=null){
|
||||
if (!TextUtils.isEmpty(wishList.get(i).getLid()) && !TextUtils.isEmpty(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;
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ import androidx.recyclerview.widget.SimpleItemAnimator;
|
||||
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
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.OnRefreshListener;
|
||||
import com.yunbao.common.R;
|
||||
@ -188,7 +187,7 @@ public class CommonRefreshView extends FrameLayout implements View.OnClickListen
|
||||
if (mRecyclerView != null) {
|
||||
RecyclerView.Adapter adapter = mRecyclerView.getAdapter();
|
||||
if (adapter != null && adapter.getItemCount() > 0) {
|
||||
ToastUtil.show(R.string.load_failure);
|
||||
ToastUtil.show(mContext.getString(R.string.load_failure));
|
||||
} else {
|
||||
mLoadFailureView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
@ -196,7 +195,7 @@ public class CommonRefreshView extends FrameLayout implements View.OnClickListen
|
||||
mLoadFailureView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show(R.string.load_failure);
|
||||
ToastUtil.show(mContext.getString(R.string.load_failure));
|
||||
}
|
||||
}
|
||||
if (mDataHelper != null) {
|
||||
|
@ -14,6 +14,7 @@ import com.yunbao.common.event.LiveNewRoleEvent;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
@ -59,7 +60,7 @@ public class LiveNewRolePopup extends BottomPopupView {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
|
||||
@Override
|
||||
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) {
|
||||
@ -175,7 +175,7 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
public void onCancel() {
|
||||
|
||||
if (wishList2.size() > 10) {
|
||||
ToastUtil.show(R.string.must_hint);
|
||||
ToastUtil.show(getActivity().getString(R.string.must_hint));
|
||||
return;
|
||||
}
|
||||
LiveNetManager.get(getContext()).
|
||||
@ -187,14 +187,14 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
}
|
||||
})).show();
|
||||
} else {
|
||||
if (wishList2.size() > 10) {
|
||||
ToastUtil.show(R.string.must_hint);
|
||||
ToastUtil.show(getContext().getString(R.string.must_hint));
|
||||
return;
|
||||
}
|
||||
LiveNetManager.get(getContext()).
|
||||
@ -206,7 +206,7 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -81,20 +81,20 @@ public class ProcessFragment extends Fragment {
|
||||
switch (permission) {
|
||||
case Manifest.permission.READ_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;
|
||||
case Manifest.permission.CAMERA:
|
||||
ToastUtil.show(R.string.permission_camera_refused);
|
||||
ToastUtil.show(getActivity().getString(R.string.permission_camera_refused));
|
||||
break;
|
||||
case Manifest.permission.RECORD_AUDIO:
|
||||
ToastUtil.show(R.string.permission_record_audio_refused);
|
||||
ToastUtil.show(getActivity().getString(R.string.permission_record_audio_refused));
|
||||
break;
|
||||
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();
|
||||
break;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -8,10 +8,10 @@ import com.google.gson.Gson;
|
||||
import com.lzy.okgo.callback.AbsCallback;
|
||||
import com.lzy.okgo.model.Response;
|
||||
import com.lzy.okgo.request.base.Request;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.net.ConnectException;
|
||||
import java.net.SocketException;
|
||||
@ -36,7 +36,7 @@ public abstract class HttpCallback extends AbsCallback<JsonBean> {
|
||||
public void onSuccess(Response<JsonBean> response) {
|
||||
JsonBean bean = response.body();
|
||||
String gson = new Gson().toJson(bean);
|
||||
Log.e("onSuccess",gson);
|
||||
Log.e("onSuccess", gson);
|
||||
if (bean != null) {
|
||||
if (200 == bean.getRet()) {
|
||||
Data data = bean.getData();
|
||||
@ -65,7 +65,7 @@ public abstract class HttpCallback extends AbsCallback<JsonBean> {
|
||||
t.printStackTrace();
|
||||
L.e("网络请求错误---->" + t.getClass() + " : " + t.getMessage());
|
||||
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) {
|
||||
// mLoadingDialog.dismiss();
|
||||
|
@ -10,6 +10,7 @@ import com.yunbao.common.bean.RankPkInfoBean;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -342,7 +343,7 @@ public class RandomPkManager {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.yunbao.common.pay;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
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.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.pay.ali.AliPayBuilder;
|
||||
import com.yunbao.common.pay.wx.WxPayBuilder;
|
||||
import com.yunbao.common.utils.GoogleBillingUtil;
|
||||
import com.yunbao.common.utils.OnGoogleBillingListener;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
@ -48,16 +49,16 @@ public class PayPresenter {
|
||||
|
||||
|
||||
private GoogleBillingUtil googleBillingUtil;
|
||||
private String TAG="PayPresenter";
|
||||
private String [] arrPro = {"1"};
|
||||
private String TAG = "PayPresenter";
|
||||
private String[] arrPro = {"1"};
|
||||
private String mOrderid;
|
||||
|
||||
public PayPresenter(Activity activity) {
|
||||
mActivity = new WeakReference<>(activity).get();
|
||||
}
|
||||
|
||||
public void setPayCallback(PayCallback callback){
|
||||
mPayCallback=callback;
|
||||
public void setPayCallback(PayCallback callback) {
|
||||
mPayCallback = callback;
|
||||
}
|
||||
|
||||
public long getBalanceValue() {
|
||||
@ -96,9 +97,10 @@ public class PayPresenter {
|
||||
public void setAliCallbackUrl(String aliCallbackUrl) {
|
||||
mAliCallbackUrl = aliCallbackUrl;
|
||||
}
|
||||
|
||||
public void pay(String payType, String money, String goodsName, String orderParams) {
|
||||
if (TextUtils.isEmpty(payType)) {
|
||||
ToastUtil.show(R.string.wallet_tip_5);
|
||||
ToastUtil.show(mActivity.getString(R.string.wallet_tip_5));
|
||||
return;
|
||||
}
|
||||
//L.e("《==》支付按钮4--->" +payType);
|
||||
@ -128,40 +130,42 @@ public class PayPresenter {
|
||||
case Constants.PAY_TYPE_GOOGLE://google支付
|
||||
googlePay(orderParams);
|
||||
break;
|
||||
default:
|
||||
otherPay(orderParams,payType);
|
||||
break;
|
||||
default:
|
||||
otherPay(orderParams, payType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//谷歌支付
|
||||
private void googlePay(String orderParams) {
|
||||
mOrderid="1";
|
||||
String pid="2";
|
||||
if (pid != null && !pid.isEmpty()){
|
||||
arrPro[0]=pid;
|
||||
mOrderid = "1";
|
||||
String pid = "2";
|
||||
if (pid != null && !pid.isEmpty()) {
|
||||
arrPro[0] = pid;
|
||||
initGooglePay();
|
||||
}
|
||||
|
||||
String newParm= StringUtil.contact("Charge.getGoogleOrder",orderParams,"&type=android",
|
||||
"&appname=",mActivity.getString(R.string.app_name),
|
||||
"&desc="+mActivity.getPackageName()+"&source=android"
|
||||
String newParm = StringUtil.contact("Charge.getGoogleOrder", orderParams, "&type=android",
|
||||
"&appname=", mActivity.getString(R.string.app_name),
|
||||
"&desc=" + mActivity.getPackageName() + "&source=android"
|
||||
);
|
||||
CommonHttpUtil.getWxH5Order(newParm, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if(code==0){
|
||||
if (code == 0) {
|
||||
try {
|
||||
ToastUtil.show("开始支付,请稍后");
|
||||
org.json.JSONObject jsonObject=new org.json.JSONObject(info[0]);
|
||||
mOrderid=jsonObject.getString("orderid");
|
||||
String pid=jsonObject.getString("pid");
|
||||
if (pid != null && !pid.isEmpty()){
|
||||
arrPro[0]=pid;
|
||||
org.json.JSONObject jsonObject = new org.json.JSONObject(info[0]);
|
||||
mOrderid = jsonObject.getString("orderid");
|
||||
String pid = jsonObject.getString("pid");
|
||||
if (pid != null && !pid.isEmpty()) {
|
||||
arrPro[0] = pid;
|
||||
initGooglePay();
|
||||
}
|
||||
}catch (Exception e){ e.printStackTrace(); }
|
||||
}else {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show("无法支付,请联系客服");
|
||||
}
|
||||
|
||||
@ -171,7 +175,7 @@ public class PayPresenter {
|
||||
|
||||
private void initGooglePay() {
|
||||
GoogleBillingUtil.isDebug(true);
|
||||
GoogleBillingUtil.setSkus(arrPro,null);
|
||||
GoogleBillingUtil.setSkus(arrPro, null);
|
||||
GoogleBillingUtil.setIsAutoAcknowledgePurchase(true);//设置自动确认购买
|
||||
googleBillingUtil = GoogleBillingUtil.getInstance()
|
||||
.addOnGoogleBillingListener(mActivity, mOnMyGoogleBillingListener)
|
||||
@ -179,35 +183,35 @@ public class PayPresenter {
|
||||
}
|
||||
|
||||
private void paypalPay(String orderParams) {
|
||||
String url1="/index.php?m=App&a=paypal" +orderParams +"&source=android";
|
||||
String url2= CommonAppConfig.HOST+url1;
|
||||
String url1 = "/index.php?m=App&a=paypal" + orderParams + "&source=android";
|
||||
String url2 = CommonAppConfig.HOST + url1;
|
||||
open(url2);
|
||||
}
|
||||
|
||||
private void payssionPay(String orderParams) {
|
||||
String url1="/index.php?m=App&a=pay" +orderParams +"&source=android";
|
||||
String url2= CommonAppConfig.HOST+url1;
|
||||
String url1 = "/index.php?m=App&a=pay" + orderParams + "&source=android";
|
||||
String url2 = CommonAppConfig.HOST + url1;
|
||||
open(url2);
|
||||
|
||||
}
|
||||
|
||||
private void yunquPay(String orderParams) {
|
||||
String newParm= StringUtil.contact("Charge.getYunquOrder",orderParams,"&type=android",
|
||||
"&appname=",mActivity.getString(R.string.app_name),
|
||||
"&desc="+mActivity.getPackageName()+"&source=android"
|
||||
String newParm = StringUtil.contact("Charge.getYunquOrder", orderParams, "&type=android",
|
||||
"&appname=", mActivity.getString(R.string.app_name),
|
||||
"&desc=" + mActivity.getPackageName() + "&source=android"
|
||||
);
|
||||
//L.e("《==》支付URL--->" +newParm);
|
||||
CommonHttpUtil.getWxH5Order(newParm, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if(code==0){
|
||||
if (code == 0) {
|
||||
try {
|
||||
org.json.JSONObject jsonObject=new org.json.JSONObject(info[0]);
|
||||
String payment_url=jsonObject.getString("payment_url");
|
||||
org.json.JSONObject jsonObject = new org.json.JSONObject(info[0]);
|
||||
String payment_url = jsonObject.getString("payment_url");
|
||||
open(payment_url);
|
||||
// L.e("《==》支付URL--->" +payment_url);
|
||||
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -216,20 +220,20 @@ public class PayPresenter {
|
||||
}
|
||||
|
||||
private void hfbPay(String orderParams) {
|
||||
String newParm= StringUtil.contact("Charge.getWxH5Order",orderParams,"&type=android",
|
||||
"&appname=",mActivity.getString(R.string.app_name),
|
||||
"&desc="+mActivity.getPackageName()
|
||||
);
|
||||
String newParm = StringUtil.contact("Charge.getWxH5Order", orderParams, "&type=android",
|
||||
"&appname=", mActivity.getString(R.string.app_name),
|
||||
"&desc=" + mActivity.getPackageName()
|
||||
);
|
||||
|
||||
CommonHttpUtil.getCashierOrder(newParm, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if(code==0){
|
||||
if (code == 0) {
|
||||
try {
|
||||
org.json.JSONObject jsonObject=new org.json.JSONObject(info[0]);
|
||||
String redirectUrl=jsonObject.getString("redirectUrl");
|
||||
org.json.JSONObject jsonObject = new org.json.JSONObject(info[0]);
|
||||
String redirectUrl = jsonObject.getString("redirectUrl");
|
||||
open(redirectUrl);
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -237,66 +241,68 @@ public class PayPresenter {
|
||||
});
|
||||
}
|
||||
|
||||
public void open(String url){
|
||||
public void open(String url) {
|
||||
//支付时内部跳转 false要添加
|
||||
WebViewActivity.forward(mActivity,url,false,false);
|
||||
WebViewActivity.forward(mActivity, url, false, false);
|
||||
}
|
||||
|
||||
|
||||
private void hwPay(String orderParams) {
|
||||
String newParm= StringUtil.contact("Charge.getCashierOrder",orderParams,"&type=android",
|
||||
"&appname=",mActivity.getString(R.string.app_name),
|
||||
"&desc="+mActivity.getPackageName()+"&source=android"
|
||||
String newParm = StringUtil.contact("Charge.getCashierOrder", orderParams, "&type=android",
|
||||
"&appname=", mActivity.getString(R.string.app_name),
|
||||
"&desc=" + mActivity.getPackageName() + "&source=android"
|
||||
);
|
||||
//L.e("《==》支付URL--->" +newParm);
|
||||
CommonHttpUtil.getWxH5Order(newParm, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if(code==0){
|
||||
if (code == 0) {
|
||||
try {
|
||||
org.json.JSONObject jsonObject=new org.json.JSONObject(info[0]);
|
||||
String payment_url=jsonObject.getString("payment_url");
|
||||
org.json.JSONObject jsonObject = new org.json.JSONObject(info[0]);
|
||||
String payment_url = jsonObject.getString("payment_url");
|
||||
open(payment_url);
|
||||
// L.e("《==》支付URL--->" +payment_url);
|
||||
// L.e("《==》支付URL--->" +payment_url);
|
||||
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
private void otherPay(String orderParams,String payType) {
|
||||
String newParm= StringUtil.contact("Charge.getOtherPayOrder",orderParams,"&type=android",
|
||||
"&appname=",mActivity.getString(R.string.app_name),
|
||||
"&desc="+mActivity.getPackageName()+"&source=android&payType="+payType
|
||||
|
||||
private void otherPay(String orderParams, String payType) {
|
||||
String newParm = StringUtil.contact("Charge.getOtherPayOrder", orderParams, "&type=android",
|
||||
"&appname=", mActivity.getString(R.string.app_name),
|
||||
"&desc=" + mActivity.getPackageName() + "&source=android&payType=" + payType
|
||||
);
|
||||
CommonHttpUtil.getWxH5Order(newParm, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if(code==0){
|
||||
if (code == 0) {
|
||||
try {
|
||||
org.json.JSONObject jsonObject=new org.json.JSONObject(info[0]);
|
||||
String payment_url=jsonObject.getString("payment_url");
|
||||
org.json.JSONObject jsonObject = new org.json.JSONObject(info[0]);
|
||||
String payment_url = jsonObject.getString("payment_url");
|
||||
open(payment_url);
|
||||
// L.e("《==》支付URL--->" +payment_url);
|
||||
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付宝支付
|
||||
*/
|
||||
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;
|
||||
}
|
||||
// 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;
|
||||
// }
|
||||
if (TextUtils.isEmpty(mAliPartner) || TextUtils.isEmpty(mAliSellerId) || TextUtils.isEmpty(mAliPrivateKey)) {
|
||||
@ -321,7 +327,7 @@ public class PayPresenter {
|
||||
return;
|
||||
}
|
||||
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;
|
||||
}
|
||||
if (TextUtils.isEmpty(mWxAppID)) {
|
||||
@ -351,12 +357,12 @@ public class PayPresenter {
|
||||
long goldValue = Long.parseLong(goldCoin);
|
||||
if (balanceValue > mBalanceValue) {
|
||||
mBalanceValue = balanceValue;
|
||||
ToastUtil.show(R.string.coin_charge_success);
|
||||
ToastUtil.show(mActivity.getString(R.string.coin_charge_success));
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
if (u != null) {
|
||||
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
|
||||
public void onSetupSuccess(boolean isSelf) {
|
||||
super.onSetupSuccess(isSelf);
|
||||
Log.d(TAG,"内购服务初始化完成");
|
||||
Log.d(TAG, "内购服务初始化完成");
|
||||
checkSubs();
|
||||
}
|
||||
|
||||
@ -393,30 +399,30 @@ public class PayPresenter {
|
||||
// }
|
||||
// googleBillingUtil.purchaseInApp(mActivity,"zs640");
|
||||
|
||||
googleBillingUtil.purchaseInApp(mActivity,googleBillingUtil.getInAppSkuByPosition(0));
|
||||
googleBillingUtil.purchaseInApp(mActivity, googleBillingUtil.getInAppSkuByPosition(0));
|
||||
|
||||
// Log.d(TAG,tempBuffer.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPurchaseSuccess(@NonNull Purchase purchase, boolean isSelf) {
|
||||
StringBuffer tempBuffer =new StringBuffer();
|
||||
if(purchase.getPurchaseState()==Purchase.PurchaseState.PURCHASED){
|
||||
StringBuffer tempBuffer = new StringBuffer();
|
||||
if (purchase.getPurchaseState() == Purchase.PurchaseState.PURCHASED) {
|
||||
tempBuffer.append("购买成功:");
|
||||
//通知自己服务器
|
||||
if (mOrderid == null || purchase.getOrderId() == null){
|
||||
if (mOrderid == null || purchase.getOrderId() == null) {
|
||||
return false;
|
||||
}
|
||||
String allData="";
|
||||
allData="OrderId=" +purchase.getOrderId()+
|
||||
",PackageName="+purchase.getPackageName() +
|
||||
",Sku=" +"purchase.getSku()"+
|
||||
",PurchaseTime=" +purchase.getPurchaseTime()+
|
||||
",PurchaseToken=" +purchase.getPurchaseToken()+
|
||||
",DeveloperPayload=" +purchase.getDeveloperPayload()+
|
||||
",OriginalJson=" +purchase.getOriginalJson()+
|
||||
",PurchaseState=" +purchase.getPurchaseState()+
|
||||
",Signature="+purchase.getSignature();
|
||||
String allData = "";
|
||||
allData = "OrderId=" + purchase.getOrderId() +
|
||||
",PackageName=" + purchase.getPackageName() +
|
||||
",Sku=" + "purchase.getSku()" +
|
||||
",PurchaseTime=" + purchase.getPurchaseTime() +
|
||||
",PurchaseToken=" + purchase.getPurchaseToken() +
|
||||
",DeveloperPayload=" + purchase.getDeveloperPayload() +
|
||||
",OriginalJson=" + purchase.getOriginalJson() +
|
||||
",PurchaseState=" + purchase.getPurchaseState() +
|
||||
",Signature=" + purchase.getSignature();
|
||||
// CommonHttpUtil.notifyGoogle("1",mOrderid,purchase.getOrderId(),allData, new HttpCallback() {
|
||||
// @Override
|
||||
// public void onSuccess(int code, String msg, String[] info) {
|
||||
@ -433,22 +439,21 @@ public class PayPresenter {
|
||||
// });
|
||||
|
||||
|
||||
}else{
|
||||
} else {
|
||||
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);
|
||||
Log.d(TAG,tempBuffer.toString());
|
||||
return true ;//自动消耗(只有当isSelf为true,并且支付状态为PURCHASED时,该值才会生效)
|
||||
Log.d(TAG, tempBuffer.toString());
|
||||
return true;//自动消耗(只有当isSelf为true,并且支付状态为PURCHASED时,该值才会生效)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onRecheck(@NonNull String skuType, @NonNull Purchase purchase, boolean isSelf) {
|
||||
StringBuffer tempBuffer =new StringBuffer();
|
||||
StringBuffer tempBuffer = new StringBuffer();
|
||||
tempBuffer.append("检测到未处理的订单($skuType):${purchase.sku}()");
|
||||
Log.d(TAG,tempBuffer.toString());
|
||||
Log.d(TAG, tempBuffer.toString());
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -459,43 +464,43 @@ public class PayPresenter {
|
||||
|
||||
@Override
|
||||
public void onConsumeSuccess(@NonNull String purchaseToken, boolean isSelf) {
|
||||
Log.d(TAG,"消耗商品成功:$purchaseToken");
|
||||
Log.d(TAG, "消耗商品成功:$purchaseToken");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAcknowledgePurchaseSuccess(boolean isSelf) {
|
||||
Log.d(TAG,"确认购买商品成功");
|
||||
Log.d(TAG, "确认购买商品成功");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
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
|
||||
public void onError(@NonNull GoogleBillingUtil.GoogleBillingListenerTag tag, boolean isSelf) {
|
||||
Log.d(TAG,"发生错误:tag="+tag.name());
|
||||
Log.d(TAG, "发生错误:tag=" + tag.name());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
private void checkSubs() {
|
||||
int size = googleBillingUtil.getPurchasesSizeSubs(mActivity);
|
||||
switch (size){
|
||||
switch (size) {
|
||||
case 0:
|
||||
//不具备有效订阅
|
||||
Log.d(TAG,"有效订阅数:0(无有效订阅)");
|
||||
Log.d(TAG, "有效订阅数:0(无有效订阅)");
|
||||
break;
|
||||
case -1:
|
||||
//查询失败
|
||||
Log.d(TAG,"有效订阅数:-1(查询失败)");
|
||||
Log.d(TAG, "有效订阅数:-1(查询失败)");
|
||||
break;
|
||||
default:
|
||||
//具有有效订阅
|
||||
Log.d(TAG,"有效订阅数:$size(具备有效订阅)");
|
||||
Log.d(TAG, "有效订阅数:$size(具备有效订阅)");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -504,7 +509,7 @@ public class PayPresenter {
|
||||
mActivity = null;
|
||||
mPayCallback = null;
|
||||
|
||||
if (googleBillingUtil != null){
|
||||
if (googleBillingUtil != null) {
|
||||
googleBillingUtil.onDestroy(mActivity);
|
||||
//退出程序的时候可以调用(实验性)
|
||||
GoogleBillingUtil.endConnection();
|
||||
|
@ -80,12 +80,12 @@ public class WxPayBuilder {
|
||||
// req.sign = sign;
|
||||
// IWXAPI wxApi = WxApiWrapper.getInstance().getWxApi();
|
||||
// if (wxApi == null) {
|
||||
// ToastUtil.show(R.string.coin_charge_failed);
|
||||
// ToastUtil.show(mContext.getString(R.string.coin_charge_failed);
|
||||
// return;
|
||||
// }
|
||||
// boolean result = wxApi.sendReq(req);
|
||||
// if (!result) {
|
||||
// ToastUtil.show(R.string.coin_charge_failed);
|
||||
// ToastUtil.show(mContext.getString(R.string.coin_charge_failed);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ public class ProcessImageUtil extends ProcessResultUtil {
|
||||
|
||||
@Override
|
||||
public void onFailure() {
|
||||
ToastUtil.show(R.string.img_camera_cancel);
|
||||
ToastUtil.show(mContext.getString(R.string.img_camera_cancel));
|
||||
}
|
||||
};
|
||||
mAlumbResultCallback = new ActivityResultCallback() {
|
||||
@ -103,7 +103,7 @@ public class ProcessImageUtil extends ProcessResultUtil {
|
||||
|
||||
@Override
|
||||
public void onFailure() {
|
||||
ToastUtil.show(R.string.img_alumb_cancel);
|
||||
ToastUtil.show(mContext.getString(R.string.img_alumb_cancel));
|
||||
}
|
||||
};
|
||||
mCropResultCallback = new ActivityResultCallback() {
|
||||
@ -116,7 +116,7 @@ public class ProcessImageUtil extends ProcessResultUtil {
|
||||
|
||||
@Override
|
||||
public void onFailure() {
|
||||
ToastUtil.show(R.string.img_crop_cancel);
|
||||
ToastUtil.show(mContext.getString(R.string.img_crop_cancel));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
@ -43,7 +44,7 @@ public class ToastUtil {
|
||||
|
||||
|
||||
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){
|
||||
if(BuildConfig.DEBUG){
|
||||
show(s);
|
||||
show("开发模式:"+s);
|
||||
}
|
||||
}
|
||||
|
||||
public static void show(String s) {
|
||||
if (TextUtils.isEmpty(s)) {
|
||||
return;
|
||||
|
@ -179,7 +179,7 @@ public class CustomDrawerPopupView extends DrawerPopupView {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(mContext.getString(R.string.net_error));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class DrawerTaskChildViewHolder extends RecyclerView.ViewHolder {
|
||||
@ -110,7 +111,7 @@ public class DrawerTaskChildViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -13,6 +13,7 @@ import com.yunbao.common.bean.ListInfoMessageModel;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.OnRecyclerViewScrollListener;
|
||||
|
||||
import java.util.List;
|
||||
@ -68,7 +69,7 @@ public class LiveAnchorMessageCustomPopup extends BottomPopupView {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show( R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -116,9 +116,9 @@ public class LiveClarityCustomPopup extends BottomPopupView implements View.OnCl
|
||||
ViewClicksAntiShake.clicksAntiShake(lineHd, () -> {
|
||||
if (lineHd.getTag() != null) {
|
||||
if (isUser) {//用户端
|
||||
ToastUtil.show(R.string.live_user_ban_hd);
|
||||
ToastUtil.show(getContext().getString(R.string.live_user_ban_hd));
|
||||
} else {//主播端
|
||||
ToastUtil.show(R.string.function_is_suspended);
|
||||
ToastUtil.show(getContext().getString(R.string.function_is_suspended));
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -151,9 +151,9 @@ public class LiveClarityCustomPopup extends BottomPopupView implements View.OnCl
|
||||
ViewClicksAntiShake.clicksAntiShake(lineFhd, () -> {
|
||||
if (lineFhd.getTag() != null) {
|
||||
if (isUser) {//用户端
|
||||
ToastUtil.show(R.string.live_user_ban_fhd);
|
||||
ToastUtil.show(getContext().getString(R.string.live_user_ban_fhd));
|
||||
} else {//主播端
|
||||
ToastUtil.show(R.string.function_is_suspended);
|
||||
ToastUtil.show(getContext().getString(R.string.function_is_suspended));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@ -166,7 +167,7 @@ public class LiveNewWishGiftPopup extends BottomPopupView {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -326,7 +326,7 @@ public class LiveNewWishListPopup extends BottomPopupView {
|
||||
List<WishModel2> wishList2 = new ArrayList<>();
|
||||
Gson gson = new Gson();
|
||||
if (wishList2.size()>10){
|
||||
ToastUtil.show(R.string.must_hint);
|
||||
ToastUtil.show(mContext.getString(R.string.must_hint));
|
||||
return;
|
||||
}
|
||||
LiveNetManager.get(getContext()).
|
||||
@ -338,7 +338,7 @@ public class LiveNewWishListPopup extends BottomPopupView {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
}))
|
||||
|
@ -195,7 +195,7 @@ public class LiveOpenCustomPopup extends CenterPopupView {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -24,6 +24,7 @@ import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
@ -130,7 +131,7 @@ public class LiveRobotMessageCustomPopup extends BottomPopupView {
|
||||
}
|
||||
});
|
||||
} 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
|
||||
public void onError(String error) {
|
||||
ToastUtil.show( R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
@ -125,7 +126,7 @@ public class LiveRobotSayHelloCustomPopup extends BottomPopupView {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show( R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import com.yunbao.common.bean.LiveAiRobotBean;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
public class LiveRobotSettingCustomPopup extends BottomPopupView implements View.OnClickListener {
|
||||
private static String TAG = "AI机器人";
|
||||
@ -251,7 +252,7 @@ public class LiveRobotSettingCustomPopup extends BottomPopupView implements View
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show( R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -16,6 +16,7 @@ import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
|
||||
public class RobotMessageViewHolder extends RecyclerView.ViewHolder {
|
||||
@ -44,7 +45,7 @@ public class RobotMessageViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show( R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
public class RobotSayHelloViewHoler extends RecyclerView.ViewHolder {
|
||||
private TextView serialNumber, messageText;
|
||||
@ -44,7 +45,7 @@ public class RobotSayHelloViewHoler extends RecyclerView.ViewHolder {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show( R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -191,7 +191,7 @@
|
||||
<string name="live_wrap">Pack</string>
|
||||
<string name="guard_list">Guardian list</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_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>
|
||||
|
@ -191,7 +191,7 @@
|
||||
<string name="live_wrap">Pack</string>
|
||||
<string name="guard_list">Guardian list</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_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>
|
||||
|
@ -1331,7 +1331,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e("LiveUserMoreDialog", error);
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -159,7 +159,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
|
||||
@Override
|
||||
public void onPushFailed() {
|
||||
//推流失败回调
|
||||
ToastUtil.show(R.string.live_push_failed);
|
||||
ToastUtil.show(mContext.getString(R.string.live_push_failed));
|
||||
}
|
||||
});
|
||||
mLivePushViewHolder.addToParent();
|
||||
@ -370,7 +370,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
|
||||
*/
|
||||
private void openMusicWindow() {
|
||||
if (isLinkMicAnchor() || isLinkMicAnchor()) {
|
||||
ToastUtil.show(R.string.link_mic_not_bgm);
|
||||
ToastUtil.show(mContext.getString(R.string.link_mic_not_bgm));
|
||||
return;
|
||||
}
|
||||
LiveMusicDialogFragment fragment = new LiveMusicDialogFragment();
|
||||
@ -442,7 +442,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
|
||||
*/
|
||||
private void openGameWindow() {
|
||||
if (isLinkMic() || isLinkMicAnchor()) {
|
||||
ToastUtil.show(R.string.live_link_mic_cannot_game);
|
||||
ToastUtil.show(mContext.getString(R.string.live_link_mic_cannot_game));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -739,7 +739,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
public void onLiveRoomChangeEvent(LiveRoomChangeEvent e) {
|
||||
LiveBean liveBean = e.getLiveBean();
|
||||
if (TextUtils.equals(mLiveUid, liveBean.getUid())) {
|
||||
ToastUtil.show(R.string.current_live_room);
|
||||
ToastUtil.show(mContext.getString(R.string.current_live_room));
|
||||
} else {
|
||||
if (e.isLiveEnd()) {
|
||||
manager.removeLiveEnd();
|
||||
@ -1594,7 +1594,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -104,7 +104,7 @@ public class LiveReportActivity extends AbsActivity implements LiveReportAdapter
|
||||
// return;
|
||||
// }
|
||||
// if (bean == null) {
|
||||
// ToastUtil.show(R.string.video_report_tip_3);
|
||||
// ToastUtil.show(mContext.getString(R.string.video_report_tip_3);
|
||||
// return;
|
||||
// }
|
||||
// String content = bean.getName();
|
||||
@ -120,7 +120,7 @@ public class LiveReportActivity extends AbsActivity implements LiveReportAdapter
|
||||
mToUid = "";
|
||||
}
|
||||
if (bean == null) {
|
||||
ToastUtil.show(R.string.video_report_tip_3);
|
||||
ToastUtil.show(mContext.getString(R.string.video_report_tip_3));
|
||||
return;
|
||||
}
|
||||
String content = "";
|
||||
@ -137,7 +137,7 @@ public class LiveReportActivity extends AbsActivity implements LiveReportAdapter
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
ToastUtil.show(R.string.video_report_tip_4);
|
||||
ToastUtil.show(mContext.getString(R.string.video_report_tip_4));
|
||||
onBackPressed();
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
@ -149,7 +149,7 @@ public class LiveReportActivity extends AbsActivity implements LiveReportAdapter
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
ToastUtil.show(R.string.video_report_tip_4);
|
||||
ToastUtil.show(mContext.getString(R.string.video_report_tip_4));
|
||||
onBackPressed();
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
|
@ -288,7 +288,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
@Override
|
||||
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() {
|
||||
if (isLinkMicAnchor() || isLinkMicAnchor()) {
|
||||
ToastUtil.show(R.string.link_mic_not_bgm);
|
||||
ToastUtil.show(mContext.getString(R.string.link_mic_not_bgm));
|
||||
return;
|
||||
}
|
||||
LiveMusicDialogFragment fragment = new LiveMusicDialogFragment();
|
||||
@ -736,7 +736,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
*/
|
||||
private void openGameWindow() {
|
||||
if (isLinkMic() || isLinkMicAnchor()) {
|
||||
ToastUtil.show(R.string.live_link_mic_cannot_game);
|
||||
ToastUtil.show(mContext.getString(R.string.live_link_mic_cannot_game));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1773,7 +1773,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -344,7 +344,7 @@ public class LiveTRTCAnchorActivity extends TRTCBaseActivity {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
ToastUtil.show(R.string.live_set_pwd_empty);
|
||||
ToastUtil.show(getString(R.string.live_set_pwd_empty));
|
||||
} else {
|
||||
mLiveType = bean.getId();
|
||||
mLiveTypeTextView.setText(bean.getName());
|
||||
|
@ -118,11 +118,11 @@ public class FreePkRecyclerAdapter extends RefreshAdapter<RandomPkUserBean> {
|
||||
mPkStatus.setOnClickListener(v -> {
|
||||
RandomPkUserBean bean = (RandomPkUserBean) itemView.getTag();
|
||||
if (bean.isPk()) {
|
||||
ToastUtil.show(R.string.free_pk_user_pking);
|
||||
ToastUtil.show(mContext.getString(R.string.free_pk_user_pking));
|
||||
return;
|
||||
}
|
||||
if (freePkNum == 0 && mDrPkNum == -1) {
|
||||
ToastUtil.show(R.string.free_pk_num_null);
|
||||
ToastUtil.show(mContext.getString(R.string.free_pk_num_null));
|
||||
// return;
|
||||
}
|
||||
|
||||
@ -172,10 +172,10 @@ public class FreePkRecyclerAdapter extends RefreshAdapter<RandomPkUserBean> {
|
||||
public void onSuccess(SetAttentsModel data) {
|
||||
bean.setAttention(data.getIsattent());
|
||||
if ("1".equals(data.getIsattent())) {
|
||||
ToastUtil.show(R.string.following);
|
||||
ToastUtil.show(mContext.getString(R.string.following));
|
||||
mOnItemClickListener.onItemClick(bean, 1);
|
||||
} else {
|
||||
ToastUtil.show(R.string.unfollow_cancel);
|
||||
ToastUtil.show(mContext.getString(R.string.unfollow_cancel));
|
||||
mOnItemClickListener.onItemClick(bean, 0);
|
||||
}
|
||||
|
||||
@ -183,7 +183,7 @@ public class FreePkRecyclerAdapter extends RefreshAdapter<RandomPkUserBean> {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -174,7 +174,7 @@ public class LiveNewWishListAdapter extends RecyclerView.Adapter<LiveNewWishList
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
ToastUtil.show(R.string.live_set_wishlist_num);
|
||||
ToastUtil.show(mContext.getString(R.string.live_set_wishlist_num));
|
||||
} else {
|
||||
int num;
|
||||
if (StringUtil.isInt(content)) {
|
||||
|
@ -173,7 +173,7 @@ public class LiveWishListAdapter extends RecyclerView.Adapter<LiveWishListAdapte
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
ToastUtil.show(R.string.live_set_wishlist_num);
|
||||
ToastUtil.show(mContext.getString(R.string.live_set_wishlist_num));
|
||||
} else {
|
||||
int num;
|
||||
if (StringUtil.isInt(content)) {
|
||||
|
@ -140,7 +140,7 @@ public class UserMoreInfoAdapter extends RefreshAdapter<UserBean> {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
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 {
|
||||
((LiveActivity) mContext).showUserDialog(bean.getId());
|
||||
fragments.dismiss();
|
||||
|
@ -179,7 +179,7 @@ public class FreePkDialogFragment extends AbsDialogFragment implements View.OnCl
|
||||
|
||||
@Override
|
||||
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));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -119,11 +119,11 @@ public class LiveAnchorEditCallMeDialog extends AbsDialogPopupWindow {
|
||||
status.setTag(0);
|
||||
status.setOnClickListener(v -> {
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
int tag = (int) v.getTag();
|
||||
|
@ -89,7 +89,7 @@ public class LiveDataInfoDialog extends AbsDialogPopupWindow {
|
||||
|
||||
@Override
|
||||
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));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -137,7 +137,7 @@ public class LiveFansFragment extends AbsDialogFragment {
|
||||
} else if (TextUtils.equals(event.getMethod(), "sendFansCard")) {
|
||||
if (LiveRoomViewHolder.mBtnFollow != null && LiveRoomViewHolder.mBtnFollow.getVisibility() == View.VISIBLE) {
|
||||
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");
|
||||
|
@ -206,7 +206,7 @@ public class LiveGameDialogFragment extends AbsDialogFragment {
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.i("debug", "onError: " + error);
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
@ -401,7 +401,7 @@ public class LiveGameDialogFragment extends AbsDialogFragment {
|
||||
return;
|
||||
}
|
||||
if (TextUtils.equals(roomId, event.getLiveId())) {
|
||||
ToastUtil.show(R.string.current_live_room);
|
||||
ToastUtil.show(mContext.getString(R.string.current_live_room));
|
||||
dismiss();
|
||||
} else {
|
||||
//看直播
|
||||
|
@ -913,7 +913,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ToastUtil.show(R.string.only_one);
|
||||
ToastUtil.show(mContext.getString(R.string.only_one));
|
||||
}
|
||||
} else {
|
||||
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 (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;
|
||||
}
|
||||
}
|
||||
|
@ -384,7 +384,7 @@ public class LiveGiftDialogFragment4Wishlist extends AbsDialogFragment implement
|
||||
// }
|
||||
// if (mLiveGuardInfo != null) {
|
||||
// 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;
|
||||
// }
|
||||
// }
|
||||
|
@ -715,7 +715,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ToastUtil.show(com.yunbao.live.R.string.only_one);
|
||||
ToastUtil.show(mContext.getString(com.yunbao.live.R.string.only_one));
|
||||
}
|
||||
} else {
|
||||
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream) || liveGiftModel == null) {
|
||||
@ -723,7 +723,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
}
|
||||
if (mLiveGuardInfo != null) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -350,7 +350,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
||||
return;
|
||||
}
|
||||
if (TextUtils.equals(roomId, event.getLiveId())) {
|
||||
ToastUtil.show(R.string.current_live_room);
|
||||
ToastUtil.show(mContext.getString(R.string.current_live_room));
|
||||
dismiss();
|
||||
} else {
|
||||
//看直播
|
||||
|
@ -40,6 +40,7 @@ import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
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.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
@ -222,7 +223,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
|
||||
private void sendMessage() {
|
||||
String content = mInput.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
ToastUtil.show(R.string.cannot_be_empty);
|
||||
ToastUtil.show(mContext.getString(R.string.cannot_be_empty));
|
||||
return;
|
||||
}
|
||||
switch (messageType) {
|
||||
@ -244,7 +245,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ToastUtil.show(R.string.enough_speakers);
|
||||
ToastUtil.show(mContext.getString(R.string.enough_speakers));
|
||||
// dismiss();
|
||||
}
|
||||
|
||||
@ -384,7 +385,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -302,7 +302,7 @@ public class LiveLinkMicListDialogFragment extends AbsDialogFragment implements
|
||||
private void searchOnLineAnchor() {
|
||||
String key = mEditText.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(key)) {
|
||||
ToastUtil.show(R.string.content_empty);
|
||||
ToastUtil.show(mContext.getString(R.string.content_empty));
|
||||
return;
|
||||
}
|
||||
LiveHttpUtil.cancel(LiveHttpConsts.LIVE_PK_SEARCH_ANCHOR);
|
||||
|
@ -26,6 +26,7 @@ import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.LivePrankRecyclerAdapter;
|
||||
|
||||
@ -288,7 +289,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -223,11 +223,11 @@ public class LiveRedPackSendDialogFragment extends AbsDialogFragment implements
|
||||
count = mEditCountPj.getText().toString().trim();
|
||||
}
|
||||
if (TextUtils.isEmpty(coin)) {
|
||||
ToastUtil.show(R.string.red_pack_7);
|
||||
ToastUtil.show(mContext.getString(R.string.red_pack_7));
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(count)) {
|
||||
ToastUtil.show(R.string.red_pack_8);
|
||||
ToastUtil.show(mContext.getString(R.string.red_pack_8));
|
||||
return;
|
||||
}
|
||||
String title = mEditTitle.getText().toString().trim();
|
||||
|
@ -174,7 +174,7 @@ public class LiveTaskDialog extends AbsDialogPopupWindow {
|
||||
if (loadDialog != null) {
|
||||
loadDialog.dismiss();
|
||||
}
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ public class LiveTotalDialog extends AbsDialogFragment {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show( R.string.net_error);
|
||||
ToastUtil.show( mContext.getString(R.string.net_error));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -197,7 +197,7 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ public class ResultRendPacketPopup extends CenterPopupView {
|
||||
}
|
||||
|
||||
} else {
|
||||
ToastUtil.show(R.string.no_data);
|
||||
ToastUtil.show(getContext().getString(R.string.no_data));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -255,7 +255,7 @@ public class LiveMusicDialogFragment extends AbsDialogFragment implements View.O
|
||||
});
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show(R.string.music_url_empty);
|
||||
ToastUtil.show(mContext.getString(R.string.music_url_empty));
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
|
@ -128,7 +128,7 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
|
||||
playUrl = mPlayUrl;
|
||||
}
|
||||
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 (((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);
|
||||
} else {
|
||||
LiveHttpUtil.livePkCheckLive(mApplyUid, mApplyStream, mSelfStream, new HttpCallback() {
|
||||
@ -330,7 +330,7 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
|
||||
mLiveLinkMicPlayViewHolder.addToParent();
|
||||
mLiveLinkMicPlayViewHolder.play(playUrl);
|
||||
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);
|
||||
if (mLiveSdk == Constants.LIVE_SDK_TX) {
|
||||
//主播混流
|
||||
@ -376,7 +376,7 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
|
||||
mApplyUid = null;
|
||||
mApplyStream = null;
|
||||
mPkUid = null;
|
||||
ToastUtil.show(R.string.link_mic_anchor_close);
|
||||
ToastUtil.show(mContext.getString(R.string.link_mic_anchor_close));
|
||||
if (mIsAnchor) {
|
||||
((LiveAnchorActivity) mContext).setPkBtnVisible(false);
|
||||
if (mLiveSdk == Constants.LIVE_SDK_TX) {
|
||||
@ -390,7 +390,7 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
|
||||
*/
|
||||
public void onLinkMicAnchorRefuse() {
|
||||
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() {
|
||||
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() {
|
||||
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() {
|
||||
@ -442,15 +442,15 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
|
||||
*/
|
||||
public boolean canOpenLinkMicAnchor() {
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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 true;
|
||||
|
@ -320,16 +320,16 @@ public class LiveLinkMicPkPresenter implements View.OnClickListener {
|
||||
*/
|
||||
public void applyLinkMicPk(String pkUid, String stream) {
|
||||
if (mPkSend) {
|
||||
ToastUtil.show(R.string.link_mic_apply_waiting);
|
||||
ToastUtil.show(mContext.getString(R.string.link_mic_apply_waiting));
|
||||
return;
|
||||
}
|
||||
if (mIsPk) {
|
||||
ToastUtil.show(R.string.live_link_mic_cannot_pk);
|
||||
ToastUtil.show(mContext.getString(R.string.live_link_mic_cannot_pk));
|
||||
return;
|
||||
}
|
||||
mPkSend = true;
|
||||
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) {
|
||||
mLiveLinkMicPkViewHolder = new LiveLinkMicPkViewHolder(mContext, mPkContainer);
|
||||
@ -1119,7 +1119,7 @@ public class LiveLinkMicPkPresenter implements View.OnClickListener {
|
||||
if (mIsAnchor) {
|
||||
((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) {
|
||||
((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) {
|
||||
((LiveAnchorActivity) mContext).setPkBtnVisible(true);
|
||||
}
|
||||
ToastUtil.show(R.string.link_mic_anchor_busy_2);
|
||||
ToastUtil.show(mContext.getString(R.string.link_mic_anchor_busy_2));
|
||||
}
|
||||
|
||||
|
||||
|
@ -254,7 +254,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
public void onAnchorAcceptLinkMic() {
|
||||
if (!mIsAnchor) {
|
||||
mLastApplyLinkMicTime = 0;
|
||||
ToastUtil.show(R.string.link_mic_anchor_accept);
|
||||
ToastUtil.show(mContext.getString(R.string.link_mic_anchor_accept));
|
||||
mIsLinkMic = true;
|
||||
mLinkMicUid = CommonAppConfig.getInstance().getUid();
|
||||
if (mLinkMicTip != null) {
|
||||
@ -304,7 +304,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
*/
|
||||
public void onAnchorRefuseLinkMic() {
|
||||
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() {
|
||||
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() {
|
||||
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() {
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
if (mIsLinkMic) {
|
||||
@ -580,7 +580,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
private void audienceApplyLinkMic() {
|
||||
long curTime = System.currentTimeMillis();
|
||||
if (curTime - mLastApplyLinkMicTime < 11000) {//时间间隔11秒
|
||||
ToastUtil.show(R.string.link_mic_apply_waiting);
|
||||
ToastUtil.show(mContext.getString(R.string.link_mic_apply_waiting));
|
||||
} else {
|
||||
mLastApplyLinkMicTime = curTime;
|
||||
//请求权限
|
||||
@ -607,7 +607,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
@Override
|
||||
public void run() {
|
||||
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 (((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);
|
||||
return;
|
||||
}
|
||||
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;
|
||||
}
|
||||
SocketLinkMicUtil.anchorAcceptLinkMic(mSocketClient, mApplyUid);
|
||||
|
@ -489,16 +489,16 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
*/
|
||||
public void applyLinkMicPk(String pkUid, String stream) {
|
||||
if (mPkSend) {
|
||||
ToastUtil.show(R.string.link_mic_apply_waiting);
|
||||
ToastUtil.show(mContext.getString(R.string.link_mic_apply_waiting));
|
||||
return;
|
||||
}
|
||||
if (mIsPk) {
|
||||
ToastUtil.show(R.string.live_link_mic_cannot_pk);
|
||||
ToastUtil.show(mContext.getString(R.string.live_link_mic_cannot_pk));
|
||||
return;
|
||||
}
|
||||
mPkSend = true;
|
||||
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) {
|
||||
mLiveLinkMicPkViewHolder = new LiveLinkMicPkViewHolder(mContext, mPkContainer);
|
||||
@ -1697,7 +1697,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
|
||||
@Override
|
||||
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) {
|
||||
((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) {
|
||||
((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) {
|
||||
((LiveRyAnchorActivity) mContext).setPkBtnVisible(true);
|
||||
}
|
||||
ToastUtil.show(R.string.link_mic_anchor_busy_2);
|
||||
ToastUtil.show(mContext.getString(R.string.link_mic_anchor_busy_2));
|
||||
}
|
||||
|
||||
|
||||
|
@ -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"));
|
||||
ClipData clipData = ClipData.newPlainText("text", link);
|
||||
cm.setPrimaryClip(clipData);
|
||||
ToastUtil.show(R.string.copy_success);
|
||||
ToastUtil.show(mContext.getString(com.yunbao.common.R.string.copy_success));
|
||||
}
|
||||
|
||||
|
||||
|
@ -25,6 +25,7 @@ import com.yunbao.common.manager.NewLevelManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.bean.LiveBuyGuardMsgBean;
|
||||
@ -409,7 +410,7 @@ public class SocketClient {
|
||||
String msgtype = map.getString("msgtype");
|
||||
if ("2".equals(msgtype)) {//发言,点亮
|
||||
if ("409002".equals(received.getRetcode())) {
|
||||
ToastUtil.show(R.string.live_you_are_shut);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"你已經被禁言":"You\'ve been banned");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ public class SocketRyChatUtil {
|
||||
public void onError(Message message, RongIMClient.ErrorCode errorCode) {
|
||||
Log.e("tx", "aaa" + errorCode.toString());
|
||||
if (errorCode.code == 23408) {
|
||||
ToastUtil.show(R.string.live_ban_tip);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"您已被禁言":"You have been banned");
|
||||
} else {
|
||||
ToastUtil.show(errorCode.code + ":" + errorCode.msg);
|
||||
}
|
||||
@ -257,7 +257,7 @@ public class SocketRyChatUtil {
|
||||
public void onError(Message message, RongIMClient.ErrorCode errorCode) {
|
||||
Log.e("tx", "aaa" + errorCode.toString());
|
||||
if (errorCode.code == 23408) {
|
||||
ToastUtil.show(R.string.live_ban_tip);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"您已被禁言":"You have been banned");
|
||||
} else {
|
||||
ToastUtil.show(errorCode.code + ":" + errorCode.msg);
|
||||
}
|
||||
|
@ -865,7 +865,7 @@ public class SocketRyClient {
|
||||
String msgtype = map.getString("msgtype");
|
||||
if ("2".equals(msgtype)) {//发言,点亮
|
||||
if ("409002".equals(received.getRetcode())) {
|
||||
ToastUtil.show(R.string.live_you_are_shut);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"你已經被禁言":"You\'ve been banned");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.AbsMainViewHolder;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.MyTUIConversationFragment;
|
||||
@ -180,7 +181,7 @@ public class ChatListViewHolder extends AbsMainViewHolder implements View.OnClic
|
||||
mSystemMsgRedPoint.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
// ImMessageUtil.getInstance().markAllConversationAsRead();
|
||||
ToastUtil.show(R.string.im_msg_ignore_unread_2);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"已忽略未讀消息":"Unread message ignored");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ public class LiveAddImpressViewHolder extends AbsLivePageViewHolder {
|
||||
addId(mtv.getBean().getId());
|
||||
mChanged = true;
|
||||
} else {
|
||||
ToastUtil.show(R.string.impress_add_max);
|
||||
ToastUtil.show(mContext.getString(R.string.impress_add_max));
|
||||
}
|
||||
} else {
|
||||
removeId(mtv.getBean().getId());
|
||||
@ -168,11 +168,11 @@ public class LiveAddImpressViewHolder extends AbsLivePageViewHolder {
|
||||
|
||||
private void save() {
|
||||
if (mLinkedList.size() == 0) {
|
||||
ToastUtil.show(R.string.impress_please_choose);
|
||||
ToastUtil.show(mContext.getString(R.string.impress_please_choose));
|
||||
return;
|
||||
}
|
||||
if (!mChanged) {
|
||||
ToastUtil.show(R.string.impress_not_changed);
|
||||
ToastUtil.show(mContext.getString(R.string.impress_not_changed));
|
||||
return;
|
||||
}
|
||||
String ids = "";
|
||||
|
@ -30,6 +30,7 @@ import com.yunbao.common.utils.MicStatusManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.AbsViewHolder;
|
||||
import com.yunbao.common.views.weight.ClipPathCircleImage;
|
||||
import com.yunbao.live.R;
|
||||
@ -200,7 +201,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -108,12 +108,12 @@ public class LiveLinkMicPushTxViewHolder extends AbsLiveLinkMicPushViewHolder im
|
||||
@Override
|
||||
public void onPushEvent(int e, Bundle bundle) {
|
||||
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) {
|
||||
mLivePushListener.onPushFailed();
|
||||
}
|
||||
} 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) {
|
||||
mLivePushListener.onPushFailed();
|
||||
}
|
||||
|
@ -388,7 +388,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
chooseLiveType();
|
||||
} else if (i == R.id.btn_start_live) {
|
||||
if (!selector) {
|
||||
ToastUtil.show(R.string.anchor_agreement_hint);
|
||||
ToastUtil.show(mContext.getString(R.string.anchor_agreement_hint));
|
||||
return;
|
||||
}
|
||||
if (mLiveClassID == 0) {
|
||||
@ -813,7 +813,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
ToastUtil.show(R.string.live_set_pwd_empty);
|
||||
ToastUtil.show(mContext.getString(R.string.live_set_pwd_empty));
|
||||
} else {
|
||||
mLiveType = bean.getId();
|
||||
mLiveTypeTextView.setText(WordUtil.isNewZh() ? "密碼房" : "password room");
|
||||
@ -835,7 +835,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
ToastUtil.show(R.string.live_set_fee_empty);
|
||||
ToastUtil.show(mContext.getString(R.string.live_set_fee_empty));
|
||||
} else {
|
||||
mLiveType = bean.getId();
|
||||
mLiveTypeTextView.setText(bean.getName());
|
||||
|
@ -265,7 +265,7 @@ public class LivePlayTxViewHolder_backup extends LiveRoomPlayViewHolder implemen
|
||||
playType = TXLivePlayer.PLAY_TYPE_VOD_MP4;
|
||||
}
|
||||
if (playType == -1) {
|
||||
ToastUtil.show(R.string.live_play_error_2);
|
||||
ToastUtil.show(mContext.getString(R.string.live_play_error_2));
|
||||
return;
|
||||
}
|
||||
if (mPlayer != null) {
|
||||
|
@ -414,7 +414,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
|
||||
|
||||
@Override
|
||||
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
|
||||
public void toggleFlash() {
|
||||
if (mCameraFront) {
|
||||
ToastUtil.show(R.string.live_open_flash);
|
||||
ToastUtil.show(mContext.getString(R.string.live_open_flash));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -999,10 +999,10 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
|
||||
@Override
|
||||
public void onPushEvent(int e, Bundle bundle) {
|
||||
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) {
|
||||
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) {
|
||||
L.e(TAG, "网络断开,推流失败------>");
|
||||
|
@ -269,7 +269,7 @@ public class LivePushTxViewHolder extends AbsLivePushViewHolder implements ITXLi
|
||||
@Override
|
||||
public void toggleFlash() {
|
||||
if (mCameraFront) {
|
||||
ToastUtil.show(R.string.live_open_flash);
|
||||
ToastUtil.show(mContext.getString(R.string.live_open_flash));
|
||||
return;
|
||||
}
|
||||
// if (mLivePusher != null) {
|
||||
@ -486,10 +486,10 @@ public class LivePushTxViewHolder extends AbsLivePushViewHolder implements ITXLi
|
||||
@Override
|
||||
public void onPushEvent(int e, Bundle bundle) {
|
||||
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) {
|
||||
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) {
|
||||
L.e(TAG, "网络断开,推流失败------>");
|
||||
|
@ -314,7 +314,7 @@ public class LivePushTxViewHolder360Beauty extends AbsLivePushViewHolder impleme
|
||||
@Override
|
||||
public void toggleFlash() {
|
||||
if (mCameraFront) {
|
||||
ToastUtil.show(R.string.live_open_flash);
|
||||
ToastUtil.show(mContext.getString(R.string.live_open_flash));
|
||||
return;
|
||||
}
|
||||
if (mLivePusher != null) {
|
||||
@ -471,10 +471,10 @@ public class LivePushTxViewHolder360Beauty extends AbsLivePushViewHolder impleme
|
||||
|
||||
Log.d("onPushEvent",""+e+" "+bundle.toString());
|
||||
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) {
|
||||
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) {
|
||||
L.e(TAG, "网络断开,推流失败------>");
|
||||
|
@ -345,7 +345,7 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
ToastUtil.show(R.string.live_set_pwd_empty);
|
||||
ToastUtil.show(mContext.getString(R.string.live_set_pwd_empty));
|
||||
} else {
|
||||
mLiveType = bean.getId();
|
||||
mLiveTypeTextView.setText(bean.getName());
|
||||
@ -367,7 +367,7 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
ToastUtil.show(R.string.live_set_fee_empty);
|
||||
ToastUtil.show(mContext.getString(R.string.live_set_fee_empty));
|
||||
} else {
|
||||
mLiveType = bean.getId();
|
||||
mLiveTypeTextView.setText(bean.getName());
|
||||
|
@ -369,7 +369,7 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
ToastUtil.show(R.string.live_set_pwd_empty);
|
||||
ToastUtil.show(mContext.getString(R.string.live_set_pwd_empty));
|
||||
} else {
|
||||
mLiveType = bean.getId();
|
||||
mLiveTypeTextView.setText(bean.getName());
|
||||
@ -391,7 +391,7 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
ToastUtil.show(R.string.live_set_fee_empty);
|
||||
ToastUtil.show(mContext.getString(R.string.live_set_fee_empty));
|
||||
} else {
|
||||
mLiveType = bean.getId();
|
||||
mLiveTypeTextView.setText(bean.getName());
|
||||
|
@ -2380,7 +2380,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
pkUidTmp = "";
|
||||
}
|
||||
});
|
||||
|
@ -349,7 +349,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e("PortraitLiveManager", error);
|
||||
ToastUtil.show( R.string.net_error);
|
||||
ToastUtil.show( mContext.getString(R.string.net_error));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ public class OlineListActivity extends AbsActivity {
|
||||
public void onOlineEvent(OlineEvent event) {
|
||||
IMLoginModel model = IMLoginManager.get(mContext).getUserInfo();
|
||||
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 {
|
||||
Bus.get().post(new LiveInputEvent().setModel(event.getModel()));
|
||||
finish();
|
||||
|
@ -73,6 +73,7 @@ import com.yunbao.common.utils.RandomUtil;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.utils.formatBigNum;
|
||||
import com.yunbao.common.views.LiveSudGamePopup;
|
||||
import com.yunbao.common.views.weight.LiveFloatView;
|
||||
@ -720,7 +721,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
//直播间上部轮播【新人特惠】【趣味游戏】【幸运天使】 轮播接口
|
||||
mLiveRoomViewHolder.showLiveRoomActivityBanner();
|
||||
}
|
||||
|
@ -160,6 +160,7 @@
|
||||
android:id="@+id/guard_btn_buy"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="30dp"
|
||||
android:singleLine="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="15dp"
|
||||
|
@ -51,7 +51,10 @@
|
||||
|
||||
<TextView
|
||||
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:textColor="#FFFFFF"
|
||||
android:textSize="14sp"
|
||||
@ -65,6 +68,9 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="11sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
@ -1059,6 +1059,8 @@
|
||||
android:id="@+id/iv_look"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="24dp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:layout_marginRight="12dp"
|
||||
android:background="@drawable/bg_all_server_icon"
|
||||
android:gravity="center"
|
||||
|
@ -88,6 +88,7 @@ import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.dialog.LoginTipsDialog;
|
||||
import com.yunbao.main.http.MainHttpUtil;
|
||||
@ -275,7 +276,7 @@ public class EntryActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -616,7 +616,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(com.yunbao.live.R.string.net_error);
|
||||
ToastUtil.show(mContext.getString(R.string.net_error));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -178,7 +178,7 @@ public class MainListActivity extends AbsActivity implements OnItemClickListener
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show( R.string.net_error);
|
||||
ToastUtil.show( mContext.getString(R.string.net_error));
|
||||
}
|
||||
});
|
||||
initView();
|
||||
|
@ -240,7 +240,7 @@ public class MsgSettActivity extends AbsActivity {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(com.yunbao.live.R.string.net_error);
|
||||
ToastUtil.show(mContext.getString(R.string.net_error));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -444,7 +444,7 @@ public class PDLiveConversationListActivity extends AbsActivity implements View.
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show( R.string.net_error);
|
||||
ToastUtil.show( mContext.getString(R.string.net_error));
|
||||
}
|
||||
});
|
||||
MessageIMManager.get(mContext).setSystemNumber(0);
|
||||
|
@ -395,7 +395,7 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
|
||||
mAdapter.setCacheString(getCacheSize());
|
||||
mAdapter.notifyItemChanged(position);
|
||||
}
|
||||
ToastUtil.show(R.string.setting_clear_cache);
|
||||
ToastUtil.show(mContext.getString(R.string.setting_clear_cache));
|
||||
}
|
||||
}, 2000);
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ public class MsgFollowAdapter extends RecyclerView.Adapter<MsgFollowAdapter.Vh>
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show( R.string.net_error);
|
||||
ToastUtil.show( mContext.getString(R.string.net_error));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ public class SearchResultsAdapter extends RecyclerView.Adapter {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(com.yunbao.live.R.string.net_error);
|
||||
ToastUtil.show(R.string.net_error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -123,11 +123,11 @@ public class OneLoginDialog extends AbsDialogFragment {
|
||||
});
|
||||
} else {
|
||||
if (msg.contains("暱稱重複,請重新輸入")) {
|
||||
ToastUtil.show(R.string.edit_one_5);
|
||||
ToastUtil.show(mContext.getString(R.string.edit_one_5));
|
||||
} else if (msg.contains("該邀請碼不存在,請重新輸入")) {
|
||||
ToastUtil.show(R.string.edit_one_6);
|
||||
ToastUtil.show(mContext.getString(R.string.edit_one_6));
|
||||
} else if (msg.contains("暱稱不合法")) {
|
||||
ToastUtil.show(R.string.edit_one_7);
|
||||
ToastUtil.show(mContext.getString(R.string.edit_one_7));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ public class SearchRecommendFragment extends BaseFragment {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show( R.string.net_error);
|
||||
ToastUtil.show(R.string.net_error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ public class SearchResultsItemFragment extends BaseFragment {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show( R.string.net_error);
|
||||
ToastUtil.show( R.string.net_error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -318,7 +318,7 @@ public class ConversationIMListManager {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(com.yunbao.live.R.string.net_error);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple
|
||||
});
|
||||
getItem(position, mItem1, mItem2, mItem3).setOnClickListener(v -> {
|
||||
if (bean.isHide()) {
|
||||
ToastUtil.show(R.string.can_not_go);
|
||||
ToastUtil.show(mContext.getString(R.string.can_not_go));
|
||||
} else {
|
||||
|
||||
if (bean.getIslive() == 1) {
|
||||
|
@ -124,39 +124,39 @@ public class CashAccountViewHolder extends AbsViewHolder implements View.OnClick
|
||||
if (mKey == Constants.CASH_ACCOUNT_ALI) {
|
||||
account = mEditAliAccount.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(account)) {
|
||||
ToastUtil.show(R.string.cash_input_ali_account);
|
||||
ToastUtil.show(mContext.getString(R.string.cash_input_ali_account));
|
||||
return;
|
||||
}
|
||||
mEditAliAccount.setText("");
|
||||
name = mEditAliName.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
ToastUtil.show(R.string.cash_input_ali_name);
|
||||
ToastUtil.show(mContext.getString(R.string.cash_input_ali_name));
|
||||
return;
|
||||
}
|
||||
mEditAliName.setText("");
|
||||
} else if (mKey == Constants.CASH_ACCOUNT_WX) {
|
||||
account = mEditWxAccount.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(account)) {
|
||||
ToastUtil.show(R.string.cash_input_wx_account);
|
||||
ToastUtil.show(mContext.getString(R.string.cash_input_wx_account));
|
||||
return;
|
||||
}
|
||||
mEditWxAccount.setText("");
|
||||
} else {
|
||||
account = mEditBankAccount.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(account)) {
|
||||
ToastUtil.show(R.string.cash_input_bank_account);
|
||||
ToastUtil.show(mContext.getString(R.string.cash_input_bank_account));
|
||||
return;
|
||||
}
|
||||
mEditBankAccount.setText("");
|
||||
name = mEditBankUserName.getText().toString().trim();
|
||||
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;
|
||||
}
|
||||
mEditBankUserName.setText("");
|
||||
bank = mEditBankName.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(account)) {
|
||||
ToastUtil.show(R.string.cash_input_bank_name);
|
||||
ToastUtil.show(mContext.getString(R.string.cash_input_bank_name));
|
||||
return;
|
||||
}
|
||||
mEditBankName.setText("");
|
||||
|
@ -265,7 +265,7 @@ public class VideoInputDialogFragment extends AbsDialogFragment implements View.
|
||||
}
|
||||
String content = mInput.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
ToastUtil.show(R.string.content_empty);
|
||||
ToastUtil.show(mContext.getString(R.string.content_empty));
|
||||
return;
|
||||
}
|
||||
String toUid = mVideoUid;
|
||||
|
@ -218,7 +218,7 @@ public class VideoMusicViewHolder extends AbsViewHolder implements View.OnClickL
|
||||
}
|
||||
String key = mInput.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(key)) {
|
||||
ToastUtil.show(R.string.content_empty);
|
||||
ToastUtil.show(mContext.getString(R.string.content_empty));
|
||||
return;
|
||||
}
|
||||
VideoHttpUtil.cancel(VideoHttpConsts.VIDEO_SEARCH_MUSIC);
|
||||
|
Loading…
Reference in New Issue
Block a user