Skip to content

Commit 62cfacc

Browse files
committed
use cordova.plugins.Keyboard as the primary namespace (#75)
1 parent 7897856 commit 62cfacc

File tree

2 files changed

+33
-32
lines changed

2 files changed

+33
-32
lines changed

README.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ This plugin was based on this Apache [project](https://github.com/apache/cordova
1010

1111
- [Installation](#installation)
1212
- [Methods](#methods)
13-
- [Keyboard.shrinkView](#keyboardshrinkview)
14-
- [Keyboard.hideFormAccessoryBar](#keyboardhideformaccessorybar)
15-
- [Keyboard.disableScrollingInShrinkView](#keyboarddisablescrollinginshrinkview)
16-
- [Keyboard.hide](#keyboardhide)
17-
- [Keyboard.show](#keyboardshow)
13+
- [cordova.plugins.Keyboard.shrinkView](#keyboardshrinkview)
14+
- [cordova.plugins.Keyboard.hideFormAccessoryBar](#keyboardhideformaccessorybar)
15+
- [cordova.plugins.Keyboard.disableScrollingInShrinkView](#keyboarddisablescrollinginshrinkview)
16+
- [cordova.plugins.Keyboard.hide](#keyboardhide)
17+
- [cordova.plugins.Keyboard.show](#keyboardshow)
1818
- [Properties](#properties)
19-
- [Keyboard.isVisible](#keyboardisvisible)
20-
- [Keyboard.automaticScrollToTopOnHiding](#keyboardautomaticscrolltotoponhiding)
19+
- [cordova.plugins.Keyboard.isVisible](#keyboardisvisible)
20+
- [cordova.plugins.Keyboard.automaticScrollToTopOnHiding](#keyboardautomaticscrolltotoponhiding)
2121
- [Events](#events)
2222
- [keyboardDidShow](#keyboarddidshow)
2323
- [keyboardDidHide](#keyboarddidhide)
@@ -38,11 +38,11 @@ From github latest (may not be stable)
3838

3939
# Methods
4040

41-
## Keyboard.shrinkView
41+
## cordova.plugins.Keyboard.shrinkView
4242

4343
Shrink the WebView when the keyboard comes up.
4444

45-
Keyboard.shrinkView(value, successCallback);
45+
cordova.plugins.Keyboard.shrinkView(value, successCallback);
4646

4747
#### Description
4848

@@ -55,15 +55,15 @@ Set to true to shrink the WebView when the keyboard comes up. The WebView shrink
5555

5656
#### Quick Example
5757

58-
Keyboard.shrinkView(true);
59-
Keyboard.shrinkView(false);
60-
Keyboard.shrinkView(null, function (currentValue) { console.log(currentValue); });
58+
cordova.plugins.Keyboard.shrinkView(true);
59+
cordova.plugins.Keyboard.shrinkView(false);
60+
cordova.plugins.Keyboard.shrinkView(null, function (currentValue) { console.log(currentValue); });
6161

62-
## Keyboard.hideFormAccessoryBar
62+
## cordova.plugins.Keyboard.hideFormAccessoryBar
6363

6464
Hide the keyboard toolbar.
6565

66-
Keyboard.hideFormAccessoryBar(value, successCallback);
66+
cordova.plugins.Keyboard.hideFormAccessoryBar(value, successCallback);
6767

6868
#### Description
6969

@@ -76,15 +76,15 @@ Set to true to hide the additional toolbar that is on top of the keyboard. This
7676

7777
#### Quick Example
7878

79-
Keyboard.hideFormAccessoryBar(true);
80-
Keyboard.hideFormAccessoryBar(false);
81-
Keyboard.hideFormAccessoryBar(null, function (currentValue) { console.log(currentValue); });
79+
cordova.plugins.Keyboard.hideFormAccessoryBar(true);
80+
cordova.plugins.Keyboard.hideFormAccessoryBar(false);
81+
cordova.plugins.Keyboard.hideFormAccessoryBar(null, function (currentValue) { console.log(currentValue); });
8282

83-
## Keyboard.disableScrollingInShrinkView
83+
## cordova.plugins.Keyboard.disableScrollingInShrinkView
8484

8585
Disable scrolling when the the WebView is shrunk.
8686

87-
Keyboard.disableScrollingInShrinkView(value, successCallback);
87+
cordova.plugins.Keyboard.disableScrollingInShrinkView(value, successCallback);
8888

8989
#### Description
9090

@@ -97,15 +97,15 @@ Set to true to disable scrolling when the WebView is shrunk.
9797

9898
#### Quick Example
9999

100-
Keyboard.disableScrollingInShrinkView(true);
101-
Keyboard.disableScrollingInShrinkView(false);
102-
Keyboard.disableScrollingInShrinkView(null, function (currentValue) { console.log(currentValue); });
100+
cordova.plugins.Keyboard.disableScrollingInShrinkView(true);
101+
cordova.plugins.Keyboard.disableScrollingInShrinkView(false);
102+
cordova.plugins.Keyboard.disableScrollingInShrinkView(null, function (currentValue) { console.log(currentValue); });
103103

104-
## Keyboard.hide
104+
## cordova.plugins.Keyboard.hide
105105

106106
Hide the keyboard
107107

108-
Keyboard.hide();
108+
cordova.plugins.Keyboard.hide();
109109

110110
#### Description
111111

@@ -118,13 +118,13 @@ Call this method to hide the keyboard
118118

119119
#### Quick Example
120120

121-
Keyboard.hide();
121+
cordova.plugins.Keyboard.hide();
122122

123-
## Keyboard.show
123+
## cordova.plugins.Keyboard.show
124124

125125
Show the keyboard
126126

127-
Keyboard.show();
127+
cordova.plugins.Keyboard.show();
128128

129129
#### Description
130130

@@ -137,15 +137,15 @@ Call this method to show the keyboard.
137137

138138
#### Quick Example
139139

140-
Keyboard.show();
140+
cordova.plugins.Keyboard.show();
141141

142142
# Properties
143143

144-
## Keyboard.isVisible
144+
## cordova.plugins.Keyboard.isVisible
145145

146146
Determine if the keyboard is visible.
147147

148-
if (Keyboard.isVisible) {
148+
if (cordova.plugins.Keyboard.isVisible) {
149149
// do something
150150
}
151151

@@ -158,12 +158,12 @@ Read this property to determine if the keyboard is visible.
158158

159159
- iOS
160160

161-
## Keyboard.automaticScrollToTopOnHiding
161+
## cordova.plugins.Keyboard.automaticScrollToTopOnHiding
162162

163163
Specifies whenether content of page would be automatically scrolled to the top of the page
164164
when keyboard is hiding.
165165

166-
Keyboard.automaticScrollToTopOnHiding = true;
166+
cordova.plugins.Keyboard.automaticScrollToTopOnHiding = true;
167167

168168
#### Description
169169

plugin.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
<js-module src="www/keyboard.js" name="keyboard">
1414
<clobbers target="window.Keyboard" />
15+
<clobbers target="cordova.plugins.Keyboard" />
1516
</js-module>
1617

1718
<!-- ios -->

0 commit comments

Comments
 (0)