[英]How to put correctly AdMob position in android
我正在使用main.xml布局做一个应用程序:
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TabHost android:id="@+id/tabhost" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:id="@+id/linearLayout1"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical">
<TabWidget android:layout_width="fill_parent"
android:layout_height="wrap_content" android:id="@android:id/tabs"></TabWidget>
<FrameLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" android:id="@android:id/tabcontent">
<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="#013364"
android:id="@+id/tab1">
<ListView android:layout_height="wrap_content"
android:layout_width="fill_parent" android:id="@+id/listView2"
android:background="#efefef" android:cacheColorHint="#00000000"></ListView>
</LinearLayout>
<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="#013364"
android:id="@+id/tab2">
<ListView android:layout_height="wrap_content"
android:layout_width="fill_parent" android:id="@+id/listView1"
android:background="#efefef" android:cacheColorHint="#00000000"></ListView>
</LinearLayout>
<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" android:id="@+id/tab3">
<WebView android:layout_width="fill_parent"
android:layout_height="fill_parent" android:id="@+id/webview" />
</LinearLayout>
<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="#013364"
android:id="@+id/tab4">
<ListView android:layout_height="wrap_content"
android:layout_width="fill_parent" android:id="@+id/listView3"
android:background="#efefef" android:cacheColorHint="#00000000"></ListView>
</LinearLayout>
</FrameLayout>
</LinearLayout>
</TabHost>
因此,您可以看到我有4个标签区域,并且我想在所有标签中将广告放在图片的黄色区域中:
我该怎么做。
提前致谢。
这就是我想要的:
<FrameLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="#013364"
android:id="@+id/tab1">
<ListView android:id="@+id/android:list"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:background="#efefef" android:cacheColorHint="#00000000" android:layout_marginBottom="50dip"/>
//CODE OF ADS </FrameLayout>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.