I'm curious guys,
What are the exact cases doTraversal -> performTraversals
is called? Since I have pretty heavy Activity, I want the application to call onDraw
or the sort. performTraversals is pretty heavy, it is trying/measuring if it should resize views, stuff like that I guess. And I don't need it when I'm making some view, that no other view is dependent on, GONE, but I guess I can't skip that. So before digging into the source of Android, I want to ask. If you know it, please feel free to share :)
Thanks, Danail
performTraversals()
has many jobs but its three main roles are:
Every time Android needs to redraw a window, performTraversals()
is invoked. It does not mean however that measure/layout happens every time performTraversals() executes. You cannot skip performTraversals()
if you are using a standard views (only SurfaceView lets you bypass this when drawing.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With