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
Developer
gpatton
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 :smileyhappy:

 

 

 

G

Please use plain text.
Contributor
rob1302
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

 

Please use plain text.
Regular Contributor
galeb
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

Please use plain text.
New Developer
dcfusion
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!

Please use plain text.
Developer
RapsFan
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();
				}
			}

 

Please use plain text.
New Developer
dcfusion
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;

 

Please use plain text.
Developer
RapsFan
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.

Please use plain text.