cordova-plugin-android-webview-manager
v0.3.0
Published
Allows to call some methods of Cordova Android WebView
Maintainers
Readme
Cordova Android WebView Manager
This plugin allows to call some methods of Cordova Android WebView.
Installation
cordova plugin add cordova-plugin-android-webview-managerUsage
Give focus to the WebView
WebViewManager.requestFocus(WebViewManager.FOCUS_DOWN)
.then(console.info)
.catch(console.error);Check if the WebView is focused
WebViewManager.isFocused()
.then(console.info)
.catch(console.error);Methods
- WebViewManager.requestFocus(direction:number)
- WebViewManager.focusSearch(direction:number)
- WebViewManager.isEnabled()
- WebViewManager.isFocusable()
- WebViewManager.isFocusableInTouchMode()
- WebViewManager.isFocused()
- WebViewManager.isFocusedByDefault()
- WebViewManager.isForceDarkAllowed()
- WebViewManager.setForceDarkAllowed(allow:boolean)
- WebViewManager.setTextZoom(textZoom:number)
- WebViewManager.enableAdjustResize()¹
- WebViewManager.disableAdjustResize()¹
Notes
- According to the issue #36911528 the adjustResize value of android:windowSoftInputMode does not work properly for the WebView in the fullscreen mode. These methods allow to enable/disable expected behaviour. Solution is based on the AndroidBug5497Workaround.
Constants
- WebViewManager.FOCUS_BACKWARD
- WebViewManager.FOCUS_DOWN
- WebViewManager.FOCUS_FORWARD
- WebViewManager.FOCUS_LEFT
- WebViewManager.FOCUS_RIGHT
- WebViewManager.FOCUS_UP
