The MindFusion Forums
Flow Diagramming Components >> Android >> Detect when repaint() finishes
https://mindfusion.eu/Forum/YaBB.pl?num=1546461069

Message started by reedm60 on Jan 2nd, 2019 at 8:31pm

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

Title: Re: Detect when repaint() finishes
Post by Slavcho on 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

Title: Re: Detect when repaint() finishes
Post by reedm60 on Jan 3rd, 2019 at 12:12pm
Thank you so much!

The MindFusion Forums » Powered by YaBB 2.6.11!
YaBB Forum Software © 2000-2024. All Rights Reserved.