Android Webview 本地化

发布于 2024-12-23 10:52:23 字数 472 浏览 4 评论 0原文

我是开发新手,首先要感谢该网站的所有贡献者,它非常有帮助。

好的,我在选项卡视图中有一个 webview,并且想设置与用户本地化相关的 webview url:即我想为英国用户设置一个 url,为美国用户设置一个 URL 等等。

我的活动中的代码当前是:

    WebView webview = (WebView) findViewById(R.id.webview);   
    webview.loadUrl("http://www.mywebviewurl.com"); 

我已阅读 android 和 stackoverflow 论坛,但我似乎无法正常工作。

任何人都可以帮忙吗?

谢谢 斯蒂芬

忽略:解决了,无论如何,谢谢。*

I am new to development and would firstly like to thanks all contributors to this site, it has been extremely helpful.

OK, I have a webview within a tabview and would like to set the webview url relevant the users localization: ie i would like to set a url for UK users, a URL for USA users and so on.

The code in my activity is currently:

    WebView webview = (WebView) findViewById(R.id.webview);   
    webview.loadUrl("http://www.mywebviewurl.com"); 

I have read android and stackoverflow forums but i just can't seem to get this working.

Can anyone please help.

Thanks
Stephen

IGNORE: worked it out, thanks anyway.*

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文