FrameLayout for drawing overlays in a game? Battery?
<p>I've got a game, a custom View class draws my gameboard. I'm thinking of drawing some elements on a separate layer above the gameboard. I could do this in the View's canvas code, but since they won't change frequently, was thinking of introducing a frame layout to display this top layer:</p>

<pre><code>&lt;FrameLayout&gt;
  &lt;LinearLayout /&gt; // game board
  &lt;LinearLayout background="#00000000"/&gt; // stuff like cards, other overlays.
&lt;/FrameLayout&gt;

    vs

&lt;LinearLayout /&gt; // game board, draw cards etc on every onDraw() call myself.
</code></pre>

<p>I'm not sure which route to take, the only reason I wouldn't do the FrameLayout is because I'm not sure if it has an impact on battery life. Everytime onDraw() is called, the system probably has to do an alpha composition of the two layers. Is that more battery consuming than drawing the elements from that layer myself in my canvas on every frame? Hard to answer since I'm not sure how complex the drawing will be yet, any general opinions?</p>

<p>Thanks</p>
