Banner Ads won't go away!

So, I’m stumped. I have my banner ad working but I don’t want it to display while the player is playing the game. I’ve tried destroying the ad, setting its visibility and removing the layout. I just can’t seem to get the ad to disappear. Here is the code that SHOULD work but doesn’t. Anybody have any luck getting banner ads to disappear?

            AdView view = (AdView)ll.FindViewById(AdView.Id);

            view.Visibility = ViewStates.Gone;

What is this?

It’s a linear layout that holds the banner ad.

1 Like

Just looked awkward to me…

I don’t do android or ads but supposing the container for the view has a parent, is there no way to find it?

I’ve tried removing the parent using the RemoveView method but still the ad persists. I’ve also tried call RemoveAllViews of the parent to try and remove the ad view. Unfortunately it doesn’t work either. Thanks for the suggestions though.

1 Like