this is a wrap for this github project.
Enhanced WebView component for Android that works as intended out of the box
AdvancedWebview
Author: DonManfred (wrapper)
Version: 1
AdvancedWebView
Events:
Enhanced WebView component for Android that works as intended out of the box
AdvancedWebview
Author: DonManfred (wrapper)
Version: 1
AdvancedWebView
Events:
- onPageError (errorCode As Int, description As String, failingUrl As String)
- onPageStarted (url As String, favIcon As Object)
- onDownloadRequested (url As String, suggestedFilename As String, mimeType As String, contentLength As long, contentDisposition As String, userAgent As String)
- onPageFinished (url As String)
- onExternalPageRequest (url As String)
- ba As anywheresoftware.b4a.BA
- DesignerCreateView (base As anywheresoftware.b4a.objects.PanelWrapper, lw As anywheresoftware.b4a.objects.LabelWrapper, props As anywheresoftware.b4a.objects.collections.Map) As void
- clearPermittedHostnames As void
- onPause As void
- handleDownload (fromUrl As java.lang.String, toFilename As java.lang.String) As boolean
Handles a download by loading the file from `fromUrl` and saving it to `toFilename` on the external storage
This requires the two permissions `android.permission.INTERNET` and `android.permission.WRITE_EXTERNAL_STORAGE`
Only supported on API level 9 (Android 2.3) and above
context: a valid `Context` reference
fromUrl: the URL of the file to download, e.g. the one from `AdvancedWebView.onDownloadRequested(...)`
toFilename: the name of the destination file where the download should be saved, e.g. `myImage.jpg`
Return type: @return:whether the download has been successfully handled or not - IsInitialized As boolean
- Initialize (ba As anywheresoftware.b4a.BA, EventName As java.lang.String) As void
- loadHtml (html As java.lang.String) As void
Loads and displays the provided HTML source text
html: the HTML source text to load - addHttpHeader (name As java.lang.String, value As java.lang.String) As void
Adds an additional HTTP header that will be sent along with every HTTP `GET` request
This does only affect the main requests, not the requests to included resources (e.g. images)
If you later want to delete an HTTP header that was previously added this way, call `removeHttpHeader()`
The `WebView` implementation may in some cases overwrite headers that you set or unset
name: the name of the HTTP header to add
value: the value of the HTTP header to send - BringToFront As void
- SetLayout (arg0 As int, arg1 As int, arg2 As int, arg3 As int) As void
- removePermittedHostname (hostname As java.lang.String) As void
- SendToBack As void
- addPermittedHostnames (collection As java.util.Collection) As void
- onBackPressed As boolean
- SetVisibleAnimated (arg0 As int, arg1 As boolean) As void
- onDestroy As void
- RemoveView As void
- Invalidate3 (arg0 As int, arg1 As int, arg2 As int, arg3 As int) As void
- Invalidate2 (arg0 As android.graphics.Rect) As void
- SetColorAnimated (arg0 As int, arg1 As int, arg2 As int) As void
- loadUrl2 (url As java.lang.String, preventCaching As boolean) As void
- loadHtml4 (html As java.lang.String, baseUrl As java.lang.String, historyUrl As java.lang.String, encoding As java.lang.String) As void
Loads and displays the provided HTML source text
html: the HTML source text to load
baseUrl: the URL to use as the page's base URL
historyUrl: the URL to use for the page's history entry
encoding: the encoding or charset of the HTML source text - isFileUploadAvailable As boolean
Returns whether file uploads can be used on the current device (generally all platform versions except for 4.4)
Return type: @return:whether file uploads can be used - SetBackgroundImage (arg0 As android.graphics.Bitmap) As void
- loadHtml3 (html As java.lang.String, baseUrl As java.lang.String, historyUrl As java.lang.String) As void
Loads and displays the provided HTML source text
html: the HTML source text to load
baseUrl: the URL to use as the page's base URL
historyUrl: the URL to use for the page's history entry - loadHtml2 (html As java.lang.String, baseUrl As java.lang.String) As void
Loads and displays the provided HTML source text
html: the HTML source text to load
baseUrl: the URL to use as the page's base URL - onResume As void
- loadUrl (url As java.lang.String) As void
- Invalidate As void
- addPermittedHostname (hostname As java.lang.String) As void
- removeHttpHeader (name As java.lang.String) As void
Removes one of the HTTP headers that have previously been added via `addHttpHeader()`
If you want to unset a pre-defined header, set it to an empty string with `addHttpHeader()` instead
The `WebView` implementation may in some cases overwrite headers that you set or unset
name: the name of the HTTP header to remove - SetLayoutAnimated (arg0 As int, arg1 As int, arg2 As int, arg3 As int, arg4 As int) As void
- RequestFocus As boolean
- android.permission.ACCESS_NETWORK_STATE
- android.permission.INTERNET
- android.permission.WRITE_EXTERNAL_STORAGE
- Left As int
- Background As android.graphics.drawable.Drawable
- Parent As java.lang.Object [read only]
- ThirdPartyCookiesEnabled As boolean [write only]
- Color As int [write only]
- Enabled As boolean
- PermittedHostnames As java.util.List [read only]
- MixedContentAllowed As boolean [write only]
- Top As int
- CookiesEnabled As boolean [write only]
- UploadableFileTypes As java.lang.String [write only]
- WebChromeClient As android.webkit.WebChromeClient [write only]
- Visible As boolean
- Padding As int[]
- Height As int
- Tag As java.lang.Object
- Width As int
- GeolocationEnabled As boolean [write only]
- WebViewClient As android.webkit.WebViewClient [write only]
- DesktopMode As boolean [write only]