Press on the image to return to the main documentation page.
WebViewExtras
Written by Martin Pearman
List of types:
WebViewExtras
WebViewExtras
This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Events:
GeolocationPermissionsRequest As Int
ProgressChanged(NewProgress As Int)
ProgressChanged2(WebView1 As WebView, NewProgress As Int)
Members:
addJavascriptInterface
(
WebView1
As
android
.
webkit
.
WebView
,
InterfaceName
As
String
)
addWebChromeClient
(
WebView1
As
android
.
webkit
.
WebView
,
EventName
As
String
)
clearCache
(
WebView1
As
android
.
webkit
.
WebView
,
IncludeDiskFiles
As
Boolean
)
executeJavascript
(
WebView1
As
android
.
webkit
.
WebView
,
JavascriptStatement
As
String
)
flingScroll
(
webView1
As
android
.
webkit
.
WebView
,
vx
As
Int
,
vy
As
Int
)
GEOLOCATION_PERMISSION_ALLOW
As
Int
GEOLOCATION_PERMISSION_ALLOW_AND_REMEMBER
As
Int
GEOLOCATION_PERMISSION_DISALLOW
As
Int
GEOLOCATION_PERMISSION_DISALLOW_AND_REMEMBER
As
Int
GetContentHeight
(
WebView1
As
android
.
webkit
.
WebView
)
As
Int
GetScale
(
WebView1
As
android
.
webkit
.
WebView
)
As
Float
pageDown
(
webView1
As
android
.
webkit
.
WebView
,
scrollToBottom
As
Boolean
)
As
Boolean
pageUp
(
webView1
As
android
.
webkit
.
WebView
,
scrollToTop
As
Boolean
)
As
Boolean
zoomIn
(
webView1
As
android
.
webkit
.
WebView
)
As
Boolean
zoomOut
(
webView1
As
android
.
webkit
.
WebView
)
As
Boolean
Members description:
addJavascriptInterface
(
WebView1
As
android
.
webkit
.
WebView
,
InterfaceName
As
String
)
Add a javascript interface to WebView1, methods of the interface can be accessed using javascript with the InterfaceName as the javascript namespace.
WebView1 - The WebView to add the interface to.
InterfaceName - The javascript namespace (prefix) that will be used to access the interface methods.
addWebChromeClient
(
WebView1
As
android
.
webkit
.
WebView
,
EventName
As
String
)
Add a WebChromeClient to WebView1.
The WebChromeClient will handle console logging and javascript modal dialogs.
It also overrides the default onExceededDatabaseQuota method, which enables the WebView to create and use the Database Storage API.
WebView1 - The WebView to add the WebChromeClient to.
clearCache
(
WebView1
As
android
.
webkit
.
WebView
,
IncludeDiskFiles
As
Boolean
)
Clear the WebView cache.
Note that the cache is per-application, so this will clear the cache for all WebViews used in an application.
WebView1 - A WebView in your application.
IncludeDiskFiles - If false, only the RAM cache is cleared.
executeJavascript
(
WebView1
As
android
.
webkit
.
WebView
,
JavascriptStatement
As
String
)
Executes a string of one or more javascript statements in WebView1.
WebView1 - The WebView to execute the javascript in.
JavascriptStatement - A string of one or more (semi-colon seperated) javascript statements.
flingScroll
(
webView1
As
android
.
webkit
.
WebView
,
vx
As
Int
,
vy
As
Int
)
flingScroll is a poorly documented method of the WebView.
It's included in WebViewExtras as it may be useful but i can find no documentation for it or it's parameters.
webView1 - The WebView to flingScroll.
vx - No documentation available.
vy - No documentation available.
GEOLOCATION_PERMISSION_ALLOW
As
Int
GEOLOCATION_PERMISSION_ALLOW_AND_REMEMBER
As
Int
GEOLOCATION_PERMISSION_DISALLOW
As
Int
GEOLOCATION_PERMISSION_DISALLOW_AND_REMEMBER
As
Int
GetContentHeight
(
WebView1
As
android
.
webkit
.
WebView
)
As
Int
Gets the height of the HTML content.
GetScale
(
WebView1
As
android
.
webkit
.
WebView
)
As
Float
Get the WebView scale.
This method was deprecated in API level 17.
This method is prone to inaccuracy due to race conditions between the web rendering and UI threads; prefer onScaleChanged(WebView, float, float).
pageDown
(
webView1
As
android
.
webkit
.
WebView
,
scrollToBottom
As
Boolean
)
As
Boolean
Scroll the contents of webView1 down by half the page size.
webView1 - The WebView to scroll.
scrollToBottom - If true then webView1 will be scrolled to the bottom of the page.
Returns a boolean value to indicate the success or failure of the scroll.
pageUp
(
webView1
As
android
.
webkit
.
WebView
,
scrollToTop
As
Boolean
)
As
Boolean
Scroll the contents of webView1 up by half the page size.
webView1 - The WebView to scroll.
scrollToTop - If true then webView1 will be scrolled to the top of the page.
Returns a boolean value to indicate the success or failure of the scroll.
zoomIn
(
webView1
As
android
.
webkit
.
WebView
)
As
Boolean
Perform zoom in on webView1.
webView1 - The WebView to zoom in on.
Returns a boolean value to indicate the success or failure of the zoom.
zoomOut
(
webView1
As
android
.
webkit
.
WebView
)
As
Boolean
Perform zoom out on webView1.
webView1 - The WebView to zoom out on.
Returns a boolean value to indicate the success or failure of the zoom.
Top