Android 临时 Webview

发布于 2024-10-06 15:53:16 字数 104 浏览 0 评论 0原文

问候。

我想让我的应用程序具有一个功能,以便当用户选择时,会弹出一个 Web 视图,他们可以查看它,然后通过按屏幕上的按钮或后退按钮将其关闭。我该怎么做?

谢谢。

Greetings.

I would like to have my application have a function so that when the user chooses, a web view will pop up they can look at it and then dismiss it by either pressing a button on the screen or the back button. How would I do this?

Thanks.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

听不够的曲调 2024-10-13 15:53:16

创建一个包含 WebView 和您需要的所有其他内容的 Activity,并通过 Intent 启动该 Activity 。当用户完成 WebView 中的操作后,只需让他按后退按钮即可。

Create an Activity containing your WebView and all the other stuff you need and have that Activity be started through an Intent. When the user is done with doing stuff in the WebView just let him press the back button and you're fine.

满栀 2024-10-13 15:53:16

您只需创建一个包含带有所需 url 的 webview 的活动,然后拦截 url 点击并在您的应用程序中做出相应的反应。

http://developer.android.com/reference/android/webkit/WebView.html

You just create an activity that contains a webview with the url you need and then you intercept the url clicks and react accordingly in your app.

http://developer.android.com/reference/android/webkit/WebView.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文