2013-08-21 48 views
0

我正在爲eclipse開發一個android應用程序,我一直在想這個xml代碼會在頁面底部顯示admob。此xml代碼是否顯示應用程序底部的admob?

我在模擬器上啓動了這個,admob沒有顯示,但我不知道是因爲代碼還是因爲我必須等待大約2分鐘才能看到admob。

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" 
android:layout_width="fill_parent" android:id="@+id/rltvLayout1" 
android:layout_height="fill_parent"> 

    <WebView android:id="@+id/web_engine" 
     android:layout_width="fill_parent" android:layout_height="fill_parent" 
     android:fitsSystemWindows="true" /> 



     <com.google.ads.AdView 
      android:id="@+id/adView" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_gravity="bottom" 
      android:layout_alignParentBottom="true" 
      android:layout_alignParentLeft="true" 
      ads:adSize="BANNER" 
      ads:adUnitId="my code" 
      ads:refreshInterval="60" > 
     </com.google.ads.AdView> 

</RelativeLayout> 

回答

0

我認爲你缺少

ads:loadAdOnCreate="true" 

試試這個,如果它沒有幫助,然後把你的java 文件

相關問題