If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA NetBeans 8.2
Desktop OS Windows 10
Simulator 3.7
Device Android & IOS
I want to take an action when a user touches and holds a Text Field for say 2 seconds.
Currently pressing and releasing brings focus and editing to that field. This is Ok.
However if held for >= 2 seconds, I want to perform a different action on this data.
Thoughts?
PS:
VinText.addPointerPressedListener(e -> {
try {
e.consume();
Dialog.show("VINText Event", "Event isLongEvent = [" + e.isLongEvent() + "] Type = " + e.getEventType(), "OK", null);
} catch (Exception er) {
er.printStackTrace();
}
});
Returns my Dialog immediately. Don't know how to determine if this was pressed for a period of time.
Also e.isLongEvent() returned false
I have looked at addActionListener results, it returns Edit and LongEvent = false when I press and hold this field for say 2 or more seconds.