MrZaiko/Polysmee

View on GitHub
app/src/main/res/layout/element_invitation_entry.xml

Summary

Maintainability
Test Coverage
<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <View
            android:id="@+id/InvitationEntrySeparationBar"
            android:layout_width="0dp"
            android:layout_height="2dp"
            android:layout_marginEnd="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="8dp"
            android:background="@color/grey"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/InvitationEntryButtonsBar" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/InvitationEntryDetailsLayout"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            app:layout_constraintBottom_toTopOf="@id/InvitationEntryButtonsBar"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/InvitationEntryStatus"
            app:layout_constraintTop_toTopOf="parent">

            <androidx.constraintlayout.widget.Guideline
                android:id="@+id/inviteManagementGuideline"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                app:layout_constraintGuide_percent="0.6" />

            <TextView
                android:id="@+id/InvitationEntryAppointmentTitle"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:gravity="start"
                android:text="@string/genericTitlePlaceHolder"
                android:textColor="@color/primaryTextColor"
                android:textSize="18sp"
                app:layout_constraintBottom_toTopOf="@id/InvitationEntryAppointmentDate"
                app:layout_constraintEnd_toEndOf="@id/inviteManagementGuideline"
                app:layout_constraintHorizontal_bias="0"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/InvitationEntryAppointmentCourse"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="8dp"
                android:gravity="right"
                android:text="@string/genericCourseText"
                android:textSize="18sp"
                app:layout_constraintBottom_toTopOf="@id/InvitationEntryAppointmentDate"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHorizontal_bias="1"
                app:layout_constraintStart_toStartOf="@id/inviteManagementGuideline"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/InvitationEntryAppointmentDate"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:text="@string/genericDatePlaceholder"
                android:textSize="16sp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHorizontal_bias="0"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/InvitationEntryAppointmentTitle" />
        </androidx.constraintlayout.widget.ConstraintLayout>

        <ImageView
            android:id="@+id/InvitationEntryStatus"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:src="@drawable/calendar_entry_ongoing_dot"
            app:layout_constraintBottom_toTopOf="@id/InvitationEntryButtonsBar"
            app:layout_constraintEnd_toStartOf="@id/InvitationEntryDetailsLayout"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/InvitationEntryButtonsBar"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="4dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/InvitationEntryDetailsLayout">

            <ImageView
                android:id="@+id/invitationEntryImgAccept"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:contentDescription="@string/genericAcceptText"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@id/invitationEntryImgRefuse"
                app:layout_constraintTop_toTopOf="parent"
                app:srcCompat="@drawable/baseline_done" />

            <ImageView
                android:id="@+id/invitationEntryImgRefuse"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:contentDescription="@string/genericRefuseText"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toStartOf="@id/invitationEntryImgAccept"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:srcCompat="@drawable/baseline_delete" />
        </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>