Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Detect when repaint() finishes (Read 1144 times)
reedm60
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 10
Joined: Oct 31st, 2018
Detect when repaint() finishes
Jan 2nd, 2019 at 8:31pm
Print Post  
Is the Diagram.repaint() function synchronous?  If not, is there a way to detect when it is complete?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 2033
Joined: Oct 19th, 2005
Re: Detect when repaint() finishes
Reply #1 - Jan 3rd, 2019 at 10:36am
Print Post  
Diagram.repaint delegates to View.invalidate. According to Android docs - Invalidates the whole view. If the view is visible, onDraw(android.graphics.Canvas) will be called at some point in the future. You could derive from DiagramView and override its onDraw method, and will know painting has completed after calling super.onDraw. Alternatively you could handle diagram's drawForeground event - it will be raised just after the diagram draws all its items.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
reedm60
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 10
Joined: Oct 31st, 2018
Re: Detect when repaint() finishes
Reply #2 - Jan 3rd, 2019 at 12:12pm
Print Post  
Thank you so much!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint