2014-02-28 49 views
0

使用此代碼我的旗幟不會出現..Admob with ScrollView and TableLayout

我不知道我能做些什麼。有人可以幫助我嗎?

這是我activity_main.xml中:

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 
    <ScrollView android:id="@+id/scrollLayout" 
     android:layout_height="fill_parent" 
     android:layout_width="fill_parent" 
     android:layout_above="@+id/adView"> 
     <TableLayout 

    android:id="@+id/myTableLayout" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    > 
    </TableLayout> 
    </ScrollView> 
    <com.google.ads.AdView 
     xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" 
     android:id="@id/adView" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     ads:adUnitId="ca-app-pub-3950917322157508/3705058678" 
     ads:adSize="BANNER" 
     ads:testDevices="TEST_EMULATOR" 
     ads:loadAdOnCreate="true"/> 
</RelativeLayout> 

回答

0

你告訴了滾動到conume它的所有父母的可用高度。將其設置更改爲:

<ScrollView android:id="@+id/scrollLayout" 
    android:layout_height="wrap_content" 
    android:layout_width="fill_parent" 
    android:layout_above="@+id/adView">