Reputation: 20412
I have a fragment with a ViewPager
. I am showing an AdMob banner of the bottom of the fragment.
For a specific page I would like not to show the banner, as I want to use the whole screen space to display the information.
Is it allowed to setVisibility(View.GONE)
on the banner for a specific page, then back to setVisibility(View.VISIBLE)
for the other pages. Or is there a better way to do that?
Upvotes: 1
Views: 159
Reputation: 815
Be careful though, you should call adView.pause(), when not showing the banner and adView.resume() when showing it again. This way your app will not mess with your and Google's statistics
Upvotes: 1