レイアウトで 2 つの AdView を作成する必要があります。レイアウトの上部と下部の両方。私は1つ(上)のためにやった。ここで、レイアウトの下部にもう 1 つの AdView を作成したいと考えています。それを達成する方法は?前もって感謝します。次のように、レイアウトのトップ AdView の私のコード。
@SuppressWarnings({ "deprecation", "unused" })
public class BannerEssentials extends Activity{
WebView webview;
static String MY_BANNER_UNIT_ID="google";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// BANNER 1
// Lookup R.layout.main
AbsoluteLayout layout = (AbsoluteLayout)findViewById(R.id.linearLayout);
// Create the adView
// Please replace MY_BANNER_UNIT_ID with your AdMob Publisher ID
AdView adView = new AdView(this, AdSize.BANNER, MY_BANNER_UNIT_ID);
// Add the adView to it
layout.addView(adView);
// Initiate a generic request to load it with an ad
AdRequest request = new AdRequest();
request.setTesting(true);
adView.loadAd(request)