如何在LWUIT中检测按住窗体上的按钮,以及如何检测该按钮被释放。
Yoo have in form and button in Lwuit functions that take care about thus actions.
keyPressed(int keyCode)- keyboard press
keyReleased(int keyCode) - keyboard released
pointerPressed(int x, int y) - touch press
ublic void pointerReleased(int x, int y) - touch released
Button has pressed() and released() methods which you can override to detect long press. To detect short presses just use addActionListener() on the button.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.