From a80c4ee2bf47feec4bd1e00c484350a5257cc107 Mon Sep 17 00:00:00 2001 From: Ibrahim Hadeed Date: Sun, 13 Mar 2016 15:19:21 -0400 Subject: [PATCH] feat(plugin): add keyboard --- src/plugins/keyboard.ts | 50 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/plugins/keyboard.ts diff --git a/src/plugins/keyboard.ts b/src/plugins/keyboard.ts new file mode 100644 index 000000000..d44915406 --- /dev/null +++ b/src/plugins/keyboard.ts @@ -0,0 +1,50 @@ +import {Cordova, Plugin} from './plugin' +import {Observable} from "rxjs/Observable"; + +@Plugin({ + plugin: 'ionic-plugin-keyboard', + pluginRef: 'cordova.plugins.Keyboard', + repo: 'https://github.com/driftyco/ionic-plugin-keyboard' +}) +export class Keyboard { + + /** + * Hide the keyboard accessory bar with the next, previous and done buttons. + * @param hide {boolean} + */ + @Cordova({ + sync: true + }) + static hideKeyboardAccessoryBar(hide : boolean) : void {} + + /** + * Close the keyboard if open + */ + @Cordova({ + sync: true + }) + static close() : void {} + + @Cordova({ + sync: true + }) + static disableScroll(disable : boolean) : void {} + + @Cordova({ + sync: true + }) + static show() : void {} + + @Cordova({ + sync: true + }) + static close() : void {} + + //static onKeyboardShow() : Observable { + // return new Observable( + // observer => { + // + // } + // ); + //} +} \ No newline at end of file