0
現在我正在創建一個Android應用程序,該應用程序使用HTML5Webview播放視頻。我從此下載HTML5webview https://code.google.com/p/html5webview/在HTML5Webview中添加admob時沒有足夠的廣告空間
現在,我想在此應用程序中添加admob橫幅。但是,當我這樣做時,我有一個問題。我的廣告未顯示,因爲「廣告空間不足」。 SS錯誤消息:http://prntscr.com/3lk1t0
在Html5web視圖中,佈局使用FrameLayout。我認爲,問題是關於佈局。我搜索其他引用以在FrameLayout中添加admob,但所有引用都使用RelativeLayout。
如何解決此問題?
這是我的XML佈局:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@+id/fullscreen_custom_content"
android:visibility="gone"
android:background="@color/black"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<LinearLayout android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<com.google.android.gms.ads.AdView android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="0dp"
android:paddingRight="0dp"
ads:adSize="BANNER"
ads:adUnitId="*****"/>
</LinearLayout></FrameLayout>
,這是我的活動課,你可以透過Dropbox看到 - > Klik for Activity class
我的問題是,如何如果我的代碼是這樣的,請添加admob。以前感謝。