GPTutor / app / src / main / res / layout / item_message_received.xml
item_message_received.xml
Raw
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginTop="16dp">

    <TextView
            android:id="@+id/text_gchat_date_other"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="36dp"
            android:paddingStart="8dp"
            android:paddingTop="4dp"
            android:paddingEnd="8dp"
            android:paddingBottom="4dp"
            android:text="June 10"
            android:textColor="#C0C0C0"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintHorizontal_bias="1.0" />

    <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="280dp"
            android:layout_height="wrap_content"
            android:layout_below="@id/text_gchat_date_other">

        <ImageView
                android:id="@+id/image_gchat_profile_other"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="7dp"
                android:contentDescription="User Icon"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/text_gchat_date_other" />

        <TextView
                android:id="@+id/text_gchat_user_other"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="3dp"
                android:text="John Grady Cole"
                android:textSize="16sp"
                app:layout_constraintStart_toEndOf="@+id/image_gchat_profile_other"
                app:layout_constraintTop_toBottomOf="@+id/text_gchat_date_other" />

        <androidx.cardview.widget.CardView
                android:id="@+id/card_gchat_message_other"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:cardBackgroundColor="#eef1f6"
                app:cardCornerRadius="12dp"
                app:cardElevation="0dp"
                app:cardPreventCornerOverlap="false"
                app:cardUseCompatPadding="true"
                app:contentPadding="12dp"
                app:contentPaddingRight="25dp"
                app:layout_constraintStart_toEndOf="@+id/image_gchat_profile_other"
                app:layout_constraintTop_toBottomOf="@+id/text_gchat_user_other">

            <LinearLayout
                    android:id="@+id/layout_gchat_container_other"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="vertical">

                <com.demarridosunmu.gptutor3.ui.MathView2
                        android:id="@+id/text_gchat_message_other"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginBottom="8dp"
                        android:maxWidth="260dp"
                        android:paddingLeft="12dp"
                        android:paddingTop="8dp"
                        android:paddingRight="12dp"
                        android:text="Message"
                        android:textColor="#000000"
                        android:textSize="16sp" />
            </LinearLayout>
        </androidx.cardview.widget.CardView>

        <TextView
                android:id="@+id/text_gchat_timestamp_other"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="8:00"
                android:textColor="#C0C0C0"
                android:textSize="10sp"
                app:layout_constraintBottom_toBottomOf="@+id/card_gchat_message_other"
                app:layout_constraintStart_toEndOf="@+id/card_gchat_message_other" />
    </androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>