Adding style and form for creating attestation

This commit is contained in:
2020-04-12 13:33:57 +02:00
parent 114f5ca078
commit 6c997af508
6 changed files with 278 additions and 24 deletions

View File

@ -1,22 +1,234 @@
<?xml version="1.0" encoding="utf-8"?>
<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"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".ui.add.AddFragment">
<TextView
android:id="@+id/text_home"
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:textAlignment="center"
android:textSize="20sp"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="50dp"
android:paddingVertical="20dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/attestation_title"
android:textColor="?attr/colorPrimary"
android:textSize="25sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:text="@string/attestation_subtitle"
android:textColor="?attr/colorAccent"
android:textSize="15sp" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/firstName"
style="@style/TextInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/first_name">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName|textCapWords" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/lastName"
style="@style/TextInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/last_name">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName|textCapWords" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/birthday"
style="@style/TextInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/birthday">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="date" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/birthPlace"
style="@style/TextInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/birth_place">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text|textCapWords" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/address"
style="@style/TextInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/address">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPostalAddress|textCapWords" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/city"
style="@style/TextInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/city">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text|textCapWords" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/postalCode"
style="@style/TextInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/postal_code">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text|textCapWords" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/exitDate"
style="@style/TextInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/exit_date">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="date" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/exitHour"
style="@style/TextInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/exit_hour">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="time" />
</com.google.android.material.textfield.TextInputLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="@string/reason"
android:textColor="?attr/colorPrimary"
android:textSize="18sp" />
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/reason1"
style="@style/MaterialCheckBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/reason_1" />
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/reason2"
style="@style/MaterialCheckBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/reason_2" />
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/reason3"
style="@style/MaterialCheckBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/reason_3" />
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/reason4"
style="@style/MaterialCheckBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/reason_4" />
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/reason5"
style="@style/MaterialCheckBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/reason_5" />
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/reason6"
style="@style/MaterialCheckBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/reason_6" />
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/reason7"
style="@style/MaterialCheckBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/reason_7" />
<com.google.android.material.button.MaterialButton
android:id="@+id/containedButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:enabled="false"
android:text="@string/generate_attestation_button" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>