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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 3
Registered: ‎06-25-2012
My Device: Playbook
My Carrier: T-mobile

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
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

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
Highlighted
New Contributor
Posts: 3
Registered: ‎06-25-2012
My Device: Playbook
My Carrier: T-mobile

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
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

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
Posts: 3
Registered: ‎06-25-2012
My Device: Playbook
My Carrier: T-mobile

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)">

<fxSmiley Frustratedcript>
<![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;

}

]]>
</fxSmiley Frustratedcript>

<fxSmiley Very Happyeclarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fxSmiley Very Happyeclarations>


<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
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

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.