Skip to content
This repository was archived by the owner on Apr 2, 2018. It is now read-only.

Commit d8aabd0

Browse files
committed
Update README
1 parent b324bb6 commit d8aabd0

File tree

1 file changed

+60
-27
lines changed

1 file changed

+60
-27
lines changed

README.md

Lines changed: 60 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
Keyboard
22
======
33

4-
> The `Keyboard` object provides some functions to customize the iOS keyboard.
5-
4+
The `Keyboard` object on the `cordova.plugins` object provides functions to make interacting with the keyboard easier, and fires events to indicate that the keyboard will hide/show.
65

76
Methods
87
-------
98

10-
- Keyboard.resizeView
11-
- Keyboard.hideKeyboardAccessoryBar
12-
- Keyboard.close
13-
- Keyboard.disableScroll
9+
- cordova.plugins.Keyboard.hideKeyboardAccessoryBar
10+
- cordova.plugins.Keyboard.close
11+
- cordova.plugins.Keyboard.disableScroll
12+
13+
Properties
14+
--------
15+
16+
- cordova.plugins.Keyboard.isVisible
17+
18+
Events
19+
--------
20+
21+
- native.showkeyboard
22+
- native.hidekeyboard
1423

1524
Permissions
1625
-----------
@@ -22,27 +31,6 @@ Permissions
2231
</feature>
2332

2433

25-
Keyboard.resizeView
26-
=================
27-
28-
Shift the WebView up by the specified offset amount.
29-
30-
Keyboard.shrinkView(93.0);
31-
32-
To keep the WebView from shifting when selecting inputs:
33-
34-
Keyboard.shrinkView(0.0);
35-
36-
To return to default WebView behavior, specify any negative value.
37-
38-
Keyboard.shrinkView(-1.0);
39-
40-
41-
Supported Platforms
42-
-------------------
43-
44-
- iOS
45-
4634
Keyboard.hideKeyboardAccessoryBar
4735
=================
4836

@@ -81,3 +69,48 @@ Supported Platforms
8169
-------------------
8270

8371
- iOS
72+
73+
74+
native.showkeyboard
75+
=================
76+
77+
This event fires when the keyboard will be shown
78+
79+
window.addEventListener('native.showkeyboard', keyboardShowHandler);
80+
81+
function keyboardShowHandler(e){
82+
alert('Keyboard height is: ' + e.keyboardHeight);
83+
}
84+
85+
Properties
86+
-----------
87+
88+
keyboardHeight: the height of the keyboard in pixels
89+
90+
91+
Supported Platforms
92+
-------------------
93+
94+
- iOS, Android
95+
96+
97+
native.hidekeyboard
98+
=================
99+
100+
This event fires when the keyboard will hide
101+
102+
window.addEventListener('native.hidekeyboard', keyboardHideHandler);
103+
104+
function keyboardHideHandler(e){
105+
alert('Goodnight, sweet prince');
106+
}
107+
108+
Properties
109+
-----------
110+
111+
None
112+
113+
Supported Platforms
114+
-------------------
115+
116+
- iOS, Android

0 commit comments

Comments
 (0)