I want to place the ad at the end of this WebView..
But when I place it under the WebView, it does not show. If I place it above the WebView, I will show as like as the attachment….
I try to change width and height, but it also does not work! That is why from my Facebook audience shows me a warning that your ad placement is wrong..
How can I fix it?
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Policy.PrivacyPolicy">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="#E53935"
android:textAlignment="center"
app:popupTheme="@style/Theme.BangabandhuT20Cup.PopupOverlay"
app:title="@string/privacy_policy_title"
app:titleTextColor="#FFFFFF">
</androidx.appcompat.widget.Toolbar>
<WebView
android:id="@+id/policyWebView"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</WebView>
<!--Google Admob Code-->
<com.google.android.gms.ads.AdView
android:id="@+id/banner_container00"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
app:adSize="BANNER"
app:adUnitId="@string/ad_id">
</com.google.android.gms.ads.AdView>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout >
2
Answers
You can use constraintlayout.
try this: