how to open numeric keypad keyboard flex mobile application text field focus

Well with Flex SDK 4.6 it is a possibility and very easy to do so.

Flex SDK 4.6 introduces many types of soft keyboard types, out of all those one type is type “Number”.

Generally we would want a numeric only keypad for text field where we are expecting people to fill only numeric values such as Age, Date of birth fields, IDs etc etc

Without wasting any more time lets see how this is done

If you want to specify whether a virtual keyboard should be displayed when this Interactive Object instance receives focus the you can set “needsSoftKeyboard” property to true so the above logic can be re written as

Read more about this option here http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/display/InteractiveObject.html#needsSoftKeyboard

So now when you launch your application then you will get the numeric keypad when your textfield get the focus as shown below

In iPhone 4

 

 

 

 

 

In Galaxy Tab (Android)

 

 

 

 

 

 

 

 

I will discuss about other keyboard types in my next post

I hope this helps

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.