0

我们所做的是定义 awebview并使html文件显示在其中。是否可以html在 android 的默认弹出窗口中在同一屏幕上显示文件?我已将文件存储在html文件assets/www夹中。请让我知道这件事

4

1 回答 1

0

It is possible to display a WebView or any other UI in a default Android Dialog. But, it is better and easier for you to make your own custom Dialog class and display the WebView in that. You can also make it an Activity and use the Dialog theme to make the Activity look and behave like a Dialog.

You are correct to put your .html file in the "assets" folder. That is what I do.

Load the WebView like this:

private final static String url = "file:///android_asset/file.html";
webview.loadUrl(baseUrl);
于 2013-03-22T06:43:20.107 回答