don't show key tile in contact details when there are no keys

This commit is contained in:
Daniel Gultsch 2017-01-12 20:50:53 +01:00
parent b050ff2576
commit 585a538340
2 changed files with 4 additions and 5 deletions

View File

@ -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) {

View File

@ -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"