I have developed a midlet 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?
Just to clarify: You're writing this as a MIDlet, and not as a CLDC application? So your custom text field extends javax.microedition.lcdui.CustomItem instead of being a net.rim.device.api.ui.component? Is there a reason you're using the MIDlet API instead of using RIM's user interface classes?
It's probably simpler to use the net.rim.device.api.ui classes. In that case you can implement your custom field's onFocus and onUnfocus methods to show and hide the virtual keyboard (net.rim.device.api.ui.VirtualKeyboard).
Yes you are right, I am not using RIM API as I want my midlet to be cross-platform.
In my midlet I have used STANDARD TEXT FIELD which is available in the Java MIDP API. It produce the virtual keypad when I touch this standard text field which comes with the Java MIDP API.
In the same way what should I do so that it can produce the virtual keypad even on custom items also?
Joined: Sep 17, 2010
RIM has some APIs that extend the MIDlet user interface APIs -- I would start there.
Have you tried using net.rim.device.api.lcdui.BlackBerryCustomItem? The JavaDoc says "This class extends the functionality of the javax.microedition.lcdui.CustomItem class to include full touch support."
Joined: Sep 22, 2010
Thanks, I got that. But then I'll have to use RIM API, so it will not be cross-platform. On touching custom text field, it should produce virtual keypad which is provided by the device vendor. IE on Samsung full touch screen, it will produce Samsung's virtual keypad, and on Nokia full touch, it will produce Nokia's virtual key pad. Are you getting me? Is there nay way or setting to achieve this? Best Regards.