app/src/main/res/layout/activity_appointment_creation.xml
<?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:id="@+id/appointmentCreationLayout"
android:layout_height="match_parent"
android:layout_width="match_parent">
<ScrollView
android:layout_height="wrap_content"
android:layout_width="0dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0"
app:layout_constraintBottom_toBottomOf="@id/appointmentCreation90Guideline">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="gravity"
tools:context=".appointments.AppointmentActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/appointmentCreationTitleTimeLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:background="@drawable/background_appointment_creation"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<EditText
android:id="@+id/appointmentCreationEditTxtAppointmentTitleSet"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:ems="10"
android:hint="@string/appointment_creation_appointment_title"
android:importantForAutofill="no"
android:inputType="text"
android:textSize="22sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/appointmentCreationStartTimeLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appointmentCreationEditTxtAppointmentTitleSet">
<TextView
android:id="@+id/appointmentCreationStartTimeText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/appointment_creation_start_txt"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/appointmentCreationStartTime"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/appointmentCreationStartTime"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="right"
android:text="@string/appointment_creation_start_time_txt"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/appointmentCreationStartTimeText"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/appointmentCreationEndTimeLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appointmentCreationStartTimeLayout">
<TextView
android:id="@+id/appointementCreationEndTimeText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/appointment_creation_end_txt"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/appointmentCreationEndTime"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/appointmentCreationEndTime"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="right"
android:text="@string/appointment_creation_end_time_txt"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/appointementCreationEndTimeText"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/appointmentCreationCourseLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/background_appointment_creation"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appointmentCreationTitleTimeLayout"
app:layout_constraintVertical_bias="0.0">
<AutoCompleteTextView
android:id="@+id/appointmentCreationEditTxtAppointmentCourseSet"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:hint="@string/appointment_creation_appointment_course"
android:importantForAutofill="no"
android:inputType="text"
android:textSize="16sp"
android:imeOptions="flagNoExtractUi"
app:layout_constraintBottom_toTopOf="@+id/appointmentCreationPrivateSelector"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/appointmentCreationPrivateSelector"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textSize="16sp"
android:layout_marginStart="6dp"
android:text="@string/appointment_settings_private"
app:layout_constraintTop_toBottomOf="@+id/appointmentCreationEditTxtAppointmentCourseSet"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/appointmentCreationAddUserLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginTop="8dp"
android:background="@drawable/background_appointment_creation"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appointmentCreationCourseLayout">
<ImageView
android:id="@+id/appointmentCreationShowAdd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/baseline_arrow_right"
app:layout_constraintBottom_toTopOf="@id/appointmentCreationAddUserFragment"
app:layout_constraintEnd_toStartOf="@+id/appointmentCreationAddTextView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/appointmentCreationAddTextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="end"
android:text="@string/appointment_settings_invite_user"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@id/appointmentCreationAddUserFragment"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/appointmentCreationShowAdd"
app:layout_constraintTop_toTopOf="parent" />
<fragment
android:id="@+id/appointmentCreationAddUserFragment"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginStart="20dp"
android:name="io.github.polysmee.appointments.fragments.AppointmentCreationAddUserFragment"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appointmentCreationAddTextView" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/appointmentCreationBanUserLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginTop="8dp"
android:background="@drawable/background_appointment_creation"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appointmentCreationAddUserLayout">
<ImageView
android:id="@+id/appointmentCreationShowBan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/baseline_arrow_right"
app:layout_constraintBottom_toTopOf="@id/appointmentCreationBanUserFragment"
app:layout_constraintEnd_toStartOf="@+id/appointmentCreationBanTextView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/appointmentCreationBanTextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="end"
android:text="@string/appointment_settings_ban_user"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@id/appointmentCreationBanUserFragment"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/appointmentCreationShowBan"
app:layout_constraintTop_toTopOf="parent" />
<fragment
android:id="@+id/appointmentCreationBanUserFragment"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:orientation="horizontal"
android:name="io.github.polysmee.appointments.fragments.AppointmentCreationBanUserFragment"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appointmentCreationBanTextView" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/appointmentCreationTimeError"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textSize="18sp"
android:text="@string/appointmentCreationTimeError"
app:autoSizeTextType="uniform"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@+id/appointmentCreationAddBanError"
app:layout_constraintTop_toBottomOf="@+id/appointmentCreationBanUserLayout" />
<TextView
android:id="@+id/appointmentCreationAddBanError"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textSize="18sp"
android:text="@string/appointmentCreationAddBanError"
app:autoSizeTextType="uniform"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@+id/appointmentCreationTxtWarning"
app:layout_constraintTop_toBottomOf="@+id/appointmentCreationTimeError" />
<TextView
android:id="@+id/appointmentCreationTxtWarning"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/appointment_creation_maximum_duration_of_an_appointment_is_4h"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@+id/appointmentCreationTxtOnlyUsersInDatabase"
app:layout_constraintTop_toBottomOf="@+id/appointmentCreationAddBanError"
app:layout_constraintVertical_bias="0" />
<TextView
android:id="@+id/appointmentCreationTxtOnlyUsersInDatabase"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="60dp"
android:text="@string/appointment_creation_only_users_in_database"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appointmentCreationTxtWarning"
app:layout_constraintVertical_bias="0" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/appointmentCreationBottomBar"
app:layout_constraintTop_toBottomOf="@id/appointmentCreation90Guideline"
app:layout_constraintVertical_bias="1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<Button
android:id="@+id/appointmentCreationbtnDone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="@string/appointment_creation_done_create_appointment"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/appointementCreationBtnReset"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginStart="8dp"
android:text="@string/appointment_creation_reset_btn_txt"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.Guideline
android:id="@+id/appointmentCreation90Guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.9"
app:layout_constraintGuide_begin="20dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>