You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> BREAKING CHANGE in plugin version 4.0.0: we used to extend a `TextView`, now it's a `TextField`, because I finally hacked my way around a problem that prevented a TextField from emitting a `textChange` event. Note that unless you use the `decorate()` function this will not affect you (bar some now-fixed UI glitches).
21
+
20
22
## Installation
21
23
From the command prompt go to your app's root folder and execute:
Check out [the demo](demo) to play with the keyboard. You can run it by typing `npm run demo.iphone` / `npm run demo.ipad` at the root of the project.
29
31
30
32
## How it works
31
-
This plugin wraps a [native keyboard library](https://cocoapods.org/?q=MMNumberKeyboard) and extends a regular [NativeScript TextView](https://docs.nativescript.org/cookbook/ui/text-view). You can set any property you'd normally set on this widget (`class`, `text`, etc) and a few plugin-specific properties as well.
33
+
This plugin wraps a [native keyboard library](https://cocoapods.org/?q=MMNumberKeyboard) and extends a regular [NativeScript TextField](https://docs.nativescript.org/cookbook/ui/text-field).
34
+
You can set any property you'd normally set on this widget (`class`, `text`, etc) and a few plugin-specific properties as well.
32
35
33
36
You can either define the keyboard in XML or in code - use whichever tickles your fancy.
34
37
35
38
## Screenshot-driven documentation
36
-
After adding the plugin you can add a namespace to your view (using `NumKey` below) and use the `NumericKeyboardView` tag to render a TextView powered by this plugin.
39
+
After adding the plugin you can add a namespace to your view (using `NumKey` below) and use the `NumericKeyboardView` tag to render a TextField powered by this plugin.
// this is an example with all possible properties, not that they make sense combined :)
111
114
newNumericKeyboard().decorate({
112
-
textView: textView,
115
+
textField: textField,
113
116
returnKeyTitle:"Go!",
114
117
locale:"en_US", // or "nl_NL", or any valid locale really (to define the decimal char)
115
118
noReturnKey:true,
@@ -119,6 +122,4 @@ export function pageLoaded(args: observable.EventData) {
119
122
}
120
123
```
121
124
122
-
Note that you really need to use a `TextView`, not a `TextField` for this to work as rendering the keyboard works fine, but getting its value just seems to get messed up when we set a different keyboard view. Shouldn't be a problem though, just something to keep in mind.
123
-
124
-
Also note that on Android you'll just get a numeric keyboard as usual (since we specified `keyboardType="number"`).
125
+
Note that on Android you'll just get a numeric keyboard as usual (since we specified `keyboardType="number"`).
0 commit comments