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
Contributor
Dan277
Posts: 21
Registered: ‎04-10-2013
My Device: All
My Carrier: 447920403580

Problem with virtual keyboard

How can I set the virtual keyboard to numeric? This works when an edit field has focus: editField.setFilter(new NumericTextFilter()); but when an editfield has not got focus it automatically changes to a full qwerty keyboard.

Please use plain text.
Developer
simon_hain
Posts: 16,113
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Problem with virtual keyboard

afaik there is no API for it, the numeric filter is all that comes to my mind on this topic.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Contributor
Dan277
Posts: 21
Registered: ‎04-10-2013
My Device: All
My Carrier: 447920403580

Re: Problem with virtual keyboard

I am aware that there is no API for it and that is exactly the problem. I am hoping that I can set the numeric filter for an editfield that is off the screen and allow that to have focus the same time as other fields or to allow my custom buttonfields to accept the numeric filter. I have not found a way to do either of those. Can someone please help me with this?
Please use plain text.
Developer
peter_strange
Posts: 19,603
Registered: ‎07-14-2008
My Device: Not Specified

Re: Problem with virtual keyboard

I can't actually help, but just wanted to suggest that perhaps what you are trying to do sounds a little weird to me.  You say

"allow my custom buttonfields to accept the numeric filter"

But will users be expecting a keyboard when there is no visible text area to type into?

Please use plain text.
Contributor
Dan277
Posts: 21
Registered: ‎04-10-2013
My Device: All
My Carrier: 447920403580

Re: Problem with virtual keyboard

On certain screen resolutions I have forced the keyboard to display. I have done this because it allows me to layout the display correctly and I don't want a keyboard to overlap fields when there's lots of room on the screen. I don't want the keyboard to keep changing to a full text keyboard when there is absolutely no text to be entered on that screen, just numbers. It seems like there is no correct way to use the virtual keyboard with such a limited API, but it would be way to much extra work to design a virtual keyboard from scratch.
Please use plain text.
Developer
simon_hain
Posts: 16,113
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Problem with virtual keyboard

you will have to adjust your usecase with the limitations of the API.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.