Reputation: 498
I searched for but couldnt get answers
I'm calling the admob this way:
AdView adView = (AdView)this.findViewById(R.id.ad);
adView.loadAd(new AdRequest());
Ok, but how can I turn invisible the admob? (Including the view) And after be able to enable again?
Upvotes: 0
Views: 527
Reputation: 1149
adView.setVisibility(View.GONE);
Edit:
You can also set it to adView.setVisibility(View.INVISIBLE);
.The difference between INVISIBLE
and GONE
is that GONE
removes the view completely from the layout while INVISIBLE
"saves" the space this view takes.
Upvotes: 3