Skip to main content
Participant
September 10, 2011
Answered

Android TextFieldType.INPUT for digits only!

  • September 10, 2011
  • 1 reply
  • 931 views

Hello,

i've created a textField with TextFieldType.INPUT and restricted it to all digits.

Example:

textField=new TextField();

textField.type=TextFieldType.INPUT;

textField.restrict="1234567890";

Now i want to know, if it is possible, to set this field as "digits only". If i tap on the textField in my Emulator or my android device, the standart virtual QWERTY keyboard appears. I want to know if it is possibel to set the field to a "digit field", that the "digit only" keyboard appears to the user.  Something like the keyboard that appears if i want to call someone.

This topic has been closed for replies.
Correct answer Pahup

This feature is available in AIR 3 Beta.

Please see http://labs.adobe.com/technologies/flashplatformruntimes/air3/ for more detail.

API reference is @ http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/text/StageText.html#softKeyboardType

Though you will not be able to use this with TextField, you'll have to use StageText to draw the text field.

A nice article on StageText - http://blogs.adobe.com/cantrell/archives/2011/09/native-text-input-with-stagetext.html

-Pahup

1 reply

Pahup
Adobe Employee
PahupCorrect answer
Adobe Employee
September 12, 2011

This feature is available in AIR 3 Beta.

Please see http://labs.adobe.com/technologies/flashplatformruntimes/air3/ for more detail.

API reference is @ http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/text/StageText.html#softKeyboardType

Though you will not be able to use this with TextField, you'll have to use StageText to draw the text field.

A nice article on StageText - http://blogs.adobe.com/cantrell/archives/2011/09/native-text-input-with-stagetext.html

-Pahup