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

Commit d672505

Browse files
committed
updated README.md to reflect added Keyboard.show method for Android
1 parent cff381d commit d672505

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Methods
1111
- cordova.plugins.Keyboard.hideKeyboardAccessoryBar
1212
- cordova.plugins.Keyboard.close
1313
- cordova.plugins.Keyboard.disableScroll
14+
- cordova.plugins.Keyboard.show
1415

1516
Properties
1617
--------
@@ -20,7 +21,7 @@ Properties
2021
Events
2122
--------
2223

23-
These events are fired on the window.
24+
These events are fired on the window.
2425

2526
- native.keyboardshow
2627
* A number `keyboardHeight` is given on the event object, which is the pixel height of the keyboard.
@@ -62,7 +63,7 @@ Supported Platforms
6263

6364
- iOS, Android
6465

65-
66+
6667
Keyboard.disableScroll
6768
=================
6869

@@ -76,22 +77,32 @@ Supported Platforms
7677

7778
- iOS
7879

80+
Keyboard.show
81+
=================
82+
83+
Force keyboard to be shown on Android. This typically helps if autofocus on a text element does not pop up the keyboard automatically
84+
85+
cordova.plugins.Keyboard.show();
86+
87+
Supported Platforms
88+
89+
- Android
7990

8091
native.keyboardshow
8192
=================
8293

8394
This event fires when the keyboard will be shown
8495

8596
window.addEventListener('native.keyboardshow', keyboardShowHandler);
86-
97+
8798
function keyboardShowHandler(e){
8899
alert('Keyboard height is: ' + e.keyboardHeight);
89100
}
90101

91102
Properties
92103
-----------
93104

94-
keyboardHeight: the height of the keyboard in pixels
105+
keyboardHeight: the height of the keyboard in pixels
95106

96107

97108
Supported Platforms
@@ -106,7 +117,7 @@ native.keyboardhide
106117
This event fires when the keyboard will hide
107118

108119
window.addEventListener('native.keyboardhide', keyboardHideHandler);
109-
120+
110121
function keyboardHideHandler(e){
111122
alert('Goodnight, sweet prince');
112123
}

0 commit comments

Comments
 (0)