多语言切换
This commit is contained in:
parent
293c9dcf9e
commit
dc5633bcb9
@ -10,6 +10,9 @@ import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2019/2/25.
|
||||
@ -109,7 +112,7 @@ public class RouteUtil {
|
||||
if (!"".equals(Constants.chatActionUrl)) {
|
||||
url = Constants.chatActionUrl;
|
||||
}
|
||||
Constants.myUrl = url + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&t=" + System.currentTimeMillis();
|
||||
Constants.myUrl = url + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&t=" + System.currentTimeMillis() + "&isZh=" + ((IMLoginManager.get(context).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
|
||||
ARouter.getInstance().build(PATH_MYWEBVIEWACTIVTITY)
|
||||
.withString(Constants.URL, url)
|
||||
.navigation();
|
||||
|
@ -9,9 +9,9 @@ ext {
|
||||
]
|
||||
manifestPlaceholders = [
|
||||
//正式、
|
||||
serverHost : "https://napi.yaoulive.com",
|
||||
// serverHost : "https://napi.yaoulive.com",
|
||||
//测试
|
||||
// serverHost : "https://ceshi.yaoulive.com",
|
||||
serverHost : "https://ceshi.yaoulive.com",
|
||||
|
||||
//腾讯地图
|
||||
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",
|
||||
|
@ -1,5 +1,9 @@
|
||||
package com.yunbao.live.activity;
|
||||
|
||||
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_DISABLE;
|
||||
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_ENABLE;
|
||||
import static com.yunbao.live.views.LivePushTxViewHolder.mTRTCCloud;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -24,6 +28,7 @@ import com.tencent.trtc.TRTCCloudDef;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.dialog.NotCancelableDialog;
|
||||
import com.yunbao.common.event.LoginInvalidEvent;
|
||||
@ -32,14 +37,13 @@ import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.http.JsonBean;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.DateFormatUtil;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.LogUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.live.bean.LiveGuardInfo;
|
||||
import com.yunbao.live.bean.LiveKsyConfigBean;
|
||||
import com.yunbao.live.dialog.LiveBeautyDialogFragment;
|
||||
@ -72,13 +76,10 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import pl.droidsonroids.gif.GifImageView;
|
||||
|
||||
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_DISABLE;
|
||||
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_ENABLE;
|
||||
import static com.yunbao.live.views.LivePushTxViewHolder.mTRTCCloud;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/7.
|
||||
* 主播直播间
|
||||
@ -276,7 +277,11 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
|
||||
});
|
||||
break;
|
||||
case Constants.LIVE_FUNC_WKS:
|
||||
String url = CommonAppConfig.HOST + "/h5/activity/weekStar/index.html?&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid;
|
||||
String url = CommonAppConfig.HOST
|
||||
+ "/h5/activity/weekStar/index.html?&uid="
|
||||
+ CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid
|
||||
+ "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
|
||||
ZhuangBanActivity.forward(mContext, url, false);
|
||||
break;
|
||||
case Constants.LIVE_FUNC_LINK_MIC://连麦
|
||||
|
@ -31,6 +31,7 @@ import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
||||
@ -45,6 +46,8 @@ import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/9/25.
|
||||
* 我的徽章 h5页面
|
||||
@ -152,7 +155,7 @@ public class WebViewActivityMedal extends AbsActivity {
|
||||
mIvQuestion.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
MedalQuestionWebViewActivity.forward(mContext, HtmlConfig.MEDAL_QUESTION);
|
||||
MedalQuestionWebViewActivity.forward(mContext, HtmlConfig.MEDAL_QUESTION + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.bean.JsTurnTableBean;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.views.TurnTableWebViewHolder;
|
||||
|
||||
@ -19,6 +20,8 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import cn.qqtheme.framework.util.ScreenUtils;
|
||||
|
||||
|
||||
@ -73,7 +76,7 @@ public class LiveTurnTableDialogFragment4Audience extends AbsDialogFragment {
|
||||
if (mTurnTableViewHolder == null) {
|
||||
String url = HtmlConfig.TURNTABLE_URL;
|
||||
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken() + "&liveUid=" + mLiveUid;
|
||||
+ CommonAppConfig.getInstance().getToken() + "&liveUid=" + mLiveUid + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
|
||||
mTurnTableViewHolder = new TurnTableWebViewHolder(getActivity(), rlWebview, url);
|
||||
mTurnTableViewHolder.subscribeActivityLifeCycle();
|
||||
mTurnTableViewHolder.addToParent();
|
||||
|
@ -11,6 +11,7 @@ import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.bean.JsWishBean;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
@ -20,6 +21,8 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/19.
|
||||
* 观众查看 心愿单弹窗
|
||||
@ -69,7 +72,7 @@ public class LiveWishListDialogFragment4Audience extends AbsDialogFragment {
|
||||
if (mWishWebViewHolder == null) {
|
||||
String url = HtmlConfig.WISHLIST_URL;
|
||||
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken() + "&liveUid=" + mLiveUid;
|
||||
+ CommonAppConfig.getInstance().getToken() + "&liveUid=" + mLiveUid + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
|
||||
mWishWebViewHolder = new WishlistWebViewHolder(mContext, rlWebview, url);
|
||||
mWishWebViewHolder.subscribeActivityLifeCycle();
|
||||
mWishWebViewHolder.addToParent();
|
||||
|
@ -72,6 +72,7 @@ import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
@ -339,7 +340,7 @@ public class LiveGiftAnimPresenter {
|
||||
mGifGiftTipGroupBuyZuoji.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
WebViewActivity.forward(mContext, HtmlConfig.SHOP);
|
||||
WebViewActivity.forward(mContext, HtmlConfig.SHOP + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -348,7 +349,7 @@ public class LiveGiftAnimPresenter {
|
||||
mGifGiftTipGroupBuyLiangName.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
WebViewActivity.forward(mContext, HtmlConfig.SHOP);
|
||||
WebViewActivity.forward(mContext, HtmlConfig.SHOP + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -6,10 +6,13 @@ import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/30.
|
||||
*/
|
||||
@ -56,7 +59,7 @@ public class UserHomeSharePresenter {
|
||||
return;
|
||||
}
|
||||
String link = HtmlConfig.SHARE_HOME_PAGE + mToUid;
|
||||
ClipboardManager cm = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
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);
|
||||
|
@ -14,11 +14,14 @@ import android.widget.ProgressBar;
|
||||
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.activity.LiveContributeActivity;
|
||||
import com.yunbao.common.utils.L;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/15.
|
||||
* 直播间粉丝排行榜
|
||||
@ -79,7 +82,7 @@ public class LiveContributeViewHolder extends AbsLivePageViewHolder implements V
|
||||
public void loadData() {
|
||||
if (!mLoad) {
|
||||
mLoad = true;
|
||||
mWebView.loadUrl(HtmlConfig.LIVE_LIST + mLiveUid);
|
||||
mWebView.loadUrl(HtmlConfig.LIVE_LIST + mLiveUid + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
} else {
|
||||
mWebView.reload();
|
||||
}
|
||||
|
@ -13,11 +13,14 @@ import android.widget.ProgressBar;
|
||||
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.activity.LiveContributeActivity;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/15.
|
||||
* 直播间粉丝排行榜
|
||||
@ -78,7 +81,7 @@ public class LiveMedalRankViewHolder extends AbsLivePageViewHolder implements Vi
|
||||
public void loadData() {
|
||||
if (!mLoad) {
|
||||
mLoad = true;
|
||||
mWebView.loadUrl(HtmlConfig.LIVE_FANS_MEDAL_RANKING + mLiveUid);
|
||||
mWebView.loadUrl(HtmlConfig.LIVE_FANS_MEDAL_RANKING + mLiveUid + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
} else {
|
||||
mWebView.reload();
|
||||
}
|
||||
|
@ -110,7 +110,6 @@ import com.yunbao.common.utils.ScreenDimenUtil;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
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.AbsViewHolder;
|
||||
import com.yunbao.common.views.weight.ClipPathCircleImage;
|
||||
@ -1279,7 +1278,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
liveAudienceActivity.pausePlay();
|
||||
if (code == 1008) {//余额不足
|
||||
liveAudienceActivity.setCoinNotEnough(true);
|
||||
DialogUitl.showSimpleDialog(mContext,mContext.getString(R.string.live_coin_not_enough), false,
|
||||
DialogUitl.showSimpleDialog(mContext, mContext.getString(R.string.live_coin_not_enough), false,
|
||||
new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
@ -1621,7 +1620,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
.append("&uid=")
|
||||
.append(userInfo.getId())
|
||||
.append("&k=")
|
||||
.append(System.currentTimeMillis());
|
||||
.append(System.currentTimeMillis())
|
||||
.append("&isZh=")
|
||||
.append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
|
||||
} else {
|
||||
type = bean.getShow_type();
|
||||
htmlUrl.append(bean.getLink())
|
||||
@ -1632,7 +1634,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
.append("&anchorUid=")
|
||||
.append(mLiveUid)
|
||||
.append("&t=")
|
||||
.append(System.currentTimeMillis());
|
||||
.append(System.currentTimeMillis())
|
||||
.append("&isZh=")
|
||||
.append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
}
|
||||
if (TextUtils.equals(type, "1")) {
|
||||
ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false);
|
||||
@ -1680,7 +1684,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
.append("&uid=")
|
||||
.append(userInfo.getId())
|
||||
.append("&k=")
|
||||
.append(System.currentTimeMillis());
|
||||
.append(System.currentTimeMillis())
|
||||
.append("&isZh=")
|
||||
.append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
} else {
|
||||
type = bean.getShow_type();
|
||||
htmlUrl.append(bean.getLink())
|
||||
@ -1694,7 +1700,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
.append(mLiveUid)
|
||||
.append("&t=")
|
||||
.append(System.currentTimeMillis())
|
||||
.append("&g=Appapi&m=Wish&a=index");
|
||||
.append("&g=Appapi&m=Wish&a=index")
|
||||
.append("&isZh=")
|
||||
.append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
}
|
||||
if (TextUtils.equals(type, "1")) {
|
||||
ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false);
|
||||
@ -1730,7 +1738,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
if (loadingDialog != null && loadingDialog.isShowing()) {
|
||||
return true;
|
||||
}
|
||||
loadingDialog = DialogUitl.loadingDialog(mContext,mContext.getString(R.string.login_wait));
|
||||
loadingDialog = DialogUitl.loadingDialog(mContext, mContext.getString(R.string.login_wait));
|
||||
loadingDialog.show();
|
||||
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||
if (loadingDialog != null) {
|
||||
@ -2024,7 +2032,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
String url = CommonAppConfig.HOST + path;
|
||||
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid;
|
||||
+ CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid
|
||||
+ "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
|
||||
bundle.putString("url", url);
|
||||
bundle.putInt("height", DpUtil.dp2px(500));
|
||||
bundle.putInt("show_type", 0);
|
||||
@ -2876,7 +2885,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
public void callback(Integer isAttention) {
|
||||
if (isAttention == 1) {
|
||||
LiveActivity.sendSystemMessage(
|
||||
CommonAppConfig.getInstance().getUserBean().getUserNiceName() +Contexts.getString(R.string.live_follow_anchor));
|
||||
CommonAppConfig.getInstance().getUserBean().getUserNiceName() + Contexts.getString(R.string.live_follow_anchor));
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -4875,7 +4884,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
.append(mLiveUid)
|
||||
.append("&t=")
|
||||
.append(System.currentTimeMillis())
|
||||
.append("&g=Appapi&m=Wish&a=index");
|
||||
.append("&g=Appapi&m=Wish&a=index")
|
||||
.append("&isZh=")
|
||||
.append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
if (TextUtils.equals(type, "1")) {
|
||||
ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false);
|
||||
} else {
|
||||
@ -4948,7 +4959,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
.append(mLiveUid)
|
||||
.append("&t=")
|
||||
.append(System.currentTimeMillis())
|
||||
.append("&g=Appapi&m=Wish&a=index");
|
||||
.append("&g=Appapi&m=Wish&a=index")
|
||||
.append("&isZh=")
|
||||
.append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
if (TextUtils.equals(type, "1")) {
|
||||
ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false);
|
||||
} else {
|
||||
|
@ -17,6 +17,7 @@ import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.bean.JsTurnTableBean;
|
||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
||||
import com.yunbao.common.utils.L;
|
||||
@ -26,6 +27,8 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/15.
|
||||
* 心愿单WebView
|
||||
@ -125,7 +128,7 @@ public class TurnTableWebViewHolder extends AbsLivePageViewHolder implements Vie
|
||||
if (!TextUtils.isEmpty(event.getMethod())) {
|
||||
if (TextUtils.equals(event.getMethod(), "androidMethod")) {
|
||||
if (event.getData() != null && !event.getData().isEmpty()) {
|
||||
WebViewActivity.forward(mContext, HtmlConfig.SHOP);
|
||||
WebViewActivity.forward(mContext, HtmlConfig.SHOP + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
EventBus.getDefault().post(new JsTurnTableBean(event.getData()));
|
||||
}
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public class LanguageSettingActivity extends AbsActivity {
|
||||
Stack<Activity> allActivityStacks = AppManager.getInstance().getAllActivityStacks();
|
||||
for (int i = 0; i < allActivityStacks.size(); i++) {
|
||||
if (!(allActivityStacks.get(i) instanceof LanguageSettingActivity)) {
|
||||
LanguageUtil.shiftLanguage(locale, allActivityStacks.get(i), mContext);
|
||||
allActivityStacks.get(i).finish();
|
||||
}
|
||||
}
|
||||
IMLoginManager.get(mContext).setLanguage(locale != Locale.SIMPLIFIED_CHINESE);
|
||||
|
@ -24,6 +24,7 @@ import com.yunbao.common.http.CommonHttpConsts;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.pay.PayCallback;
|
||||
import com.yunbao.common.pay.PayPresenter;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
@ -38,6 +39,7 @@ import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/23.
|
||||
@ -295,10 +297,10 @@ public class MyCoinActivity extends AbsActivity implements OnItemClickListener<C
|
||||
int i = v.getId();
|
||||
if (i == R.id.btn_tip) {
|
||||
//充值协议
|
||||
WebViewActivity.forward(mContext, HtmlConfig.CHARGE_PRIVCAY);
|
||||
WebViewActivity.forward(mContext, HtmlConfig.CHARGE_PRIVCAY + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
}else if (i == R.id.btn_charge_explain) {
|
||||
//充值说明
|
||||
WebViewActivity.forward(mContext, HtmlConfig.CHARGE_EXPLAIN);
|
||||
WebViewActivity.forward(mContext, HtmlConfig.CHARGE_EXPLAIN + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@ import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
@ -26,6 +27,8 @@ import com.yunbao.main.http.MainHttpConsts;
|
||||
import com.yunbao.main.http.MainHttpUtil;
|
||||
import com.yunbao.main.utils.MainIconUtil;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/20.
|
||||
*/
|
||||
@ -156,7 +159,7 @@ public class MyProfitActivity extends AbsActivity implements View.OnClickListene
|
||||
* 提现记录
|
||||
*/
|
||||
private void cashRecord() {
|
||||
WebViewActivity.forward(mContext, HtmlConfig.CASH_RECORD);
|
||||
WebViewActivity.forward(mContext, HtmlConfig.CASH_RECORD + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -35,14 +35,13 @@ import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
||||
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 com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.live.views.LoadingView;
|
||||
@ -58,6 +57,7 @@ import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Created by Chen Haoxuan on 2022/3/25.
|
||||
@ -87,7 +87,8 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl
|
||||
@Override
|
||||
public void init() {
|
||||
Bus.getOn(this);
|
||||
String url = HtmlConfig.ENCOURAGE + "?t=" + Math.random() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken();
|
||||
String url = HtmlConfig.ENCOURAGE + "?t=" + Math.random() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken()
|
||||
+ "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
|
||||
final LinearLayout rootView = (LinearLayout) findViewById(R.id.rootView);
|
||||
mProgressBar = (ProgressBar) findViewById(R.id.progressbar);
|
||||
mWebView = new WebView(mContext);
|
||||
@ -268,7 +269,7 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl
|
||||
intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
||||
}
|
||||
intent.setType("image/*");
|
||||
nowMainActivity.startActivityMain(Intent.createChooser(intent,mContext.getString(R.string.choose_flie)), CHOOSE);
|
||||
nowMainActivity.startActivityMain(Intent.createChooser(intent, mContext.getString(R.string.choose_flie)), CHOOSE);
|
||||
// startActivityForResult(Intent.createChooser(intent,mContext.getString(R.string.choose_flie)), CHOOSE);
|
||||
}
|
||||
|
||||
@ -353,7 +354,7 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl
|
||||
} else if (TextUtils.equals(event.getMethod(), "androidCommunityShare")) {
|
||||
JSONObject json = JSONObject.parseObject(event.getData());
|
||||
new SharePopDialog(mContext)
|
||||
.setShareLink(CommonAppConfig.HOST+json.getString("link"))
|
||||
.setShareLink(CommonAppConfig.HOST + json.getString("link"))
|
||||
.setAnchorAvatar(json.getString("avatar"))
|
||||
.showDialog();
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.APKManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.SVGAViewUtils;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
@ -452,7 +453,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
||||
Log.i("tsa", url);
|
||||
RewardActivity.forward(mContext, url);
|
||||
} else if (bean.getId() == 4) {
|
||||
url = HtmlConfig.SHOP + "?t=" + Math.random() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken();
|
||||
url = HtmlConfig.SHOP + "?t=" + Math.random() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
|
||||
WebViewActivity.forward(mContext, url);
|
||||
} else if (bean.getId() == 3) {//我的等级
|
||||
Constants.myIntoIndex = 2;
|
||||
|
Loading…
Reference in New Issue
Block a user