Add contact name under avatar in contact details
This commit is contained in:
parent
19328ee5cf
commit
fe928dc819
2 changed files with 16 additions and 4 deletions
|
@ -459,7 +459,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
|
|||
}
|
||||
if (binding.editTags.getVisibility() != View.GONE) return;
|
||||
invalidateOptionsMenu();
|
||||
setTitle(contact.getDisplayName());
|
||||
setTitle(R.string.action_contact_details);
|
||||
if (contact.showInRoster()) {
|
||||
binding.detailsSendPresence.setVisibility(View.VISIBLE);
|
||||
binding.detailsReceivePresence.setVisibility(View.VISIBLE);
|
||||
|
@ -468,7 +468,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
|
|||
binding.detailsReceivePresence.setOnCheckedChangeListener(null);
|
||||
|
||||
List<String> statusMessages = contact.getPresences().getStatusMessages();
|
||||
if (statusMessages.size() == 0) {
|
||||
if (statusMessages.isEmpty()) {
|
||||
binding.statusMessage.setVisibility(View.GONE);
|
||||
} else if (statusMessages.size() == 1) {
|
||||
final String message = statusMessages.get(0);
|
||||
|
@ -537,7 +537,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
|
|||
binding.detailsLastseen.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
binding.detailsContactName.setText(contact.getDisplayName());
|
||||
binding.detailsContactjid.setText(IrregularUnicodeDetector.style(this, contact.getJid()));
|
||||
final String account = contact.getAccount().getJid().asBareJid().toEscapedString();
|
||||
binding.detailsAccount.setText(getString(R.string.using_account, account));
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<eu.siacs.conversations.ui.widget.AvatarView
|
||||
android:id="@+id/details_contact_badge"
|
||||
android:layout_width="@dimen/avatar_on_details_screen_size"
|
||||
|
@ -50,6 +49,19 @@
|
|||
android:layout_marginBottom="24dp"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/details_contact_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_horizontal"
|
||||
android:onClick="onClick"
|
||||
android:paddingTop="1dp"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?textAppearanceTitleLarge" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/details_contactjid"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
Loading…
Reference in a new issue