WebView Dialog - Web Content in a Dialog

WebView Dialog

You will be able to view web pages, HTML content, download files, use the keyboard and zoom in on pages.

20240930_052809 20240930_053754



Functions:


ShowWebViewDialog(String url): Displays a dialog containing a WebView that loads the specified URL. Configures settings for JavaScript, file access, and DOM storage, and shows the keyboard if needed.


GetNavigationHistory(): Returns a list of URLs visited in the WebView.


component_method (20)

EnableZoom(boolean enabled): Enables or disables zoom controls in the WebView.


EnableDownloadListener(): Allows files to be downloaded from the WebView.


component_method (23)

ClearCookies(): Clears all cookies stored by the WebView.


EnableCookies(boolean enabled): Enables or disables cookies in the WebView.


EnableAdBlocker(): Enables basic ad blocking by filtering out URLs that contain "adserver" or "ads".


SetAutoDismiss(int milliseconds): Automatically closes the WebView dialog after a specified time in milliseconds.


SetDialogTitle(String title): Sets the title of the dialog that contains the WebView.


SetCloseButtonText(String text): Changes the text of the close button in the dialog.


LoadHtmlContent(String html): Loads custom HTML content directly into the WebView.


SetShowKeyboard(boolean show): Configures whether the keyboard should be shown when interacting with text fields in the WebView.


Extension:
joejsanz.joedevwebviewdialog.aix (15.3 KB)


Thanks.
1 Like

Great Extension This is a Great creation, Please keep it up, you can do more better than this in future also. My best wishes with you. :blush: :tada:

1 Like

Thank you so much @HarshVardhanSolanki

1 Like

Great and very usefull extension, Thank you !!

However, when i navigate to a pdf file, it is not showing the content

Thank you so much @wikki74

I entered the URL of a PDF file and it downloaded automatically.
This is the URL I used: https://dh8zy5a1i9xe5.cloudfront.net/ocp/pdf/guitar_chord_charts.pdf

Tested on Android 11 and 14.

Could you share with me the URL you used to access the PDF so I can verify it?

ok, download works also here

But is there a way to SHOW a pdf file and NOT download it?

It is possible to view it via HTML, but the dialog does not fully extend, I will need to review all those details.