Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8149917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:56:50+00:00 2026-06-06T14:56:50+00:00

I wanted to ask, how to implement an AdListner for Admob. I want the

  • 0

I wanted to ask, how to implement an AdListner for Admob. I want the Ad to disapear if its clicked.
I tried this but it did not help.

final AdView ad1 = (AdView) findViewById(R.id.ad1);
        ad1.setOnClickListener(new View.OnClickListener() {

            public void onClick(View v) {
                // TODO Auto-generated method stub
                ad1.setVisibility(View.GONE);
                ad1.destroy();          }
        });

thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T14:56:51+00:00Added an answer on June 6, 2026 at 2:56 pm

    If someone is still searching for this, here is the code I used:

    public  class myActivity extends Activity implements AdListener{
        /** Called when the activity is first created. */
    
    
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
    
    
             AdView adView = (AdView)this.findViewById(R.id.ads2);
             adView.setAdListener(this);
            adView.loadAd(new AdRequest());
    
    
    
    
    
        }
    
        public void onDismissScreen(Ad arg0) {
            RelativeLayout rellayout = (RelativeLayout) findViewById(R.id.rellayout);
            AdView adView = (AdView)this.findViewById(R.id.ads2);
            rellayout.removeView(adView);
        }
    
        public void onFailedToReceiveAd(Ad arg0, ErrorCode arg1) {
            // TODO Auto-generated method stub
    
        }
    
        public void onLeaveApplication(Ad arg0) {
            // TODO Auto-generated method stub
    
        }
    
        public void onPresentScreen(Ad arg0) {
            // TODO Auto-generated method stub
    
        }
    
        public void onReceiveAd(Ad arg0) {
            // TODO Auto-generated method stub
    
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got started by following this awesome tutorial , but wanted to do the
I wanted to ask a quick question just to make sure I am not
I seem to have faced this problem many times and I wanted to ask
I wanted to ask, I have a div that I would want to place
I wanted to ask if anyone has tried using combination of Sencha's ExtJS 4
I wanted to ask, I have an array and I want to eliminate some
I need help and wanted to ask if somebody knows where to get the
I wanted to ask you what is the best approach to implement a cache
I wanted to ask that how to mention this in my interface public class
as a beginner, I have formulated some ideas, but wanted to ask the community

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.