mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-12-29 06:58:58 +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)
|
||||
.setVisibility(View.GONE);
|
||||
|
||||
//Align text on the right
|
||||
contentView.setTextAlignment(View.TEXT_ALIGNMENT_TEXT_END);
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
|
||||
//Message appears on the right
|
||||
((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)
|
||||
.setVisibility(View.GONE);
|
||||
|
||||
//Align text on the left
|
||||
contentView.setTextAlignment(View.TEXT_ALIGNMENT_TEXT_START);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fragment_conversation_message_item_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
@ -40,7 +40,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/conversation_otheruser_messages_textColor"
|
||||
tools:text="A message" />
|
||||
tools:text="A message"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fragment_conversation_message_item_messageimage"
|
||||
|
Loading…
Reference in New Issue
Block a user