mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-26 23:25:20 +03:00
fix vertical alignments for UserItem
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
5c86629b53
commit
9d29cbf9cd
1 changed files with 4 additions and 3 deletions
|
@ -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 a new issue