mirror of
				https://github.com/pierre42100/ComunicAndroid
				synced 2025-11-04 11:34:06 +00:00 
			
		
		
		
	Optimized conversation rendering.
This commit is contained in:
		@@ -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"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user