So, I've tried different variations using ConstraintLayout
to keep it flat as possible but the code below was the best I could accomplish. Plus on top of that I'll need to add a ScrollView
as a layout parent. I'd appreciate if someone can help me out. Thanks in advance!
This is the xml I currently have:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:ignore="hardCodedText, contentDescription">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:paddingBottom="20dp"
android:elevation="@dimen/elevation">
<TextView
android:id="@+id/tv_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
style="@style/NDL.Typography.Standard02"
android:text="Hello there, help us fill out this information"/>
<android.support.design.widget.TextInputLayout
android:id="@+id/name_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="16dp"
android:layout_marginTop="16dp"
app:layout_constraintTop_toBottomOf="@id/tv_header"
app:layout_constraintStart_toStartOf="@id/tv_header"
android:hint="Name">
<EditText
android:id="@+id/name_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:paddingBottom="16dp"
style="NDL.Typography.Large01"/>
</android.support.design.widget.TextInputLayout>
<ImageView
android:id="@+id/name_info_icon"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginEnd="20dp"
android:src="@drawable/ic_icon_info"
android:tint="@color/blue_02"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/name_layout"
app:layout_constraintBottom_toBottomOf="@+id/name_layout"/>
<android.support.design.widget.TextInputLayout
android:id="@+id/address_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="16dp"
android:layout_marginTop="16dp"
app:layout_constraintTop_toBottomOf="@+id/name_layout"
app:layout_constraintStart_toStartOf="@+id/name_layout"
android:hint="Address">
<EditText
android:id="@+id/address_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textMultiLine"
android:paddingBottom="16dp"
style="NDL.Typography.Large01"/>
</android.support.design.widget.TextInputLayout>
<ImageView
android:id="@+id/address_icon_info"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginEnd="20dp"
android:src="@drawable/ic_icon_info"
android:tint="@color/blue_02"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/address_layout"
app:layout_constraintBottom_toBottomOf="@+id/address_layout"/>
<android.support.design.widget.TextInputLayout
android:id="@+id/phone_number_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="16dp"
android:layout_marginTop="16dp"
android:elevation="@dimen/elevation"
app:layout_constraintTop_toBottomOf="@+id/address_layout"
app:layout_constraintStart_toStartOf="@+id/address_layout"
android:hint="Phone number">
<EditText
android:id="@+id/phone_number_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="phone"
android:paddingBottom="20dp"
style="NDL.Typography.Large01"/>
</android.support.design.widget.TextInputLayout>
<ImageView
android:id="@+id/phone_number_icon"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginEnd="20dp"
android:tint="@color/blue_02"
android:src="@drawable/ic_icon_info"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/phone_number_layout"
app:layout_constraintBottom_toBottomOf="@+id/phone_number_layout"/>
</android.support.constraint.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/gray_02">
<TextView
android:id="@+id/footer"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:layout_margin="16dp"
style="NDL.Typography.Standard01"
android:text="Make sure to keep your information up to date."/>
<Button
style="@style/NDL.Button.Primary"
android:id="@+id/bt_confirm_button"
android:layout_weight="0"
android:layout_height="36dp"
android:layout_width="match_parent"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginBottom="20dp"
android:text="CONFIRM"/>
</LinearLayout>
</LinearLayout>
and this is what I'm trying to accomplish: