mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-06 09:15:09 -05:00
add certify action button to viewkeymainfragment
This commit is contained in:
parent
3d8d22c9ed
commit
edb98c67f4
@ -64,6 +64,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;
|
||||
@ -94,6 +95,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;
|
||||
}
|
||||
@ -130,6 +132,9 @@ public class ViewKeyMainFragment extends Fragment implements
|
||||
mSecretKey.setTextColor(getResources().getColor(R.color.emphasis));
|
||||
mSecretKey.setText(R.string.secret_key_yes);
|
||||
|
||||
// certify button
|
||||
mActionCertify.setVisibility(View.GONE);
|
||||
|
||||
// edit button
|
||||
mActionEdit.setVisibility(View.VISIBLE);
|
||||
mActionEdit.setOnClickListener(new View.OnClickListener() {
|
||||
@ -143,6 +148,18 @@ 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);
|
||||
mActionCertify.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View view) {
|
||||
certifyKey(KeychainContract.KeyRings.buildPublicKeyRingsByMasterKeyIdUri(
|
||||
Long.toString(masterKeyId)
|
||||
));
|
||||
}
|
||||
});
|
||||
|
||||
// edit button
|
||||
mActionEdit.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
@ -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…
Reference in New Issue
Block a user