From c0545c5db5edf8e995cc7cef102dc3d4913599a0 Mon Sep 17 00:00:00 2001 From: Pierre Date: Mon, 18 Dec 2017 19:06:56 +0100 Subject: [PATCH] First iteration of the ConversationMessageAdapter --- .idea/misc.xml | 2 +- .../ConversationMessageAdapter.java | 82 ++++++++----------- 2 files changed, 33 insertions(+), 51 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 503aca7..33952c6 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -55,7 +55,7 @@ - + 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 d32e4b2..fee4aa1 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 @@ -31,14 +31,6 @@ public class ConversationMessageAdapter extends ArrayAdapter= Build.VERSION_CODES.M) { - usercolorText = getContext().getResources(). - getColor(R.color.conversation_user_messages_textColor, getContext().getTheme()); - usercolorBackground = getContext().getResources(). - getColor(R.color.conversation_user_messages_background, getContext().getTheme()); - otherusercolorText = getContext().getResources(). - getColor(R.color.conversation_otheruser_messages_textColor, getContext().getTheme()); - otherusercolorBackground = getContext().getResources(). - getColor(R.color.conversation_otheruser_messages_background, getContext().getTheme()); - } else { - usercolorText = getContext().getResources(). - getColor(R.color.conversation_user_messages_textColor); - usercolorBackground = getContext().getResources(). - getColor(R.color.conversation_user_messages_background); - otherusercolorText = getContext().getResources(). - getColor(R.color.conversation_otheruser_messages_textColor); - otherusercolorBackground = getContext().getResources(). - getColor(R.color.conversation_otheruser_messages_background); - } } @@ -95,41 +67,51 @@ public class ConversationMessageAdapter extends ArrayAdapter