I\'m using quite a large amount of NinePatchDrawables in the app views. The underlying Bitmaps are cached, so there is no memory issue.
While preparing/drawing the
So far (even in Android M) there's no bug fix for the graphics driver bug (Adreno 420), but I found a way to work around the bug. It's definitely not a long time solution, but for the moment it's just the best available to stop apps from crashing.
I reduced the number of graphics layers to a minimum (flattened many layered graphics)
I disabled GPU rendering for particular graphic layers. It slows the drawing down a bit, but not significant.
view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
Within the "software" layers, you can still set particular views to "hardware" rendering, if you need to.
view.setLayerType(View.LAYER_TYPE_HARDWARE, null);