==========================================
This plugin is specially created for custom methods. Currently it exposes information on the status of accessibility features of the mobile preferred scaling for text.
$ cordova plugin add github:logisticinfotech/cordova-plugin-licustom
- Android
- iOS
The licustom
object, exposed by window.licustom
, provides methods for determining the status of accessibility features active on the user's device, methods changing the text zoom of the Cordova web view and for using the user's preferred text zoom as set in the operating system settings.
- licustom.getTextZoom
- licustom.setTextZoom
Makes an asynchronous call to native licustom
to return the current text zoom percent value for the WebView.
- callback (Function) A callback method to receive the text zoom percent value asynchronously from the native
licustom
plugin.
function getTextZoomCallback(textZoom) {
console.log('Current text zoom = ' + textZoom + '%')
}
licustom.getTextZoom(getTextZoomCallback);
- Android
- iOS
Makes an asynchronous call to native licustom
to set the current text zoom percent value for the WebView.
- textZoom (Number) A percentage value by which text in the WebView should be scaled.
- callback (Function) A callback method to receive the new text zoom percent value asynchronously from the native
licustom
plugin.
function setTextZoomCallback(textZoom) {
console.log('WebView text should be scaled ' + textZoom + '%')
}
licustom.setTextZoom(200, setTextZoomCallback);
- Android
- iOS