【问题标题】:Android adMob inside a webview - layout issuewebview中的Android adMob - 布局问题
【发布时间】:2011-06-30 06:56:50
【问题描述】:

我目前正在尝试将使用 adMob 的广告放在 webview 的底部,但到目前为止 webview 正在占据整个屏幕。我基本上只想要底部的小横幅和顶部的 webview

这是我所拥有的:

<LinearLayout 
android:id="@+id/linearLayout1" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical">
    <LinearLayout 
    android:layout_height="wrap_content" 
    android:id="@+id/footer" 
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_weight="1">
    <WebView
    android:id="@+id/sdrwebview"
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:layout_gravity="top"/>
    </LinearLayout>

</LinearLayout>

有什么想法吗?谢谢

【问题讨论】:

    标签: android layout android-layout uiwebview admob


    【解决方案1】:

    【讨论】:

      【解决方案2】:

      试试

      android:layout_height="0dp"
      android:layout_weight="1"
      

      而不是

      android:layout_height="fill_parent"
      

      在 Web 视图上

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2010-12-13
        • 2012-08-04
        • 2011-06-09
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多