You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to CodenameOne Discussions
I can override onShow or cal addShowListener() in order to know when a form is being displayed. I use this to start a timer. I'd like to cancel the timer when the form is not visible (ie user went home, or turned the display off, or selected another form). How can I do this?
Shai Almog
unread,
Oct 15, 2016, 10:47:24 PM10/15/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to CodenameOne Discussions, howud...@gmail.com
If you use UITimer it will not invoke if the form is hidden. However it will keep counting down so it might invoke immediately if the form is shown.
howud...@gmail.com
unread,
Oct 15, 2016, 10:55:07 PM10/15/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to CodenameOne Discussions, howud...@gmail.com
I will look into UITimer. What I have done for now is in showListener I create a timer. In the timer event i check if (Display.getInstance().getCurrent() != this) and kill the timer. That seems to work so far.