0

What we do is we define a webview and make the html files being displayed in that. Is it possible to display an html file in android's default pop up on the same screen? I have stored the html file in assets/www folder. Please let me know regarding this

Avadhani Y
  • 7,566
  • 19
  • 63
  • 90
Aashish J Kumar
  • 303
  • 4
  • 17

1 Answers1

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);
David Manpearl
  • 12,362
  • 8
  • 55
  • 72