i am doing a application with this main.xml layout :
<?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>
开发者_如何学C <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>
So you can see that i have 4 tabs zones, and i want to put my ads in yellow zone of my image in all tabs :
how could i do such thing.
Thanks in advance.
This is what i wanted :
<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>
精彩评论