Android AdMobs problem

前端 未结 1 1911
心在旅途
心在旅途 2021-01-29 09:56

I am trying to put in an ad but once the ad loads up, everything else in the program goes away leaving nothing but the ad.



        
相关标签:
1条回答
  • 2021-01-29 10:05

    Your linearlayouts height is set to fill_parent and that causes a problem since it's parent, your scrollview, is also set to height:fill_parent.

    Try this:

    <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="wrap_content">
                <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>
    
    0 讨论(0)
提交回复
热议问题