title: Transparent layout - not transparent on Android 2.3
body: <p>I have a transparent layout used for holding a banner advert in my app. The layout sits on top of my game area constantly, but the ads only appear once in a while. The code works as follows:          </p>
  
  <pre><code>transparent_linearlayout_to_hold_banner.setBackgroundColor(Color.TRANSPARENT);   
  game_frame_layout.addView(transparent_linearlayout_to_hold_banner);
  setContentView(game_frame_layout);
  </code></pre>
  
  <p>When I want an ad to be shown I do a </p>
  
  <pre><code>transparent_linearlayout_to_hold_banner.addView(adView);
  </code></pre>
  
  <p>When I want the ad to disappear I do a </p>
  
  <pre><code>transparent_linearlayout_to_hold_banner.removeView(adView);
  </code></pre>
  
  <p>This works perfectly on my Galaxy S !! with 4.0.3, but on my Galaxy tab with 2.3 I find that my transparent_linearlayout_to_hold_banner turns black as soon as the add appears, and remains black forever more, even when the ad is removed.</p>
  
  <p>Any idea what is happening?... and how to fix it?</p>
  
  <p><strong>EDIT:</strong> after some experimentation, I worked out that the colour of the layout is not changing, but the alpha channel is. My guess is that perhaps the SDK of the banner ad system is calling some function(s) to make sure that the banner itself is not transparent, and then (depending on the OS version) this is having the side effect of making its parent layout non-transparent.</p>