Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
New Contributor
tonymac001
Posts: 3
Registered: ‎06-25-2012
My Device: Playbook

softKeyboardType

I am probably missing something obvious, but I am unable to get 'softKeyboardType="number"' to work. In fact what ever type I choose I get the normal soft keyboard on my Playbook. I am using it with an ' TextInput' and I am using import statements, ie. import 'qnx.ui.text.KeyboardType;' and 'qnx.fuse.ui.text.TextInput;' although I am not sure if I should use them. I use Flash Builder 4.6. Any help would be much appreciated. Cheers Tony

Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: softKeyboardType

I believe the types are defined in the KeyboardType class. The value is "PIN", not "number".

https://developer.blackberry.com/air/apis/qnx/fuse/ui/text/KeyboardType.html
New Contributor
tonymac001
Posts: 3
Registered: ‎06-25-2012
My Device: Playbook

Re: softKeyboardType

Hi jtegen, thanks for that. I did not think you had to use an event to change the soft keyboard, I will try that. Do you know which event is first triggered to bring the soft keyboard up whenthe text input is touched by the user. Cheers Tony.

Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: softKeyboardType

You dont need to use an event to display the keyboard. The Keyboard type just controls which keyboard is displayed (pin, url, email, etc.) that are defined in the KeyboardType class. Keyboard will be shown on any text field control.
New Contributor
tonymac001
Posts: 3
Registered: ‎06-25-2012
My Device: Playbook

Re: softKeyboardType

Hi again jtegen, I still cant get the keyboard to show different views,

 

I have done some quick code to test, but I am obviousley doing something wrong. Most information I have seen says it should work by using '<s:TextInput id="KeyBoardInput" x="10" y="4" softKeyboardType="number"/>'  

 

Code:

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView"
viewActivate="view1_viewActivateHandler(event)">

<fx:smileyfrustrated:cript>
<![CDATA[
import flash.text.SoftKeyboardType;
import qnx.fuse.ui.text.KeyboardType;
import qnx.ui.text.KeyboardType;
import spark.events.ViewNavigatorEvent;
import flash.ui.KeyboardType;

protected function view1_viewActivateHandler(event:Event):void
{


/* KeyBoardInput.softKeyboardType = qnx.fuse.ui.text.KeyboardType.PIN; */


KeyBoardInput.softKeyboardType = flash.ui.KeyboardType.KEYPAD;
KeyBoardInput.softKeyboardType = qnx.fuse.ui.text.KeyboardType.PIN;

}

]]>
</fx:smileyfrustrated:cript>

<fx:smileyvery-happy:eclarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:smileyvery-happy:eclarations>


<s:TextInput id="KeyBoardInput" x="10" y="4" softKeyboardType="number"/>

 


</s:View>

 

I am using the playbook V2.0.1.358

 

Thanks for taking the time to look.

 

Tony

Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: softKeyboardType

Looks like you need to use the QNX TextInput control. I know you were testing things, but you have the softKeyboardType set twice in your activation handler. Finally, QNX controls are AS3 only, no MXML.