whitewind664/sdp

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

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingVertical="10dp"
    android:paddingLeft="15dp"
    android:paddingRight="60dp"
    android:clipToPadding="false">

    <View
        android:id="@+id/chat_view_their_avatar"
        android:layout_alignParentLeft="true"
        android:scaleType="centerInside"
        android:background="@drawable/chat_default_profile_pic"
        android:layout_width="34dp"
        android:layout_height="34dp" />

    <TextView
        android:id="@+id/chat_textView_their_name"
        android:layout_marginLeft="15dp"
        android:layout_toRightOf="@+id/chat_view_their_avatar"
        android:layout_alignTop="@+id/chat_view_their_avatar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingBottom="4dp"
        android:text="Rose"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/chat_textView_their_messageBody"
        android:layout_below="@+id/chat_textView_their_name"
        android:layout_alignLeft="@+id/chat_textView_their_name"
        android:background="@drawable/chat_their_message_bubble"
        android:paddingVertical="12dp"
        android:paddingHorizontal="16dp"
        android:elevation="2dp"
        android:textSize="18sp"
        android:text="How are you doing? This is a long message that should probably wrap."
        />
</RelativeLayout>