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

Java Development

Reply
New Developer
only_vimal
Posts: 17
Registered: ‎02-06-2009
My Device: Not Specified

How to show or hide Keyboard using code?

Dear Friends,

 

I have to show or hide keyboard through code. I am displaying one EditField on screen at that time Keyboard by default invoke, but my requirement is that when user want to type (fingure press on editbox) in Editbox at that time Keyboard must be enable(invoke).

 

OS that I use is : JDE 4.7

Simulator : BB Strom 9530 Verizon

 

Please help me to solve out this issue.

 

With Regards,

Vimal 

Please use plain text.
Developer
amardeepjaiman
Posts: 293
Registered: ‎02-25-2009
My Device: Not Specified

Re: How to show or hide Keyboard using code?

 

VirtualKeyBoard v = screenObj.getVirtualKeyBoard();

 

Call below line when basicEditField gets Focus.

 

v.setVisibility(VirtualKeyBoard.SHOW);

 

and call below line when BasicEditField loose focus.

 

 v.setVisibility(VirtualKeyBoard.HIDE);

Please use plain text.
Regular Contributor
galeb
Posts: 77
Registered: ‎11-03-2009
My Device: 9810 Torch
My Carrier: VIPnet

Re: How to show or hide Keyboard using code?

It should be enough just by invoking the following line:

getVirtualKeyboard().setVisibility(VirtualKeyboard.HIDE);

 

Please use plain text.