title: Android : AdMob onClickListener
body: <p>I display into my android application <strong>AdMob's</strong> banners. I would like that when the user click on the banner it gone. I have try the code <code>AdView.setOnClickListener</code> but it not work...</p>
  
  <p>EDIT : this is the code</p>
  
  <pre><code>private void visual_banner(){
  //##### Pubblicità #####
          //Create the adView    
          adView = new AdView(this, AdSize.BANNER, "a14e5bed604ebf8");   
          // Lookup your LinearLayout assuming it’s been given    
          // the attribute android:id="@+id/mainLayout"    
          LinearLayout layout = (LinearLayout)findViewById(R.id.layout_ads_streaming);    
          // Add the adView to it    
          layout.addView(adView); 
          // Initiate a generic request to load it with an ad    
          adView.setOnClickListener(new OnClickListener(){
  
              @Override
              public void onClick(View arg0) {
                  adView.destroy();
                  img.setVisibility(View.VISIBLE);
              }
          });
          adView.loadAd(new AdRequest());
          //### FINE PUBBLICITA'
  }
  </code></pre>