<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/rootLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="?android:attr/windowBackground"
    android:scrollbars="none">
        <androidx.constraintlayout.widget.ConstraintLayout
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="16dp"
            android:animateLayoutChanges="true">

            <ImageView
                android:id="@+id/iconImageView"
                android:layout_width="256dp"
                android:layout_height="64dp"
                android:src="@drawable/ic_add_manual"
                android:layout_marginLeft="16dp"
                android:layout_marginRight="16dp"
                android:tint="?attr/colorOnPrimary"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                android:layout_marginTop="16dp"/>

            <com.google.android.material.textview.MaterialTextView
                android:id="@+id/titleTextView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/title_edit_manual"
                android:textSize="32sp"
                android:gravity="center"
                android:layout_marginTop="16dp"
                app:layout_constraintTop_toBottomOf="@id/iconImageView"
                android:textAppearance="?attr/textAppearanceHeadline1"/>

            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/hostTextInputLayout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/hint_regist_host"
                app:startIconDrawable="@drawable/ic_host"
                app:layout_constraintTop_toBottomOf="@id/titleTextView"
                android:layout_marginTop="32dp">
                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/hostEditText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="textNoSuggestions|textVisiblePassword"
                    android:maxLines="1"/>
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/registeredHostTextInputLayout"
                style="@style/MageTheme.TextInputStyle.ExposedDropdownMenu"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/hint_add_manual_regist_host"
                app:startIconDrawable="@drawable/ic_register"
                app:layout_constraintTop_toBottomOf="@id/hostTextInputLayout"
                android:layout_marginTop="32dp">
                <AutoCompleteTextView
                    android:id="@+id/registeredHostTextView"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:editable="false"
                    android:maxLines="1" /> <!-- editable is deprecated, but there is no alternative -->
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.button.MaterialButton
                android:id="@+id/saveButton"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:layout_constraintTop_toBottomOf="@id/registeredHostTextInputLayout"
                style="@style/MageTheme.Button"
                android:text="@string/action_add_manual_save"
                android:layout_marginTop="32dp" />

        </androidx.constraintlayout.widget.ConstraintLayout>
    </ScrollView>
