One of the coolest features of Flex SDK 4.6 comes in form of Soft Keyboard types.
There are few of them as stated below
- contact
- default
- number
- punctuation
- url
1 2 3 4 5 |
<s:TextInput softKeyboardType="contact" text=""/> <s:TextInput softKeyboardType="default" text=""/> <s:TextInput softKeyboardType="number" text=""/> <s:TextInput softKeyboardType="email" text=""/> <s:TextInput softKeyboardType="url" text=""/> |
Also if you would want to force user input to be in capital letters only then you can set another helpful property “autoCapitalize” to true, You can also check for spelling setting the property autoCorrect to true. so the above code can be re-written as below
1 2 3 4 |
<s:TextInput softKeyboardType="contact" text="" autoCapitalize="true" autoCorrect="true"/> <s:TextInput softKeyboardType="default" text="" autoCapitalize="true" autoCorrect="true"/> <s:TextInput softKeyboardType="number" text=""/> <!-- No effect of putting the above properties here--> <span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 14px; line-height: 19px; white-space: normal;">.... .... </span> |
1 |
You can read more about the Soft keyboards here
I would also recommend this article written by Holy Schinsky
All in all I am loving the soft keyboard types introduced in Flex 4.6
If you have any question please share with everyone by leaving your comments
I hope this helps
Cheers
Hi
I am running Flash Builder 4.6 on Windows.
When I test my application, is there a possiblity to test softkeyboard on desktop and not on the device itself?
Thanks
Faouzi
Hi faouzi
The default emulator that ships with FB I can say does not provide this. You have to rely on your device testing for many missings “must have” things in FB emulation.