mirror of
https://github.com/nextcloud/talk-android
synced 2025-01-31 11:32:00 +00:00
Further layout fixes
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
9a6775a3e8
commit
d234722c7c
@ -104,6 +104,9 @@ public class MagicIncomingTextMessageViewHolder
|
||||
Context context = NextcloudTalkApplication.getSharedApplication().getApplicationContext();
|
||||
itemView.setSelected(false);
|
||||
|
||||
FlexboxLayout.LayoutParams layoutParams = (FlexboxLayout.LayoutParams) messageTimeView.getLayoutParams();
|
||||
layoutParams.setWrapBefore(false);
|
||||
|
||||
Spannable messageString = new SpannableString(message.getText());
|
||||
|
||||
if (messageParameters != null && message.getMessageParameters().size() > 0) {
|
||||
@ -128,12 +131,11 @@ public class MagicIncomingTextMessageViewHolder
|
||||
} else if (EmoticonUtils.isMessageWithSingleEmoticonOnly(context, message.getText())) {
|
||||
messageString.setSpan(new RelativeSizeSpan(2.5f), 0, messageString.length(),
|
||||
Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
FlexboxLayout.LayoutParams layoutParams = (FlexboxLayout.LayoutParams) messageTimeView.getLayoutParams();
|
||||
layoutParams.setWrapBefore(true);
|
||||
messageTimeView.setLayoutParams(layoutParams);
|
||||
itemView.setSelected(true);
|
||||
}
|
||||
|
||||
messageTimeView.setLayoutParams(layoutParams);
|
||||
messageText.setText(messageString);
|
||||
}
|
||||
}
|
@ -79,9 +79,11 @@ public class MagicOutcomingTextMessageViewHolder extends MessageHolders.Outcomin
|
||||
Spannable messageString = new SpannableString(message.getText());
|
||||
|
||||
Context context = NextcloudTalkApplication.getSharedApplication().getApplicationContext();
|
||||
|
||||
itemView.setSelected(false);
|
||||
|
||||
FlexboxLayout.LayoutParams layoutParams = (FlexboxLayout.LayoutParams) messageTimeView.getLayoutParams();
|
||||
layoutParams.setWrapBefore(false);
|
||||
|
||||
if (messageParameters != null && message.getMessageParameters().size() > 0) {
|
||||
for (String key : message.getMessageParameters().keySet()) {
|
||||
HashMap<String, String> individualHashMap = message.getMessageParameters().get(key);
|
||||
@ -98,14 +100,12 @@ public class MagicOutcomingTextMessageViewHolder extends MessageHolders.Outcomin
|
||||
} else if (EmoticonUtils.isMessageWithSingleEmoticonOnly(context, message.getText())) {
|
||||
messageString.setSpan(new RelativeSizeSpan(2.5f), 0, messageString.length(),
|
||||
Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
FlexboxLayout.LayoutParams layoutParams = (FlexboxLayout.LayoutParams) messageTimeView.getLayoutParams();
|
||||
layoutParams.setWrapBefore(true);
|
||||
messageTimeView.setLayoutParams(layoutParams);
|
||||
messageTimeView.setTextColor(context.getResources().getColor(R.color.warm_grey_four));
|
||||
itemView.setSelected(true);
|
||||
}
|
||||
|
||||
|
||||
messageTimeView.setLayoutParams(layoutParams);
|
||||
messageText.setText(messageString);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user