【问题标题】:Admob with ScrollView and TableLayoutAdmob 与 ScrollView 和 TableLayout
【发布时间】:2014-04-01 19:48:26
【问题描述】:

使用此代码,我的横幅不会出现..

我不知道我能做什么。有人可以帮助我吗?

这是我的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>

【问题讨论】:

    标签: admob scrollview tablelayout


    【解决方案1】:

    您已告诉 ScrollView 消耗其父级的所有可用高度。将其配置更改为:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-11-08
      • 2023-03-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多