Android Admob:Ad元件荷载“;“在上面”;版式
从图中可以看到,广告元素加载在版面的顶部,而不是下方 广告加载后,我如何调整列表的大小?我希望广告位于列表下方(而不是顶部)(由于重叠,目前无法看到列表中的一个元素) 这是我的布局(RelativeLayout):Android Admob:Ad元件荷载“;“在上面”;版式,android,layout,admob,overlap,Android,Layout,Admob,Overlap,从图中可以看到,广告元素加载在版面的顶部,而不是下方 广告加载后,我如何调整列表的大小?我希望广告位于列表下方(而不是顶部)(由于重叠,目前无法看到列表中的一个元素) 这是我的布局(RelativeLayout): 在FrameLayout上添加android:layout_over=“@+id/adLayout”,告诉它具体位于广告版面的顶部 <!-- dynamic fragment --> <FrameLayout android:id="@+id/content
在FrameLayout上添加
android:layout_over=“@+id/adLayout”
,告诉它具体位于广告版面的顶部
<!-- dynamic fragment -->
<FrameLayout
android:id="@+id/contentFragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/include1" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
</LinearLayout>
</FrameLayout>
<LinearLayout
android:id="@+id/adLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
</LinearLayout>
private void populateAdView() {
AdRequest adRequest = new AdRequest();
adRequest.addTestDevice(AdRequest.TEST_EMULATOR); // Emulator
adView = new AdView(this, AdSize.BANNER, "a151410c0882629");
LinearLayout ll = (LinearLayout) findViewById(R.id.adLayout);
ll.addView(adView);
adView.loadAd(adRequest);
//reduce FrameLayout height
//adView.loadAd(new AdRequest());
}