title: Android - Admob - Loading ad then changing visibility causes problems
body: <p>Long version: I have an Android game. In each "screen" I'm showing the ads BUT the game screen itself - where you actually play. Now, if you launched the app-game (ad begins to load) and then clicked on "Start" before the ad has finished loading - it won't be shown when it should be (only a little strip of it)</p>
  
  <p>Short version: Calling <code>AdView.loadAd</code> and then calling <code>AdView.setVisibility(View.INVISIBLE)</code> <strong>before</strong> the ad was received will yield a weird result if we call <code>AdView.setVisibility(View.VISIBLE)</code> <strong>after</strong> the ad is loaded.</p>
  
  <p>This happens:</p>
  
  <p><img src="https://i.stack.imgur.com/CMipr.png" alt="enter image description here"></p>
  
  <p>Instead of, for example: </p>
  
  <p><img src="https://i.stack.imgur.com/GfnFK.jpg" alt="enter image description here"></p>
  
  <p>Now, clicking on this tiny strip left is <strong>still</strong> counted as clicking on the ad - clicking on it does whatever clicking on the ad would do (launching the browser and such...)</p>
  
  <p>And should you go back to the home screen (I.E click the home button) then get back to the application, the ad is seen back again as it should.</p>
  
  <p>Did anyone encouter it, and does anyone have any idea how to solve it? Thanks.</p>
  
  <p><strong>EDIT:</strong> Here is the relevant code:</p>
  
  <p>Creating the ad view:</p>
  
  <pre><code>this.mAdView = new AdView(this, AdSize.BANNER, "xxxxxxxxxxxxx");
  </code></pre>
  
  <p>Creating the layout params:</p>
  
  <pre><code>final FrameLayout.LayoutParams adViewLayoutParams =
              new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT,
                      FrameLayout.LayoutParams.WRAP_CONTENT,
                      Gravity.TOP | Gravity.CENTER_HORIZONTAL);
  </code></pre>
  
  <p>Creating the root view group, and its layout params:</p>
  
  <pre><code>final FrameLayout frameLayout = new FrameLayout(this);
  final FrameLayout.LayoutParams frameLayoutLayoutParams =
              new FrameLayout.LayoutParams(FrameLayout.LayoutParams.FILL_PARENT,
                      FrameLayout.LayoutParams.FILL_PARENT);
  </code></pre>
  
  <p>Adding to the root view group:</p>
  
  <pre><code>frameLayout.addView(this.mAdView, adViewLayoutParams);
  </code></pre>
  
  <p>And eventually, setting content view:</p>
  
  <pre><code>this.setContentView(frameLayout, frameLayoutLayoutParams);
  </code></pre>