Are all Android onDraw calls done in the same thread?
I have created a single Paint object and share it amongst all views in my program. Different views change the object to their liking (e.g., setTextSize(), setTextAlign(), etc.) before proceeding to use it. It works in the emulator. I’m afraid that it will crash on one of the phones/tablets. Will it? Are there any specs in this matter?
All calls by the framework to
onDrawoccur on the main (UI) thread. You should be able to share a singlePaintobject without crashes. However, the order in which the views are drawn is not predictable; do not have one view rely on another view having set a particular font, color, etc.