mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-03-03 02:42:00 -05:00
certify: add certify action button to viewkeymainfragment
This commit is contained in:
parent
0922a8cf04
commit
db25c56b64
@ -62,6 +62,7 @@ public class ViewKeyMainFragment extends Fragment implements
|
||||
private TextView mSecretKey;
|
||||
private BootstrapButton mActionEdit;
|
||||
private BootstrapButton mActionEncrypt;
|
||||
private BootstrapButton mActionCertify;
|
||||
|
||||
private ListView mUserIds;
|
||||
private ListView mKeys;
|
||||
@ -92,6 +93,7 @@ public class ViewKeyMainFragment extends Fragment implements
|
||||
mKeys = (ListView) view.findViewById(R.id.keys);
|
||||
mActionEdit = (BootstrapButton) view.findViewById(R.id.action_edit);
|
||||
mActionEncrypt = (BootstrapButton) view.findViewById(R.id.action_encrypt);
|
||||
mActionCertify = (BootstrapButton) view.findViewById(R.id.action_certify);
|
||||
|
||||
return view;
|
||||
}
|
||||
@ -128,6 +130,11 @@ public class ViewKeyMainFragment extends Fragment implements
|
||||
mSecretKey.setTextColor(getResources().getColor(R.color.emphasis));
|
||||
mSecretKey.setText(R.string.secret_key_yes);
|
||||
|
||||
// certify button
|
||||
// TODO this button MIGHT be useful if the user wants to
|
||||
// certify a private key with another...
|
||||
// mActionCertify.setVisibility(View.GONE);
|
||||
|
||||
// edit button
|
||||
mActionEdit.setVisibility(View.VISIBLE);
|
||||
mActionEdit.setOnClickListener(new View.OnClickListener() {
|
||||
@ -144,8 +151,22 @@ public class ViewKeyMainFragment extends Fragment implements
|
||||
} else {
|
||||
mSecretKey.setTextColor(Color.BLACK);
|
||||
mSecretKey.setText(getResources().getString(R.string.secret_key_no));
|
||||
|
||||
// certify button
|
||||
mActionCertify.setVisibility(View.VISIBLE);
|
||||
// edit button
|
||||
mActionEdit.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// TODO see todo note above, doing this here for now
|
||||
mActionCertify.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View view) {
|
||||
certifyKey(KeychainContract.KeyRings.buildPublicKeyRingsByMasterKeyIdUri(
|
||||
Long.toString(masterKeyId)
|
||||
));
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
mActionEncrypt.setOnClickListener(new View.OnClickListener() {
|
||||
|
@ -251,6 +251,17 @@
|
||||
bootstrapbutton:bb_icon_left="fa-lock"
|
||||
bootstrapbutton:bb_type="info" />
|
||||
|
||||
|
||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||
android:id="@+id/action_certify"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:padding="4dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="@string/key_view_action_certify"
|
||||
bootstrapbutton:bb_icon_left="fa-pencil"
|
||||
bootstrapbutton:bb_type="info" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
Loading…
x
Reference in New Issue
Block a user