mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-11-23 22:09:30 +00:00
Optimized conversation rendering.
This commit is contained in:
parent
23714bdd89
commit
5c6a38b49c
@ -122,9 +122,14 @@ public class ConversationMessageAdapter extends ArrayAdapter<ConversationMessage
|
|||||||
.findViewById(R.id.fragment_conversation_message_item_left_account_image)
|
.findViewById(R.id.fragment_conversation_message_item_left_account_image)
|
||||||
.setVisibility(View.GONE);
|
.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
//Align text on the right
|
||||||
|
contentView.setTextAlignment(View.TEXT_ALIGNMENT_TEXT_END);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Message appears on the right
|
//Message appears on the right
|
||||||
((LinearLayout)convertView).setGravity(Gravity.START);
|
((LinearLayout)convertView).setGravity(Gravity.START);
|
||||||
|
|
||||||
@ -142,6 +147,8 @@ public class ConversationMessageAdapter extends ArrayAdapter<ConversationMessage
|
|||||||
.findViewById(R.id.fragment_conversation_message_item_right_account_image)
|
.findViewById(R.id.fragment_conversation_message_item_right_account_image)
|
||||||
.setVisibility(View.GONE);
|
.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
//Align text on the left
|
||||||
|
contentView.setTextAlignment(View.TEXT_ALIGNMENT_TEXT_START);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/fragment_conversation_message_item_container"
|
android:id="@+id/fragment_conversation_message_item_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
@ -40,7 +40,7 @@
|
|||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
android:textColor="@color/conversation_otheruser_messages_textColor"
|
android:textColor="@color/conversation_otheruser_messages_textColor"
|
||||||
tools:text="A message" />
|
tools:text="A message"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/fragment_conversation_message_item_messageimage"
|
android:id="@+id/fragment_conversation_message_item_messageimage"
|
||||||
|
Loading…
Reference in New Issue
Block a user