From 2ec021a42629120e8b4f1ae5a95027ec414b2b5c Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Mon, 13 Oct 2014 12:36:41 +0200 Subject: redesigned contact details a bit --- src/eu/siacs/conversations/ui/ContactDetailsActivity.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java index 9926e126..394aab6e 100644 --- a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java +++ b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java @@ -309,7 +309,7 @@ public class ContactDetailsActivity extends XmppActivity { } else { contactJidTv.setText(contact.getJid()); } - accountJidTv.setText(contact.getAccount().getJid()); + accountJidTv.setText(getString(R.string.using_account,contact.getAccount().getJid())); UIHelper.prepareContactBadge(this, badge, contact, getApplicationContext()); @@ -319,9 +319,11 @@ public class ContactDetailsActivity extends XmppActivity { } keys.removeAllViews(); + boolean hasKeys = false; LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); for (Iterator iterator = contact.getOtrFingerprints() .iterator(); iterator.hasNext();) { + hasKeys = true; final String otrFingerprint = iterator.next(); View view = (View) inflater.inflate(R.layout.contact_key, keys, false); @@ -342,6 +344,7 @@ public class ContactDetailsActivity extends XmppActivity { }); } if (contact.getPgpKeyId() != 0) { + hasKeys = true; View view = (View) inflater.inflate(R.layout.contact_key, keys, false); TextView key = (TextView) view.findViewById(R.id.key); @@ -370,6 +373,11 @@ public class ContactDetailsActivity extends XmppActivity { }); keys.addView(view); } + if (hasKeys) { + keys.setVisibility(View.VISIBLE); + } else { + keys.setVisibility(View.GONE); + } } protected void confirmToDeleteFingerprint(final String fingerprint) { -- cgit v1.2.3