title: AdMob ads with a WebView in the same layout?
body: <p>I'm trying to implement AdMob ads with a WebView.  For the life of me, I can't get anything to show, even in the logs.  It's almost like the ads are not being called at all - my AdMob account shows no requests.  At first I was thinking the WebView was just taking up all the space in the layout, but now I'm second guessing myself, because I'm not seeing any LogCat output relating to ads.</p>
  
  <p>Layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"&gt;
        &lt;com.google.ads.AdView android:id="@+id/adView"
                   android:layout_width="wrap_content"
                   android:layout_height="wrap_content"
                   ads:adUnitId="[myIDishere]"
                   ads:adSize="BANNER"
                   ads:testDevices="[myhashishere]"
                   ads:loadAdOnCreate="true"/&gt;
    &lt;WebView
          android:id="@+id/webView"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent" /&gt;
  
    &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>And then my main activity:</p>
  
  <pre><code>public class MainActivity extends Activity {
  
  
  
  //StartServicesCheck
  
  
  private boolean checkPlayServices() {
        int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
        if (status != ConnectionResult.SUCCESS) {
          if (GooglePlayServicesUtil.isUserRecoverableError(status)) {
            showErrorDialog(status);
          } else {
            Toast.makeText(this, "This device is not supported.", 
                Toast.LENGTH_LONG).show();
            finish();
          }
          return false;
        }
        return true;
      } 
  
      void showErrorDialog(int code) {
        GooglePlayServicesUtil.getErrorDialog(code, this, 
            REQUEST_CODE_RECOVER_PLAY_SERVICES).show();
      }
  
      static final int REQUEST_CODE_RECOVER_PLAY_SERVICES = 1001;
  
      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        switch (requestCode) {
          case REQUEST_CODE_RECOVER_PLAY_SERVICES:
            if (resultCode == RESULT_CANCELED) {
              Toast.makeText(this, "Google Play Services must be installed.",
                  Toast.LENGTH_SHORT).show();
              finish();
            }
            return;
        }
        super.onActivityResult(requestCode, resultCode, data);
      }
  
  
  
  //EndServicesCheck
  
  private WebView mWebview ;
  
  @Override
  public void onBackPressed() {
      if(mWebview.canGoBack() == true){
          mWebview.goBack();
      }else{
          super.onBackPressed();
      }
  }
  
  
  public class BannerExample extends Activity {
        @Override
        public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          // Look up the AdView as a resource and load a request.
          AdView adView = (AdView)this.findViewById(R.id.adView);
          AdRequest adRequest = new AdRequest.Builder().build();
          adView.loadAd(adRequest);
        }
      }
  
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
  
      super.onCreate(savedInstanceState);
  
      mWebview  = new WebView(this);
  
      mWebview.getSettings().setJavaScriptEnabled(true); // enable javascript
      mWebview.getSettings().setBuiltInZoomControls(true);
  
      if(android.os.Build.VERSION.SDK_INT &gt;= 11) {
          mWebview.getSettings().setDisplayZoomControls(false);
      }
  
      final Activity activity = this;
  
      mWebview.setWebViewClient(new WebViewClient() {
          @Override
          public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
              Toast.makeText(activity, description, Toast.LENGTH_SHORT).show();
          }
      });
  
      mWebview .loadUrl("[webpagehere]");
      setContentView(mWebview );
  
  
      mWebview.setWebViewClient(new WebViewClient(){
  
          @Override
          public void onPageFinished(WebView view, String url) {
              // TODO Auto-generated method stub
              super.onPageFinished(view, url);
              mWebview.scrollTo(681, 100);
          }
  
      }
      );
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Do I have something wrong in my coding itself?  I'm kind of leaning that way because I'm not seeing requests or log output.</p>