-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(navigationbar): add NavigationBar plugin #826
Changes from 2 commits
556e9ea
af6369e
74af1b5
2f08582
478a8cc
e44f7e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
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: 'plugins.navigationbar', | ||
repo: 'https://github.com/cranberrygame/cordova-plugin-navigationbar', | ||
platforms: ['Android'] | ||
}) | ||
export class NavigationBar { | ||
|
||
/** | ||
* Hide the navigation bar. | ||
* @param autohide {boolean} | ||
* @param callbacks {Object} Optional callbacks | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove this line and add:
|
||
*/ | ||
@Cordova() | ||
static setUp(autohide?: boolean = false, callbacks?: {success?: Function, failure?: Function}): void { } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should return a Promise. The decorator should include the following options:
Then finally remove the |
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aren't you missing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes you're right. This is missing: https://github.com/cranberrygame/cordova-plugin-navigationbar/blob/master/www/navigationbar.js#L12 |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it should be
navigationbar
insteadThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right.. it is
navigationbar