user1282637
user1282637

Reputation: 1867

How to properly hide an Admob Banner Ad

I have a banner ad in my trivia game like so:

<com.google.android.gms.ads.AdView
    android:id="@+id/adView"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    ads:adSize="BANNER" />

And I want to only show it every 5 questions. What is the proper way to hide the ad? If I simply set adView.setVisibility(View.GONE), is this correct? The reason I ask is because I'm not sure if ads will continue to load/give credit when the AdView is not visible. Thanks!

Upvotes: 1

Views: 854

Answers (1)

stktrc
stktrc

Reputation: 1639

Typically you won't get credit for having it as hidden. They will still load, but it was answered in one of Googles Q+As that you will not be getting credit for ads not seen by the end user.

Obviously from a financial point of view that makes sense. In your case, what you are doing is correct, but you won't get credit on the 4 questions in between in which the ad is hidden.

Upvotes: 0

Related Questions