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
Posts: 4
Registered: ‎01-05-2009
My Device: Not Specified

How to keep the header of screen visible when virtual keyboard display?

Hi all,

I have the issue as follow:

 

There is a EditField on screen and lays at the bottom of screen. When i move focus to this field, the virtual keyboard show on automatically, it makes the screen scroll up and hide a part of the header. Can anyone show me how to keep the header visible in this case?

This problem doesn't occur if i don't make focus to EditField.

And is there any listener for virtual keyboard 's display/undisplay event, edit field 's focus event?

BlackBerry Development Advisor
Posts: 15,264
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: How to keep the header of screen visible when virtual keyboard display?

What header region are you referring to?  Do you mean the title area of a MainScreen?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 4
Registered: ‎01-05-2009
My Device: Not Specified

Re: How to keep the header of screen visible when virtual keyboard display?

It 's just custom tab control and lays on the top of screen. I want to keep tab control fixed and only change the content area below. In this case, the virtual keyboard shows  on and makes screen sroll up. Now i found the solution to solve this problem. By using these method:

 

protected void onMenuDismissed(Menu menu);  (Screen method)

protected void onFocus(int direction); (EditField method)

 

I can catch the event of opening or closing Virtual Keyboard and call Screen.invalidate() method to repaint and reduce the content area.

Thanks very much for your reply.

Highlighted
Developer
Posts: 638
Registered: ‎07-02-2009
My Device: Not Specified

Re: How to keep the header of screen visible when virtual keyboard display?

can you tell me what editfield method and screen method refers to in your code. just a little more description. am facing the same problem.

 

it is  very helpful to me.

Thanks and Regards,
PraveenGoparaju.