1
你怎麼能在頁面上禁用的AdMob:這是怎麼了我的XML和主要活動(當然我有串用Ad-ID實現它:下面如何在頁面上禁用的AdMob
XML:
<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>
下面
主要活動:
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);
因此這將消除一個頁面而不是整個廣告權的廣告? –
是的,我認爲是。你可以試試他.. – FAT
它工作正常嗎? – FAT