- Welcome, Guest. Please Login or Register
MindFusion  
  We are soon releasing MindFusion.JavaScript pack. Initial version includes chart, diagram, calendar, map, virtual keyboard, gauge and UI components. Here are the beta version and live demo for anyone interested.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
Detect when repaint() finishes
Read 878 times

reedm60   Offline
YaBB Newbies
*
Posts: 10
I Love MindFusion!


   
     
 
Detect when repaint() finishes
Jan 2nd, 2019 at 8:31pm
 
Is the Diagram.repaint() function synchronous?  If not, is there a way to detect when it is complete?
 
 
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1718
Gender: male
tech.support


   
     
 
Re: Detect when repaint() finishes
Reply #1 - Jan 3rd, 2019 at 10:36am
 
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
 
 
 
IP Logged    
 
     

reedm60   Offline
YaBB Newbies
*
Posts: 10
I Love MindFusion!


   
     
 
Re: Detect when repaint() finishes
Reply #2 - Jan 3rd, 2019 at 12:12pm
 
Thank you so much!
 
 
 
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print