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
Developer
Posts: 193
Registered: ‎12-29-2010
My Device: Bold 9900
My Carrier: Rogers

Re: Hide Virtual Keyboard

@moseslecce

 

I too wanted a numeric keyboard, but couldn't really get a good one with the virtual keyboard. So I just created some room on my app, and implelmented my own keypad....with keys 0-9 and the "." (decimal), clear and "-" (negative) buttons.

 

It was a good challenge I would say. And to be honest looks a bit more professional, since I was able to customize my own borders, layout, color scheme etc.

 

If you can, I would suggest you just make your own. If you need help let me know...preferably start a new thread, since this one is about "hid virtual keyboard" only Smiley Happy

 

 

 

G

Highlighted
Contributor
Posts: 14
Registered: ‎02-11-2011
My Device: Not Specified

Re: Hide Virtual Keyboard

[ Edited ]

@gpatton

 

i also created my own keyboard type input like you on the app screen itself (i like it better than the pop up keyboard anyways).


was just wondering how you made it so when you click in the TextInput field the default popup keyboard doesn't show up?

 

Thanks

 

Developer
Posts: 77
Registered: ‎11-03-2009
My Device: 9810 Torch
My Carrier: VIPnet

Re: Hide Virtual Keyboard

Regards to all,

 

in terms of the virtual keyboard, to hide is is enough to write:

getVirtualKeyboard().setVisibility(VirtualKeyboard.HIDE);

 and to show it again,

getVirtualKeyboard().setVisibility(VirtualKeyboard.SHOW);

 

In Re: to the question about Numeric virtual keyboard, there is a number of articles out there, but to give you a quick, no -explanation answer here is the line of the code that does it for you:

 

AutoTextEditField MyNumericField = new AutoTextEditField("Numeric Field: ", "", 7, AutoTextEditField.FILTER_INTEGER);

// your key component here is AutoTextEditField.FILTER_INTEGER, of course :-)

 

Happy codeing to all!

 

Regards,

Hrvoje

New Developer
Posts: 4
Registered: ‎05-10-2011
My Device: Developer
My Carrier: AT&T

Re: Hide Virtual Keyboard

Hi all,

The getVirtualKeyboard() method does not seem to be available in the 2.0 SDK. Or am I missing something?

 

Is there another way of showing/hiding the virtual keyboard programatically?

 

Thanks in advance!

Developer
Posts: 442
Registered: ‎08-02-2010
My Device: Z10
My Carrier: Telus

Re: Hide Virtual Keyboard

I used to be able to do it prior to os 2 using 

 

this.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, change);
...
protected function change(event:StageOrientationEvent):void {
				if(navigator.stage.orientation == "portrait"){
					trace("portrait");
					mainTextField.needsSoftKeyboard = false;
					IMFConnection.imfConnection.hideInput(); // hide keyboard
					}else{
					IMFConnection.imfConnection.showInput();
				}
			}

 

New Developer
Posts: 4
Registered: ‎05-10-2011
My Device: Developer
My Carrier: AT&T

Re: Hide Virtual Keyboard

Yeah, it looks like the way to do it in v1 SDK doesnt work in v2. Here is what I ended up doing to programatically hide the virtual keyboard for v2 SDK:

 

this.stage.focus = null;

 

Developer
Posts: 442
Registered: ‎08-02-2010
My Device: Z10
My Carrier: Telus

Re: Hide Virtual Keyboard

dcfusion: have you gotten this to work with StageOrientationEvent.ORIENTATION_CHANGE? I'm trying to do my keyboard visibility stuff inside that event handler but i can't even get a trace to work.