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
jai1989
Posts: 27
Registered: ‎07-27-2011
My Device: curve
My Carrier: vodafone

Dont want "Show keyboard" in the menuitems

hello,

 

i dont want show keyboard option in the menuitem of a particular screen. what should i do, i have used super(NO_SYSTEM_MENU_ITEMS). but it also removes the other option i.e. "Switch application", so basically i dont want that, i just want to remove the option of virtual keyboard from the menuitem.... on rim 4.7 or above.

 

thanks

 

Please use plain text.
New Developer
jai1989
Posts: 27
Registered: ‎07-27-2011
My Device: curve
My Carrier: vodafone

Re: Dont want "Show keyboard" in the menuitems

plz some one react quickly

 

Please use plain text.
Contributor
Roshni
Posts: 45
Registered: ‎12-20-2010
My Device: Not Specified

Re: Dont want "Show keyboard" in the menuitems

[ Edited ]

Hi,

 

Override the makeMenu() method of your screen in which you don't want Show Keyboard menu Item.

In the implementation iterate the menuItems of the menu and get the "Show Keyboard" position in menu on string check and then call deleteItem(int position)

 

Something like this:

 

makeMenu(){

             for(int i = 0; i < menu.getSize(); i++){
                    MenuItem currentItem = menu.getItem(i);
                    if("Show Keyboard".equals(currentItem.toString())){
                        menu.deleteItem(i);
                        break;
                    }
                }

}

 

If solved thn press Kudos button.

Please use plain text.
New Developer
jai1989
Posts: 27
Registered: ‎07-27-2011
My Device: curve
My Carrier: vodafone

Re: Dont want "Show keyboard" in the menuitems

Thankyou Roshni ,

 

but we have got another way too !!

 

For the Virtual Keyboard specifically, you can get a handle on the Screen's designated Virtual Keyboard as outlined in the following document:

http://docs.blackberry.com/en/developers/deliverables/13222/Displaying_touch_screen_keyboard_647781_...

 

From here, you can call VirtualKeyboard.setVisibility(VirtualKeyboard.HIDE_FORCE) to disable the Virtual Keyboard; this will in turn remove the menu item.



 

 

Please use plain text.
Contributor
Roshni
Posts: 45
Registered: ‎12-20-2010
My Device: Not Specified

Re: Dont want "Show keyboard" in the menuitems

Thanks Jai,

 

For sharing the knowledge.

 

-Roshni

Please use plain text.
Developer
peter_strange
Posts: 19,603
Registered: ‎07-14-2008
My Device: Not Specified

Re: Dont want "Show keyboard" in the menuitems

Please use plain text.