awesome-cordova-plugins/src/plugins/navigationbar.ts
John-Luke 70c15c31ca feat(navigationbar): add NavigationBar plugin (#826)
* feat(navigationbar): add NavigationBar plugin

* fix(navigationbar) typo in chore

* Implement changes requested

* fix(): add return

* fix(docs): remove callback parameter

* Update navigationbar.ts
2017-01-20 16:04:31 -05:00

50 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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; }
}