mirror of
https://codeberg.org/monocles/monocles_chat.git
synced 2025-01-30 16:51:42 +01:00
further round square avatars
This commit is contained in:
parent
faa2a17f75
commit
ce1ff1d559
2 changed files with 18 additions and 0 deletions
|
@ -86,11 +86,19 @@ public class ConferenceContactDetailsActivity extends XmppActivity {
|
||||||
binding.jid.setText(IrregularUnicodeDetector.style(this, contactJid));
|
binding.jid.setText(IrregularUnicodeDetector.style(this, contactJid));
|
||||||
String account = accountJid.asBareJid().toEscapedString();
|
String account = accountJid.asBareJid().toEscapedString();
|
||||||
binding.detailsAccount.setText(getString(R.string.using_account, account));
|
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);
|
AvatarWorkerTask.loadAvatar(user, binding.detailsContactBadge, R.dimen.avatar_on_details_screen_size);
|
||||||
binding.detailsContactBadge.setOnLongClickListener(v -> {
|
binding.detailsContactBadge.setOnLongClickListener(v -> {
|
||||||
ShowAvatarPopup(ConferenceContactDetailsActivity.this, user);
|
ShowAvatarPopup(ConferenceContactDetailsActivity.this, user);
|
||||||
return true;
|
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()) {
|
if (xmppConnectionService.multipleAccounts()) {
|
||||||
binding.detailsAccount.setVisibility(View.VISIBLE);
|
binding.detailsAccount.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -73,6 +73,16 @@
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
app:riv_corner_radius="80dp" />
|
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
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
Loading…
Add table
Reference in a new issue