From 6ad2c4bb2943f96bbcc96d3f992e3b65e21b5b62 Mon Sep 17 00:00:00 2001 From: haffenloher Date: Wed, 23 Dec 2015 23:57:03 +0100 Subject: [PATCH] Stop inbox snippet from overflowing the thumbnail Also ensure the thumbnails are placed correctly in the archive view. Closes #4954 // FREEBIE --- src/org/thoughtcrime/securesms/ConversationListItem.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/org/thoughtcrime/securesms/ConversationListItem.java b/src/org/thoughtcrime/securesms/ConversationListItem.java index a0ee629977..af08ec8f5a 100644 --- a/src/org/thoughtcrime/securesms/ConversationListItem.java +++ b/src/org/thoughtcrime/securesms/ConversationListItem.java @@ -178,6 +178,7 @@ public class ConversationListItem extends RelativeLayout LayoutParams subjectParams = (RelativeLayout.LayoutParams)this.subjectView.getLayoutParams(); subjectParams.addRule(RelativeLayout.LEFT_OF, R.id.thumbnail); + subjectParams.addRule(RelativeLayout.START_OF, R.id.thumbnail); this.subjectView.setLayoutParams(subjectParams); this.post(new ThumbnailPositioner(thumbnailView, archivedView, deliveryStatusIndicator, dateView)); } else { @@ -185,6 +186,7 @@ public class ConversationListItem extends RelativeLayout LayoutParams subjectParams = (RelativeLayout.LayoutParams)this.subjectView.getLayoutParams(); subjectParams.addRule(RelativeLayout.LEFT_OF, R.id.delivery_status); + subjectParams.addRule(RelativeLayout.START_OF, R.id.delivery_status); this.subjectView.setLayoutParams(subjectParams); } } @@ -255,8 +257,10 @@ public class ConversationListItem extends RelativeLayout (archivedView.getWidth() + deliveryStatusView.getWidth()) > dateView.getWidth()) { thumbnailParams.addRule(RelativeLayout.LEFT_OF, R.id.delivery_status); + thumbnailParams.addRule(RelativeLayout.START_OF, R.id.delivery_status); } else { thumbnailParams.addRule(RelativeLayout.LEFT_OF, R.id.date); + thumbnailParams.addRule(RelativeLayout.START_OF, R.id.date); } thumbnailView.setLayoutParams(thumbnailParams);