lucasr/dspec — pull request #1 by devunwired (2014-09-08 14:57:27+00:00)
Title: Refactor DesignSpecFrameLayout to draw on top of content.

The problem with using onDraw() in a ViewGroup is that this method actually draws ***underneath*** the child view contents. This is an acceptable scenario for a basic layout with lots of transparency, but as soon as your view hierarchy starts including any significant amount of background images or colors, the grid becomes completely invisible.

To properly draw ***over*** the content in a ViewGroup, override dispatchDraw() and call your custom code after super. A nice side-effect of this is that you no longer has to disable the drawing optimization in ViewGroup either.