I needed days to understand why invalidate(Rect dirty)it is not installing the correct clip on newer devices.
The problem is what is installed by default hardwareAccelerated="true".
When I install this one hardwareAccelerated="false",
I get my right clip in mine onDraw.
Now my question is:
What is better for performance:
Use hardwareAccelerated="false"and draw only the part of my view that is dirty and run only the code in my onDraw, which is necessary for this
OR
allow hardwareAccelerationand allow the android to display my whole view again and again?
I assume that this question can be answered for each application separately, so I am adding a screenshot of my application.

As you can see, I draw a calendar, and every time the user clicks on an entry, this should have a red frame.
Can you give me any suggestions that are best suited for this requirement?
Cheers, Stefan
source
share