fixed click area for pgp key in contact details
This commit is contained in:
parent
e6eb58f2d7
commit
4d1308e138
|
@ -505,26 +505,23 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
|
||||||
keyType.setTextColor(ContextCompat.getColor(this, R.color.accent));
|
keyType.setTextColor(ContextCompat.getColor(this, R.color.accent));
|
||||||
}
|
}
|
||||||
key.setText(OpenPgpUtils.convertKeyIdToHex(contact.getPgpKeyId()));
|
key.setText(OpenPgpUtils.convertKeyIdToHex(contact.getPgpKeyId()));
|
||||||
view.setOnClickListener(new OnClickListener() {
|
final OnClickListener openKey = new OnClickListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
PgpEngine pgp = ContactDetailsActivity.this.xmppConnectionService
|
PgpEngine pgp = ContactDetailsActivity.this.xmppConnectionService.getPgpEngine();
|
||||||
.getPgpEngine();
|
try {
|
||||||
if (pgp != null) {
|
startIntentSenderForResult(
|
||||||
PendingIntent intent = pgp.getIntentForKey(contact);
|
pgp.getIntentForKey(contact).getIntentSender(), 0, null, 0,
|
||||||
if (intent != null) {
|
0, 0);
|
||||||
try {
|
} catch (Throwable e) {
|
||||||
startIntentSenderForResult(
|
Toast.makeText(ContactDetailsActivity.this,R.string.openpgp_error,Toast.LENGTH_SHORT).show();
|
||||||
intent.getIntentSender(), 0, null, 0,
|
|
||||||
0, 0);
|
|
||||||
} catch (SendIntentException e) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
view.setOnClickListener(openKey);
|
||||||
|
key.setOnClickListener(openKey);
|
||||||
|
keyType.setOnClickListener(openKey);
|
||||||
keys.addView(view);
|
keys.addView(view);
|
||||||
}
|
}
|
||||||
keysWrapper.setVisibility(hasKeys ? View.VISIBLE : View.GONE);
|
keysWrapper.setVisibility(hasKeys ? View.VISIBLE : View.GONE);
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="?attr/color_text_primary"
|
android:textColor="?attr/color_text_primary"
|
||||||
android:textSize="?attr/TextSizeHeadline"
|
android:textSize="?attr/TextSizeBody"
|
||||||
android:typeface="monospace"
|
android:typeface="monospace"
|
||||||
android:fontFamily="monospace"
|
android:fontFamily="monospace"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
android:textColor="?attr/color_text_primary"
|
android:textColor="?attr/color_text_primary"
|
||||||
android:textSize="?attr/TextSizeBody"
|
android:textSize="?attr/TextSizeBody"
|
||||||
android:typeface="monospace"
|
android:typeface="monospace"
|
||||||
android:longClickable="true"/>
|
android:longClickable="true"
|
||||||
|
android:clickable="true"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/key_type"
|
android:id="@+id/key_type"
|
||||||
|
@ -34,7 +35,8 @@
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textColor="?attr/color_text_secondary"
|
android:textColor="?attr/color_text_secondary"
|
||||||
android:textSize="?attr/TextSizeInfo"
|
android:textSize="?attr/TextSizeInfo"
|
||||||
android:longClickable="true"/>
|
android:longClickable="true"
|
||||||
|
android:clickable="true"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/key_trust"
|
android:id="@+id/key_trust"
|
||||||
|
|
Loading…
Reference in a new issue