cs306-versus/versus-app

View on GitHub
app/src/main/res/layout/activity_user_chat.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"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".UserChatActivity"
    android:animateLayoutChanges="true"
    android:background="@color/primary"
    >
    
    <View
        android:id="@+id/viewBackground"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_marginBottom="16dp"
        android:background="@drawable/background_content_top"
        app:layout_constraintBottom_toTopOf="@id/layoutSend"
        app:layout_constraintTop_toTopOf="parent"
         />
    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/imageBack"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_marginStart="16dp"
        android:layout_marginLeft="16dp"
        android:layout_marginTop="12dp"
        android:padding="5dp"
        android:src="@drawable/ic_back"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        />
    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/imageInfo"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_marginTop="12dp"
        android:layout_marginEnd="16dp"
        android:layout_marginRight="16dp"
        android:padding="4dp"
        android:src="@drawable/ic_info"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        />

    <TextView
        android:id="@+id/textName"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:ellipsize="end"
        android:gravity="center"
        android:maxLines="1"
        android:textColor="@color/primary_text"
        android:textSize="25sp"
        android:textStyle="bold"
        app:layout_constraintBottom_toBottomOf="@id/imageBack"
        app:layout_constraintStart_toEndOf="@id/imageBack"
        app:layout_constraintEnd_toStartOf="@id/imageInfo"
        app:layout_constraintTop_toTopOf="@id/imageBack"
        />
    <View
        android:paddingTop="20dp"
        app:layout_constraintTop_toBottomOf="@id/textName"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:layout_gravity="center_horizontal|bottom"
        android:background="#D3D3D3"
        />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/chatRecyclerView"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:clipToPadding="false"
        android:orientation="vertical"
        android:overScrollMode="never"
        android:padding="20dp"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
        app:layout_constraintBottom_toBottomOf="@id/viewBackground"
        app:layout_constraintTop_toBottomOf="@id/imageBack"
        />




    <FrameLayout
        android:id="@+id/layoutSend"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_marginEnd="16dp"
        android:layout_marginRight="16dp"
        android:layout_marginBottom="12dp"
        android:background="@drawable/background_chat_input"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent">

        <ImageView
            android:id="@+id/imageSend"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginStart="4dp"
            android:layout_marginLeft="4dp"
            android:padding="8dp"
            android:src="@drawable/ic_send"
            app:tint="@color/white"/>
    </FrameLayout>

    <EditText
        android:id="@+id/inputMessage"
        android:layout_height="40dp"
        android:layout_width="0dp"
        android:layout_marginStart="16dp"
        android:layout_marginLeft="16dp"
        android:layout_marginEnd="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginBottom="12dp"
        android:background="@drawable/background_chat_input"
        android:hint="type a Message ..."
        android:imeOptions="actionDone"
        android:importantForAutofill="no"
        android:inputType="text"
        android:paddingStart="16dp"
        android:paddingEnd="16dp"
        android:textColor="@color/white"
        android:textColorHint="@color/secondary_text"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@id/layoutSend"
        app:layout_constraintStart_toStartOf="parent"/>


</androidx.constraintlayout.widget.ConstraintLayout>