@falconeta/capacitor-android-full-view
v8.1.0
Published
Capacitor plugin for retrieving proper top offset, bottom offset and set full screen ONLY for android
Readme
capacitor-android-full-view
Capacitor plugin for retrieving proper top offset of Android status bar.
Install
# with npm
npm install --save @falconeta/capacitor-android-full-view
# with yarn
yarn add @falconeta/capacitor-android-full-view
# after any install
npx cap syncWhy?
This plugin is required only on Android when using StatusBar.setOverlaysWebView({ overlay: true }). There is a problem with top offset counting, when status bar is transparent. Related issue: https://github.com/ionic-team/capacitor/issues/2840.
Usage
import { AndroidFullView } from 'capacitor-android-full-view'
const { value } = await AndroidFullView.top();API
top()
top() => Promise<TopBottomReturn>Returns top offset of the status bar
Returns: Promise<TopBottomReturn>
bottom()
bottom() => Promise<TopBottomReturn>Returns bottom offset of the status bar
Returns: Promise<TopBottomReturn>
setResizeOnFullScreenEnabled(...)
setResizeOnFullScreenEnabled(options: ResizeOnFullScreenEnabledOptions) => Promise<void>Enables or disables the Android keyboard resize workaround used in fullscreen mode.
| Param | Type |
| ------------- | --------------------------------------------------------------------------------------------- |
| options | ResizeOnFullScreenEnabledOptions |
getResizeOnFullScreenEnabled()
getResizeOnFullScreenEnabled() => Promise<ResizeOnFullScreenEnabledResult>Returns whether the Android keyboard resize workaround used in fullscreen mode is enabled.
Returns: Promise<ResizeOnFullScreenEnabledResult>
Interfaces
TopBottomReturn
| Prop | Type |
| ----------- | ------------------- |
| value | number |
ResizeOnFullScreenEnabledOptions
| Prop | Type |
| ------------- | -------------------- |
| enabled | boolean |
ResizeOnFullScreenEnabledResult
| Prop | Type |
| ------------- | -------------------- |
| enabled | boolean |
