Display trust status in ContactDetailsActivity
This commit is contained in:
parent
bdc9f9a44f
commit
2afb36d891
|
@ -383,11 +383,14 @@ public class ContactDetailsActivity extends XmppActivity implements OnAccountUpd
|
||||||
View view = inflater.inflate(R.layout.contact_key, keys, false);
|
View view = inflater.inflate(R.layout.contact_key, keys, false);
|
||||||
TextView key = (TextView) view.findViewById(R.id.key);
|
TextView key = (TextView) view.findViewById(R.id.key);
|
||||||
TextView keyType = (TextView) view.findViewById(R.id.key_type);
|
TextView keyType = (TextView) view.findViewById(R.id.key_type);
|
||||||
|
TextView keyTrust = (TextView) view.findViewById(R.id.key_trust);
|
||||||
ImageButton remove = (ImageButton) view
|
ImageButton remove = (ImageButton) view
|
||||||
.findViewById(R.id.button_remove);
|
.findViewById(R.id.button_remove);
|
||||||
remove.setVisibility(View.VISIBLE);
|
remove.setVisibility(View.VISIBLE);
|
||||||
|
keyTrust.setVisibility(View.VISIBLE);
|
||||||
keyType.setText("Axolotl Fingerprint");
|
keyType.setText("Axolotl Fingerprint");
|
||||||
key.setText(CryptoHelper.prettifyFingerprint(identityKey.getFingerprint()));
|
key.setText(CryptoHelper.prettifyFingerprint(identityKey.getFingerprint()));
|
||||||
|
keyTrust.setText(contact.getAccount().getAxolotlService().getFingerprintTrust(contact.getJid().toBareJid().toString(), identityKey.getFingerprint().replaceAll("\\s","")).toString());
|
||||||
keys.addView(view);
|
keys.addView(view);
|
||||||
remove.setOnClickListener(new OnClickListener() {
|
remove.setOnClickListener(new OnClickListener() {
|
||||||
|
|
||||||
|
|
|
@ -3,18 +3,18 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent" >
|
android:layout_height="match_parent" >
|
||||||
|
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_toLeftOf="@+id/button_remove"
|
android:layout_toLeftOf="@+id/button_remove"
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="8dp" >
|
android:padding="8dp" >
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/key"
|
android:id="@+id/key"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
android:textColor="@color/primarytext"
|
android:textColor="@color/primarytext"
|
||||||
android:textSize="?attr/TextSizeBody"
|
android:textSize="?attr/TextSizeBody"
|
||||||
android:typeface="monospace" />
|
android:typeface="monospace" />
|
||||||
|
@ -23,9 +23,21 @@
|
||||||
android:id="@+id/key_type"
|
android:id="@+id/key_type"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_below="@+id/key"
|
||||||
android:textColor="@color/secondarytext"
|
android:textColor="@color/secondarytext"
|
||||||
android:textSize="?attr/TextSizeInfo"/>
|
android:textSize="?attr/TextSizeInfo"/>
|
||||||
</LinearLayout>
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/key_trust"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_below="@+id/key"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:textColor="@color/secondarytext"
|
||||||
|
android:textSize="?attr/TextSizeInfo"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/button_remove"
|
android:id="@+id/button_remove"
|
||||||
|
|
Loading…
Reference in New Issue