多语言切换
This commit is contained in:
parent
1dce512d27
commit
5dcdd3fc5f
@ -245,7 +245,7 @@ public class WebViewActivity extends AbsActivity {
|
||||
}
|
||||
|
||||
public static void forward(Context context, String url) {
|
||||
forward(context, url+ "&isZh=" + ((IMLoginManager.get(CommonAppContext.sInstance.getBaseContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"), true);
|
||||
forward(context, url, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -24,6 +24,7 @@ import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.R;
|
||||
@ -293,7 +294,7 @@ public class WebViewActivityMedal extends AbsActivity {
|
||||
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken();
|
||||
}
|
||||
Intent intent = new Intent(context, WebViewActivityMedal.class);
|
||||
intent.putExtra(Constants.URL, url);
|
||||
intent.putExtra(Constants.URL, url+ "&isZh=" + ((IMLoginManager.get(CommonAppContext.sInstance.getBaseContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
|
@ -320,12 +320,12 @@ public class RewardActivity extends AbsActivity {
|
||||
}
|
||||
Intent intent = new Intent(context, RewardActivity.class);
|
||||
Log.i("tag", url);
|
||||
intent.putExtra(Constants.URL, url);
|
||||
intent.putExtra(Constants.URL, url+ "&isZh=" + ((IMLoginManager.get(CommonAppContext.sInstance.getBaseContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void forward(Context context, String url) {
|
||||
forward(context, url+ "&isZh=" + ((IMLoginManager.get(CommonAppContext.sInstance.getBaseContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"), true);
|
||||
forward(context, url, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -282,7 +282,7 @@ public class ZhuangBanActivity extends AbsActivity {
|
||||
}
|
||||
Intent intent = new Intent(context, ZhuangBanActivity.class);
|
||||
Log.i("tag1212", url);
|
||||
intent.putExtra(Constants.URL, url);
|
||||
intent.putExtra(Constants.URL, url+ "&isZh=" + ((IMLoginManager.get(CommonAppContext.sInstance.getBaseContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
if (url.contains("Noble/index.html") || url.contains("Grade/index.html")) {
|
||||
intent.putExtra("title", "");
|
||||
}
|
||||
@ -290,7 +290,7 @@ public class ZhuangBanActivity extends AbsActivity {
|
||||
}
|
||||
|
||||
public static void forward(Context context, String url) {
|
||||
forward(context, url+ "&isZh=" + ((IMLoginManager.get(CommonAppContext.sInstance.getBaseContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"), true);
|
||||
forward(context, url, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -310,7 +310,7 @@ public class ZhuangBanActivity extends AbsActivity {
|
||||
/**
|
||||
* 复制到剪贴板
|
||||
*/
|
||||
private void copy(String content) {
|
||||
private void copy(String content) {
|
||||
ClipboardManager cm = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
|
||||
ClipData clipData = ClipData.newPlainText("text", content);
|
||||
cm.setPrimaryClip(clipData);
|
||||
|
Loading…
Reference in New Issue
Block a user