1
0
Fork 1

further round square avatars

This commit is contained in:
Arne 2023-10-30 21:00:26 +01:00
parent 89c93b4cd5
commit 80ed22b85a
2 changed files with 18 additions and 0 deletions

View file

@ -86,11 +86,19 @@ public class ConferenceContactDetailsActivity extends XmppActivity {
binding.jid.setText(IrregularUnicodeDetector.style(this, contactJid));
String account = accountJid.asBareJid().toEscapedString();
binding.detailsAccount.setText(getString(R.string.using_account, account));
if (xmppConnectionService.getBooleanPreference("set_round_avatars", R.bool.set_round_avatars)) {
AvatarWorkerTask.loadAvatar(user, binding.detailsContactBadge, R.dimen.avatar_on_details_screen_size);
binding.detailsContactBadge.setOnLongClickListener(v -> {
ShowAvatarPopup(ConferenceContactDetailsActivity.this, user);
return true;
});
} else if (!xmppConnectionService.getBooleanPreference("set_round_avatars", R.bool.set_round_avatars)) {
AvatarWorkerTask.loadAvatar(user, binding.detailsContactBadgeSquare, R.dimen.avatar_on_details_screen_size);
binding.detailsContactBadgeSquare.setOnLongClickListener(v -> {
ShowAvatarPopup(ConferenceContactDetailsActivity.this, user);
return true;
});
}
if (xmppConnectionService.multipleAccounts()) {
binding.detailsAccount.setVisibility(View.VISIBLE);
} else {

View file

@ -73,6 +73,16 @@
android:scaleType="centerCrop"
app:riv_corner_radius="80dp" />
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/details_contact_badge_square"
android:layout_width="@dimen/avatar_on_details_screen_size"
android:layout_height="@dimen/avatar_on_details_screen_size"
android:layout_marginEnd="@dimen/avatar_item_distance"
android:layout_marginRight="@dimen/avatar_item_distance"
android:padding="1dp"
android:scaleType="centerCrop"
app:riv_corner_radius="5dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"