0
我无法正确发布admob在带有顶部的Progressbar的LinearLayout中的webview。我尝试了很多方法,使用Relatives,并在Stackoverflow中搜索并执行一些步骤,但此Progressbar将无法工作。Webview + admob在底部+ LinearLayout
<?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:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ProgressBar
android:id="@+id/ProgressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="false"
android:maxHeight="10dip"
android:minHeight="10dip"
android:progress="50"
android:progressDrawable="@drawable/greenprogress" />
<WebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
<com.google.ads.AdView
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-7041222655570180/1503313077"
ads:loadAdOnCreate="true"
ads:refreshInterval="30" >
</com.google.ads.AdView>
</LinearLayout>
非常感谢你Tenfour,它的工作! :-) – David
就像我的魅力一样。我敬礼。 –
我对使用Fragments展示广告有疑问。 ([link](https://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start))。如果没有互联网连接,内容是否会延伸并填满屏幕? – user2731584