mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-19 15:13:22 +08:00
50 lines
1.1 KiB
TypeScript
50 lines
1.1 KiB
TypeScript
![]() |
import { Cordova, Plugin } from './plugin';
|
|||
|
|
|||
|
|
|||
|
/**
|
|||
|
* @name NavigationBar
|
|||
|
* @description
|
|||
|
* The NavigationBar plugin can you to hide and auto hide the android navigation bar.
|
|||
|
*
|
|||
|
* @usage
|
|||
|
* ```typescript
|
|||
|
* import { NavigationBar } from 'ionic-native';
|
|||
|
*
|
|||
|
* let autoHide: boolean = true;
|
|||
|
* NavigationBar.hide(autoHide);
|
|||
|
* ```
|
|||
|
*/
|
|||
|
@Plugin({
|
|||
|
name: 'NavigationBar',
|
|||
|
plugin: 'cordova-plugin-navigationbar',
|
|||
|
pluginRef: 'navigationbar',
|
|||
|
repo: 'https://github.com/cranberrygame/cordova-plugin-navigationbar',
|
|||
|
platforms: ['Android']
|
|||
|
})
|
|||
|
export class NavigationBar {
|
|||
|
|
|||
|
/**
|
|||
|
* hide automatically (or not) the navigation bar.
|
|||
|
* @param autohide {boolean}
|
|||
|
* @return {Promise<any>}
|
|||
|
*/
|
|||
|
@Cordova({
|
|||
|
callbackStyle: 'object',
|
|||
|
successName: 'success',
|
|||
|
errorName: 'failure'
|
|||
|
})
|
|||
|
static setUp(autohide?: boolean = false): Promise<any> { return; }
|
|||
|
|
|||
|
/**
|
|||
|
* Hide the navigation bar.
|
|||
|
* @return {Promise<any>}
|
|||
|
*/
|
|||
|
@Cordova({
|
|||
|
callbackStyle: 'object',
|
|||
|
successName: 'success',
|
|||
|
errorName: 'failure'
|
|||
|
})
|
|||
|
static hideNavigationBar(): Promise<any> { return; }
|
|||
|
|
|||
|
}
|