Android AdMobs帮助

Android AdMobs帮助,android,admob,Android,Admob,可能重复: 我正试图放一个广告,但一旦广告加载,程序中的所有其他内容都会消失,只留下广告。我知道我第一次问这个问题时又搞砸了,尽管请帮忙 <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:id="@+id/linearLayout" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns

可能重复:

我正试图放一个广告,但一旦广告加载,程序中的所有其他内容都会消失,只留下广告。我知道我第一次问这个问题时又搞砸了,尽管请帮忙

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/linearLayout" android:layout_width="fill_parent"            android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads">
          <com.google.ads.AdView 
        android:id="@+id/adView" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content"
        ads:adUnitId="a14ddfjakd;fs;jds;jf4bd"
        ads:adSize="BANNER"
        ads:loadAdOnCreate="true"/>  

    <ScrollView android:id="@+id/scrollView1" android:layout_width="fill_parent" android:layout_height="fill_parent">
        <LinearLayout android:id="@+id/linearLayout2" android:layout_width="fill_parent" android:layout_height="fill_parent">
            <ImageView android:src="@drawable/item" android:layout_width="fill_parent" android:layout_gravity="center" android:layout_height="wrap_content" android:id="@+id/imageView1" android:scaleType="center"></ImageView>
        </LinearLayout>

    </ScrollView>

</LinearLayout>

将android:orientation=垂直添加到初始LinearLayout标记


默认方向为水平,这意味着横幅会将屏幕上的其他内容推到一边。

您发布了两次相同的问题,并在最后一个问题上标记了错误的答案。将来,如果您想更改某些内容,您可以随时编辑您的问题。