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
Developer
Posts: 109
Registered: ‎03-13-2010
My Device: BlackBerry 8520 Curve Smartphone
My Carrier: -

Producing Virtual Keypad on Custom Items

Hi Everyone,

 

I have developed a midlet [not used RIM API] with some custom items. When midlet starts it shows the login screen with the custom designed USERNAME and PASSWORD fields. When user enters letters/numbers through the keypad on the device, they get displayed in the selected custom item. I have managed to give the same effect as like of actual standard TextField.

 

But it requires keypad on the device. It wont work on the full touch screen phones, as there is no way to enter letters/numbers on the full touch screen devices.

 

On full touch screen, if I touch on the standard TextField [not custom designed], application produces virtual keypad on the screen. In the same way, What should I do so that application can produce the virtual keypad when user touches the custom item?

 

Best Regards

 

 

Developer
Posts: 109
Registered: ‎03-13-2010
My Device: BlackBerry 8520 Curve Smartphone
My Carrier: -

Re: Producing Virtual Keypad on Custom Items

Is there any way to do this? Please let me know if it cant be possible at all. I am sure there must be a way to achieve this. I am desperately waiting for the reply. If you have any idea, any help will be greatly appreciated.  Thanks.

 

Best Regards.

Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Producing Virtual Keypad on Custom Items

i don't know how this could be achieved without using rim 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
Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Producing Virtual Keypad on Custom Items

You would need to use one of the BlackBerry* classes that extend the MIDlet UI elements (BlackBerryForm, BlackBerryTextBox etc). From here you can retrieve a handle to the VirtualKeyboardControl using the getControls() method which can then be used to control the visibility of the virtual keyboard.

 

Regards,

Garett
@garettBeuk
--
Goodbye everybody!
Developer
Posts: 109
Registered: ‎03-13-2010
My Device: BlackBerry 8520 Curve Smartphone
My Carrier: -

Re: Producing Virtual Keypad on Custom Items

Thanks simon,

 

Please tell me the name of RIM class for virtual keypad. Even if I decided to use RIM class for virtual keypad, how can I attach it to my Custom Text Fields, so that when user touch the field, it will produce the RIM's virtual keypad?

 

Best Regards.

Developer
Posts: 109
Registered: ‎03-13-2010
My Device: BlackBerry 8520 Curve Smartphone
My Carrier: -

Re: Producing Virtual Keypad on Custom Items

Thanks Garett,

 

Not only RIMs forms or text fields, application will produce the virtual keypad also for MIDPs standard textfields. But I have not used the standard textfields. How can I produce them on Custom Items. Here, USERNAME and PASSWORD fields are not a standard text fields. They are actually a designed items called custom items.

 

Best Regards.

Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Producing Virtual Keypad on Custom Items

while I have no experience working with the classes mentioned by Garett you could maybe create one of these fields just to call the virtual keyboard.

you can overwrite onFocus (if there is something similar in plain j2me) and call the rim-field, getComponents and use showVirtualKeyboard.

----------------------------------------------------------
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
Developer
Posts: 109
Registered: ‎03-13-2010
My Device: BlackBerry 8520 Curve Smartphone
My Carrier: -

Re: Producing Virtual Keypad on Custom Items

When I used the standard text field from the Java MIDP API in my midlet, it produces virtual keypad when user touches the standard text field. IN THIS CASE ALSO I AM NOT USING ANY RIM'S API OR CLASS. This virtual keypad will look different on different phones like samsung, nokia or blackberry as it is produced by device itself. right?

 

Then in the same way it should produce the virtual keypad on custom items also. What should I do so that it will produce virtual keypad on the custom items also, without using any RIMs API? Is there any setting should I do? Or is there any listener should I attach on my custom items?

 

Here I cant use RIMs API because it will fail on other devices.

 

Please guide me to sort out this problem. Best Regards.