Flex mobile – how to open email, contact, url, punctuation keyboard keypad on textfield focus

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

  1. contact
  2. default
  3. email
  4. number
  5. punctuation
  6. url
All of them serves specific needs, say for example if you accept user email addresses from within your mobile app then its a good move to show a specific keyboard just for that purpose.
so how is it done?
Flex SDK introduces a new class called SoftKeyboardType. You select the keyboard type with the softKeyboardType  property on the text input control.
example is shown below as to how we can make use of the soft keyboards

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

You can read more about the Soft keyboards here

http://help.adobe.com/en_US/flex/mobileapps/WS82181550ec4a666a39bafe0312d9a274c00-8000.html#WS19f279b149e7481c-33fab5fe1331cc6b62f-8000

I would also recommend this article written by Holy Schinsky

http://devgirl.org/2011/11/29/flex-mobile-development-flex-4-6-cool-new-soft-keyboard-features-sample-w-source/

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

 

 

 

 

 

 

Comments

  1. 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.

Leave a Reply

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