separate layout file for each message viewtype

This commit is contained in:
Moez Bhatti
2017-08-13 22:51:21 -04:00
parent 5c4fafe9ba
commit 8b408c88a1
4 changed files with 29 additions and 4 deletions
@@ -13,6 +13,6 @@
android:clipToPadding="false"
android:paddingBottom="8dp"
android:paddingTop="8dp"
tools:listitem="@layout/message_list_item" />
tools:listitem="@layout/message_list_item_out" />
</LinearLayout>
@@ -8,6 +8,7 @@
<TextView
android:id="@+id/message_body"
android:padding="16dp"
android:layout_marginEnd="56dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="Hey! How's it going?" />
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="vertical">
<TextView
android:id="@+id/message_body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="56dp"
android:gravity="right"
android:padding="16dp"
tools:text="Hey! How's it going?" />
</LinearLayout>