movemeet/movemeet

View on GitHub
app/src/main/res/layout-sw320dp/message_out.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:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    tools:context=".view.chat.ChatActivity">


    <LinearLayout xmlns:card_view="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:clipToPadding="false"
        android:gravity="end"
        android:orientation="horizontal"
        android:paddingTop="6dp"
        android:paddingBottom="6dp"
        android:weightSum="2"
        card_view:ignore="MissingConstraints">


        <androidx.cardview.widget.CardView
            android:layout_width="250dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.5"
            android:elevation="10dp">


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

                <LinearLayout
                    android:id="@+id/lnrContr"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:minWidth="210dp"
                    android:orientation="horizontal">

                    <TextView
                        android:id="@+id/message_user"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:paddingStart="6dp"
                        android:paddingEnd="6dp"
                        android:text="@string/message_out_username"
                        android:textColor="@color/primary"
                        android:textStyle="normal|bold" />

                </LinearLayout>

                <View
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="@color/primary" />

                <TextView
                    android:id="@+id/message_text"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="2dp"
                    android:paddingStart="6dp"
                    android:paddingEnd="6dp"
                    android:text=""
                    android:textAppearance="@style/TextAppearance.AppCompat.Body1"
                    android:textIsSelectable="true"
                    android:textSize="16sp" />

                <ImageView
                    android:id="@+id/messageImageView"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:adjustViewBounds="true"
                    android:background="@color/white"
                    android:contentDescription="@string/message_out_messageImageView"
                    android:scaleType="fitCenter" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="0dp"
                    android:minWidth="200dp" />

                <LinearLayout
                    android:id="@+id/lnrContainer"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="3dp"
                    android:gravity="center_vertical"
                    android:minWidth="210dp"
                    android:orientation="horizontal">

                    <TextView
                        android:id="@+id/message_time"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1.5"
                        android:paddingStart="6dp"
                        android:paddingEnd="6dp"
                        android:text="@string/message_out_message_time" />

                </LinearLayout>
            </LinearLayout>
        </androidx.cardview.widget.CardView>

        <ImageView
            android:id="@+id/imageProfile"
            android:layout_width="34dp"
            android:layout_height="34dp"
            android:layout_marginStart="4dp"
            android:layout_marginEnd="4dp"
            android:contentDescription="@string/message_out_imageProfile"
            android:paddingStart="4dp"
            android:paddingEnd="4dp"
            android:src="@drawable/ic_person_black_24dp" />

    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>