Я пытаюсь приблизить кнопку «Продолжить» внизу, но она не выровнена с нижней частью. Эта проблема возникает, когда я использую ScrollView, ниже XML и изображение. Я пытался всеми возможными способами поместить кнопку продолжения внизу с ScrollView внутри XML.
Если я не включаю scrollView , макет соответствует тому, что мне нужно
скриншот
<?xml version="1.0" encoding="utf-8"?>
<ScrollView android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/backgroundColor"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout 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"
android:orientation="vertical"
android:background="@color/backgroundColor">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="USER AGREEMENT"
android:textColor="@android:color/white"
android:gravity="center"
android:id="@+id/userAgereement"
android:layout_marginTop="20dp"
android:textSize="@dimen/textSize"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Beijing Pinnacle Global & Alex Edu\n(BPGE & Alex Edu)"
android:textColor="@android:color/white"
android:gravity="center"
android:layout_marginEnd="5dp"
android:layout_marginStart="5dp"
android:id="@+id/belowHeadingText"
android:layout_marginTop="20dp"
android:textSize="@dimen/endSize"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Today's Date : 25th of August, 2019"
android:textColor="@android:color/white"
android:gravity="center"
android:layout_marginTop="20dp"
android:id="@+id/date"
android:textSize="@dimen/endSize"/>
<View
android:layout_width="270dp"
android:layout_gravity="center"
android:layout_marginTop="4dp"
android:background="@android:color/white"
android:layout_height="1dp">
</View>
<ImageView
android:layout_marginTop="20dp"
android:layout_width="171dp"
android:layout_height="239dp"
android:layout_gravity="center"
android:clickable="true"
android:foreground="?attr/selectableItemBackgroundBorderless"
android:src="@drawable/useragreemnet"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="You Are Going To Sign The User Agreement\nKindly, Provide Us Your Details"
android:textColor="@android:color/white"
android:gravity="center"
android:id="@+id/belowImageText"
android:layout_marginTop="20dp"
android:textSize="@dimen/endSize"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:layout_gravity="center"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
android:layout_width="230dp"
app:cardElevation="@dimen/elevation"
app:cardCornerRadius="@dimen/cornerRadiusForButtons"
app:cardBackgroundColor="@color/functionalityColor"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="20dp"
android:layout_height="@dimen/buttonHeight">
<Button
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="@dimen/buttonHeight"
android:clickable="true"
android:foreground="?attr/selectableItemBackgroundBorderless"
android:id="@+id/proceed"
android:text="PROCEED"
android:onClick="onClick"
android:textSize="@dimen/buttonTextSize"
android:textColor="@android:color/white"
android:background="@android:color/transparent"
android:layout_marginBottom="20dp"/>
</android.support.v7.widget.CardView>
</RelativeLayout>
</LinearLayout>
</ScrollView>