Есть такая разметка. ScrollView
заезжает на AdView
. Подскажите как сделать так, чтобы внизу был AdView
, а всю остальную часть занимал ScrollView
?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg"
android:padding="10dp">
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/imgBludo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/no_image"
app:riv_border_color="@color/brown"
app:riv_border_width="2dp"
app:riv_corner_radius="4dp" />
<TextView
android:id="@+id/txtName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/background_corners"
android:gravity="center"
android:padding="10dp"
android:text="TextView"
android:textColor="@color/brown"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtIngredients"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/background_corners"
android:padding="10dp"
android:text="TextView"
android:textColor="@color/brown" />
<TextView
android:id="@+id/txtDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/background_corners"
android:padding="10dp"
android:text="TextView"
android:textColor="@color/brown" />
</LinearLayout>
</ScrollView>
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>