mirror of
https://github.com/nextcloud/talk-android
synced 2025-01-31 11:32:00 +00:00
fix vertical alignments for UserItem
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
5c86629b53
commit
9d29cbf9cd
@ -281,9 +281,10 @@ public class UserItem extends AbstractFlexibleItem<UserItem.UserItemViewHolder>
|
||||
|
||||
if (participant.statusMessage != null) {
|
||||
holder.statusMessage.setText(participant.statusMessage);
|
||||
alignUsernameVertical(holder, 0);
|
||||
} else {
|
||||
holder.statusMessage.setText("");
|
||||
alignUsernameVertical(holder);
|
||||
alignUsernameVertical(holder, 10);
|
||||
}
|
||||
|
||||
if (participant.statusIcon != null && !participant.statusIcon.isEmpty()) {
|
||||
@ -304,10 +305,10 @@ public class UserItem extends AbstractFlexibleItem<UserItem.UserItemViewHolder>
|
||||
}
|
||||
}
|
||||
|
||||
private void alignUsernameVertical(UserItemViewHolder holder) {
|
||||
private void alignUsernameVertical(UserItem.UserItemViewHolder holder, float densityPixelsFromTop) {
|
||||
ConstraintLayout.LayoutParams layoutParams =
|
||||
(ConstraintLayout.LayoutParams) holder.contactDisplayName.getLayoutParams();
|
||||
layoutParams.topMargin = (int) DisplayUtils.convertDpToPixel(10, context);
|
||||
layoutParams.topMargin = (int) DisplayUtils.convertDpToPixel(densityPixelsFromTop, context);
|
||||
holder.contactDisplayName.setLayoutParams(layoutParams);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user