2017-01-21 05:04:31 +08:00
|
|
|
|
import { Cordova, Plugin } from './plugin';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2017-01-21 05:07:05 +08:00
|
|
|
|
* @beta
|
2017-01-21 05:04:31 +08:00
|
|
|
|
* @name NavigationBar
|
|
|
|
|
* @description
|
2017-01-21 05:07:05 +08:00
|
|
|
|
* The NavigationBar plugin can you to hide and auto hide the android navigation bar.
|
2017-01-21 05:04:31 +08:00
|
|
|
|
*
|
|
|
|
|
* @usage
|
|
|
|
|
* ```typescript
|
|
|
|
|
* import { NavigationBar } from 'ionic-native';
|
|
|
|
|
*
|
|
|
|
|
* let autoHide: boolean = true;
|
|
|
|
|
* NavigationBar.hide(autoHide);
|
|
|
|
|
* ```
|
|
|
|
|
*/
|
|
|
|
|
@Plugin({
|
2017-01-23 06:13:42 +08:00
|
|
|
|
pluginName: 'NavigationBar',
|
2017-01-21 05:04:31 +08:00
|
|
|
|
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'
|
|
|
|
|
})
|
2017-01-21 05:07:28 +08:00
|
|
|
|
static setUp(autohide?: boolean): Promise<any> { return; }
|
2017-01-21 05:04:31 +08:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Hide the navigation bar.
|
|
|
|
|
* @return {Promise<any>}
|
|
|
|
|
*/
|
|
|
|
|
@Cordova({
|
|
|
|
|
callbackStyle: 'object',
|
|
|
|
|
successName: 'success',
|
|
|
|
|
errorName: 'failure'
|
|
|
|
|
})
|
|
|
|
|
static hideNavigationBar(): Promise<any> { return; }
|
2017-01-21 05:07:05 +08:00
|
|
|
|
|
2017-01-21 05:04:31 +08:00
|
|
|
|
}
|