Skip to main content

LWUIT for touch devices

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
sriramjava86
Offline
Joined: 2010-06-15

Hi ,

I am facing some issue in making my code work for touch devices.

AFAIK LWUIT works for touch devices and there is no special code that needs to be added.

My code works perfectly on Nokia E5 and it also used to work for Nokia c6(Touch) with virtual keypad enabled. And i used to select the commands and buttons using the virtual keypad. But now i just added one line in jad to disbale the virtual keypad , so the keypad is getting disabled but the touch is not working. I cant select the command. I am using a grid view with some set of buttons. When i touch any button then the bg color is getting changed( getPressedStyle()) but that bg is not going away, somehow i feel my buttons are in pressed state and they are not getting released. so tried all the possible ways.

Navi-Key-Hidden: true

Nokia-MIDlet-On-Screen-Keypad: no

Inserted just the above two lines in the jad file. And also tried it with "MIDlet-Touch-Support: true" as well but nothing worked in my case.

So do i need to set any extra parameters to make it work for touch devices? Am i missing anything here? or do i have any issues with my touch device? RIght now thats the only device i have with me and i am testing only on that, so is there any chances of it working on any other devices??

Thank You in Advance

sriram

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vprise
Offline
Joined: 2003-11-07

MIDlet-Touch-Support will cause your app to fail on a Nokia device (and any device that is spec compliant).

LWUIT works seamlessly with touch devices as you can see by using the LWUIT demo etc. on a touch device.

I'm guessing you handled events in a specific way assuming a key event e.g. overriding key pressed, trying to extract the key code from the action event etc.

To create a generic application you need to use commands and action events.

If you are still having trouble please try debugging your code in the simulators e.g. Sprint WTK which have pleanty of touch devices you can use for testing.