diff --git a/app/src/main/java/org/communiquons/android/comunic/client/data/conversations/ConversationMessageAdapter.java b/app/src/main/java/org/communiquons/android/comunic/client/data/conversations/ConversationMessageAdapter.java index 1b88d2b..07cda97 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/data/conversations/ConversationMessageAdapter.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/data/conversations/ConversationMessageAdapter.java @@ -4,6 +4,7 @@ import android.content.Context; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.util.ArrayMap; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -75,6 +76,12 @@ public class ConversationMessageAdapter extends ArrayAdapter 0){ + previousMessage = getItem(position-1); + } + /* Get the view of the messages @@ -82,29 +89,38 @@ public class ConversationMessageAdapter extends ArrayAdapter + android:layout_weight="1" + android:divider="@null" + /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_conversation_message_item.xml b/app/src/main/res/layout/fragment_conversation_message_item.xml index 3d03447..ceb41b0 100644 --- a/app/src/main/res/layout/fragment_conversation_message_item.xml +++ b/app/src/main/res/layout/fragment_conversation_message_item.xml @@ -10,34 +10,48 @@ android:paddingTop="5dp"> - - - + android:orientation="vertical"> + tools:text="User name" /> - + + + + + + + + + - + tools:text="A message" />