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
Contributor
Posts: 10
Registered: ‎12-09-2010
My Device: Not Specified

Hide Virtual Keyboard

Is there a way to show/hide the virtual keyboard programmatically?

 

Thanks,

-Giraldo

 

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

Re: Hide Virtual Keyboard

Not at this time, but this has been asked about in another thread.

Developer
Posts: 216
Registered: ‎02-18-2010
My Device: 9350,8520
My Carrier: no

Re: Hide Virtual Keyboard

[ Edited ]

You can do this by using following code:

 

 

 VirtualKeyboard virtKbd;
 virtKbd = getVirtualKeyboard();			  virtKbd.setVisibility(VirtualKeyboard.HIDE_FORCE);

OR

virtKbd.setVisibility(VirtualKeyboard.SHOW_FORCE);

 

But I  use this only on strom not on tablet

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Hide Virtual Keyboard

hey Aman,

 

although that holds true, the Java SDK is a lot different than the AIR SDK provided. Also the java sdk has been around for a long time and has had time to mature. Hopefully eventually the AIR SDK will provide us with an API to call out the keyboard on will. Till then we are gonna have to work without it unfortunately.

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
Posts: 409
Registered: ‎12-10-2010
My Device: PlayBook
My Carrier: N/A

Re: Hide Virtual Keyboard

 

package
{
	//Imports
	import qnx.input.IMFConnection;
	import qnx.input.IMFKeyboardOptions;

	//Class
	public class KeyboardController
	{	
		//Show QNX Keyboard
		private static function showKeyboard():void
		{
			IMFConnection.imfConnection.showInput();
		}
		
		//Hide QNX Keybaord
		private static function hideKeyboard():void
		{
			IMFConnection.imfConnection.hideInput();
		}
	}
}

 

From my previous post:  QNX Keyboard Control [UNOFFICIAL]

 


PlayBook Applications:
Drop Swatch
Contributor
Posts: 31
Registered: ‎01-20-2011
My Device: Torch 9800
My Carrier: Bell

Re: Hide Virtual Keyboard

Hello,

 

Is there a way to force a numeric keyboard (i.e. numbers only) using the setKeyboardOptions and IMFKeyboardOptions?

 

Regards,

Moses

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Hide Virtual Keyboard

@mosesiecce: yes, there is a property on the TextInput class called keyboardType that can set the type of the keyboard that shows up. more detail can be found here:

 

http://www.blackberry.com/developers/docs/airapi/1.0.0/qnx/ui/text/TextInput.html#keyboardType

 

good luck!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Contributor
Posts: 31
Registered: ‎01-20-2011
My Device: Torch 9800
My Carrier: Bell

Re: Hide Virtual Keyboard

Hello,

 

I know there are the following constants:

 

public static const DEFAULTSmiley Frustratedtring = "default";
        public static const PINSmiley Frustratedtring = "pin";
        public static const PHONESmiley Frustratedtring = "phone";
        public static const EMAILSmiley Frustratedtring = "email";
        public static const URLSmiley Frustratedtring = "url";

 

Though, none of these work for a numeric keyboard.  Is anyone aware of this functionality, or is RIM working on adding this?  It would be a good feature request to have, to be able to bring up a keyboard for numbers (i.e. in a calculator).

 

Phone is the cloest we have at the moment I suppose.

 

Regards,

Moses

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

Re: Hide Virtual Keyboard

These are documented keyboard layouts.  It is a different story if they all work as expected.

Contributor
Posts: 31
Registered: ‎01-20-2011
My Device: Torch 9800
My Carrier: Bell

Re: Hide Virtual Keyboard

They work.. but its lacking an option to specify a numeric only keyboard as far as I can tell.