Home > Web Front-end > HTML Tutorial > How to solve the problem that the pop-up window in H5 cannot pop up using webview

How to solve the problem that the pop-up window in H5 cannot pop up using webview

php中世界最好的语言
Release: 2017-12-04 11:25:44
Original
3636 people have browsed it

We occasionally encounter such a BUG. Although webview is used, the pop-up window in H5 cannot be raised. So how to solve this problem? Let's take a look.

Problem:

webview cannot hoist the pop-up window in H5.

Solution:

If it is a fragment, you must use the getactivity() context, not the whole family context, otherwise the pop-up window will not work.

mWebView.setWebChromeClient(new WebChromeClient());


I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!

Related reading:

Implementation steps of DOM programming in html5

Use H5 to make a drop-down box with special effects

Detailed graphic and text explanation of postMessage API in H5

The above is the detailed content of How to solve the problem that the pop-up window in H5 cannot pop up using webview. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template