aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2017-01-12 20:50:53 +0100
committerDaniel Gultsch <daniel@gultsch.de>2017-01-12 20:50:53 +0100
commit585a53834041c502c4ab9162dd41801a30b2a627 (patch)
tree0e87b65d14dd72cbdb56625c315272bc623a6ad7 /src
parentb050ff257643426232307ba2c5b0c252bd03520a (diff)
don't show key tile in contact details when there are no keys
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java8
-rw-r--r--src/main/res/layout/activity_contact_details.xml1
2 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java
index 69936b1d..1b76173a 100644
--- a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java
@@ -116,6 +116,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
private Button mShowInactiveDevicesButton;
private QuickContactBadge badge;
private LinearLayout keys;
+ private LinearLayout keysWrapper;
private FlowLayout tags;
private boolean showDynamicTags = false;
private boolean showLastSeen = false;
@@ -220,6 +221,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
}
});
keys = (LinearLayout) findViewById(R.id.details_contact_keys);
+ keysWrapper = (LinearLayout) findViewById(R.id.keys_wrapper);
tags = (FlowLayout) findViewById(R.id.tags);
mShowInactiveDevicesButton = (Button) findViewById(R.id.show_inactive_devices);
if (getActionBar() != null) {
@@ -521,11 +523,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
});
keys.addView(view);
}
- if (hasKeys) {
- keys.setVisibility(View.VISIBLE);
- } else {
- keys.setVisibility(View.GONE);
- }
+ keysWrapper.setVisibility(hasKeys ? View.VISIBLE : View.GONE);
List<ListItem.Tag> tagList = contact.getTags(this);
if (tagList.size() == 0 || !this.showDynamicTags) {
diff --git a/src/main/res/layout/activity_contact_details.xml b/src/main/res/layout/activity_contact_details.xml
index f739eca6..0a677597 100644
--- a/src/main/res/layout/activity_contact_details.xml
+++ b/src/main/res/layout/activity_contact_details.xml
@@ -109,6 +109,7 @@
</RelativeLayout>
<LinearLayout
+ android:id="@+id/keys_wrapper"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_horizontal_margin"