Home  >  Article  >  Web Front-end  >  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中世界最好的语言
php中世界最好的语言Original
2017-12-04 11:25:443562browse

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!

Statement:
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