簡體   English   中英

如何在Android中正確放置AdMob位置

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM