mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
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
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
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; }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user