diff --git a/res/layout/activity_contact_details.xml b/res/layout/activity_contact_details.xml index f4fd9c1e..1dceab53 100644 --- a/res/layout/activity_contact_details.xml +++ b/res/layout/activity_contact_details.xml @@ -1,128 +1,110 @@ - + android:background="@color/secondarybackground" + android:orientation="vertical" > - + android:layout_margin="8dp" + android:background="@drawable/infocard_border" + android:padding="8dp" > - + + + android:layout_marginLeft="16dp" + android:layout_toRightOf="@+id/details_contact_badge" + android:orientation="vertical" > - - - - - + android:singleLine="true" + android:text="@string/account_settings_example_jabber_id" + android:textColor="@color/primarytext" + android:textSize="?attr/TextSizeHeadline" + android:textStyle="bold" /> - + + android:textColor="@color/secondarytext" + android:textSize="?attr/TextSizeBody" /> + + - - + + + + + android:layout_alignParentRight="true" + android:layout_below="@+id/details_jidbox" + android:layout_marginTop="32dp" + android:text="@string/using_account" + android:textColor="@color/secondarytext" + android:textSize="?attr/TextSizeInfo" /> + - - - - - - - - - - + - \ No newline at end of file + \ No newline at end of file diff --git a/res/layout/contact_key.xml b/res/layout/contact_key.xml index e10f8420..7053857f 100644 --- a/res/layout/contact_key.xml +++ b/res/layout/contact_key.xml @@ -16,14 +16,15 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/primarytext" - android:textSize="?attr/TextSizeHeadline" + android:textSize="?attr/TextSizeBody" android:typeface="monospace" /> + android:textColor="@color/secondarytext" + android:textSize="?attr/TextSizeInfo"/> You are banned from this conference This conference is members only You have been kicked from this conference + using account %s - + \ No newline at end of file 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) {