我想在webview上顯示橫幅廣告。但不知道該怎麼做。Android admob在webview上顯示橫幅廣告
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_ptv"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.techndroid.cricketlivestreaming.Ptv">
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
ads:adSize="BANNER"
ads:adUnitId="@string/banner_ad_unit_id" />
<WebView
android:layout_below="@+id/adView"
android:id="@+id/webStream"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
我想要的廣告展示佈局的頂部。
我認爲它落後於web視圖。我需要顯示在網頁視圖
因爲你可以使用框架佈局 – jagteshwar751