mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-06 17:25:05 -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 TextView mSecretKey;
|
||||||
private BootstrapButton mActionEdit;
|
private BootstrapButton mActionEdit;
|
||||||
private BootstrapButton mActionEncrypt;
|
private BootstrapButton mActionEncrypt;
|
||||||
|
private BootstrapButton mActionCertify;
|
||||||
|
|
||||||
private ListView mUserIds;
|
private ListView mUserIds;
|
||||||
private ListView mKeys;
|
private ListView mKeys;
|
||||||
@ -94,6 +95,7 @@ public class ViewKeyMainFragment extends Fragment implements
|
|||||||
mKeys = (ListView) view.findViewById(R.id.keys);
|
mKeys = (ListView) view.findViewById(R.id.keys);
|
||||||
mActionEdit = (BootstrapButton) view.findViewById(R.id.action_edit);
|
mActionEdit = (BootstrapButton) view.findViewById(R.id.action_edit);
|
||||||
mActionEncrypt = (BootstrapButton) view.findViewById(R.id.action_encrypt);
|
mActionEncrypt = (BootstrapButton) view.findViewById(R.id.action_encrypt);
|
||||||
|
mActionCertify = (BootstrapButton) view.findViewById(R.id.action_certify);
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
@ -130,6 +132,9 @@ public class ViewKeyMainFragment extends Fragment implements
|
|||||||
mSecretKey.setTextColor(getResources().getColor(R.color.emphasis));
|
mSecretKey.setTextColor(getResources().getColor(R.color.emphasis));
|
||||||
mSecretKey.setText(R.string.secret_key_yes);
|
mSecretKey.setText(R.string.secret_key_yes);
|
||||||
|
|
||||||
|
// certify button
|
||||||
|
mActionCertify.setVisibility(View.GONE);
|
||||||
|
|
||||||
// edit button
|
// edit button
|
||||||
mActionEdit.setVisibility(View.VISIBLE);
|
mActionEdit.setVisibility(View.VISIBLE);
|
||||||
mActionEdit.setOnClickListener(new View.OnClickListener() {
|
mActionEdit.setOnClickListener(new View.OnClickListener() {
|
||||||
@ -143,6 +148,18 @@ public class ViewKeyMainFragment extends Fragment implements
|
|||||||
} else {
|
} else {
|
||||||
mSecretKey.setTextColor(Color.BLACK);
|
mSecretKey.setTextColor(Color.BLACK);
|
||||||
mSecretKey.setText(getResources().getString(R.string.secret_key_no));
|
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);
|
mActionEdit.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -251,6 +251,17 @@
|
|||||||
bootstrapbutton:bb_icon_left="fa-lock"
|
bootstrapbutton:bb_icon_left="fa-lock"
|
||||||
bootstrapbutton:bb_type="info" />
|
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>
|
</LinearLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
Loading…
Reference in New Issue
Block a user