How can you disable admob on a page: this is how i implemented it in XML and main activity (of course i have string with Ad-id:
XML below:
<LinearLayout
android:layout_alignParentBottom="true"
android:id="@+id/AdsArea"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
</LinearLayout>
Main activity below:
private void loadGoogleAds() {
LinearLayout rootLayout = (LinearLayout) findViewById(R.id.AdsArea);
AdView adView = new AdView(this);
adView.setAdSize(AdSize.BANNER);
adView.setAdUnitId(getString(R.string.ad_unit_id));
rootLayout.addView(adView, 0);
AdRequest adRequest = new AdRequest.Builder().build();
adView.loadAd(adRequest);