mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-01-12 05:58:07 -05:00
certify: selectsecretkeyfragment cosmetics
This commit is contained in:
parent
db25c56b64
commit
9920196f70
@ -39,6 +39,7 @@ public class SelectSecretKeyLayoutFragment extends Fragment {
|
||||
private TextView mKeyUserId;
|
||||
private TextView mKeyUserIdRest;
|
||||
private TextView mKeyMasterKeyIdHex;
|
||||
private TextView mNoKeySelected;
|
||||
private BootstrapButton mSelectKeyButton;
|
||||
private Boolean mFilterCertify;
|
||||
|
||||
@ -60,10 +61,10 @@ public class SelectSecretKeyLayoutFragment extends Fragment {
|
||||
|
||||
public void selectKey(long secretKeyId) {
|
||||
if (secretKeyId == Id.key.none) {
|
||||
mKeyMasterKeyIdHex.setText(R.string.api_settings_no_key);
|
||||
mKeyUserIdRest.setText("");
|
||||
mNoKeySelected.setVisibility(View.VISIBLE);
|
||||
mKeyUserId.setVisibility(View.GONE);
|
||||
mKeyUserIdRest.setVisibility(View.GONE);
|
||||
mKeyMasterKeyIdHex.setVisibility(View.GONE);
|
||||
|
||||
} else {
|
||||
PGPSecretKeyRing keyRing = ProviderHelper.getPGPSecretKeyRingByMasterKeyId(
|
||||
@ -93,20 +94,25 @@ public class SelectSecretKeyLayoutFragment extends Fragment {
|
||||
mKeyMasterKeyIdHex.setText(masterkeyIdHex);
|
||||
mKeyUserId.setText(userName);
|
||||
mKeyUserIdRest.setText(userEmail);
|
||||
mKeyMasterKeyIdHex.setVisibility(View.VISIBLE);
|
||||
mKeyUserId.setVisibility(View.VISIBLE);
|
||||
mKeyUserIdRest.setVisibility(View.VISIBLE);
|
||||
mNoKeySelected.setVisibility(View.GONE);
|
||||
} else {
|
||||
mKeyMasterKeyIdHex.setText(getActivity().getResources().getString(R.string.no_key));
|
||||
mKeyMasterKeyIdHex.setVisibility(View.GONE);
|
||||
mKeyUserId.setVisibility(View.GONE);
|
||||
mKeyUserIdRest.setVisibility(View.GONE);
|
||||
mNoKeySelected.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else {
|
||||
mKeyMasterKeyIdHex.setText(
|
||||
getActivity().getResources()
|
||||
.getString(R.string.no_keys_added_or_updated)
|
||||
+ " for master id: " + secretKeyId);
|
||||
mKeyMasterKeyIdHex.setVisibility(View.VISIBLE);
|
||||
mKeyUserId.setVisibility(View.GONE);
|
||||
mKeyUserIdRest.setVisibility(View.GONE);
|
||||
mNoKeySelected.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
@ -124,6 +130,7 @@ public class SelectSecretKeyLayoutFragment extends Fragment {
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.select_secret_key_layout_fragment, container, false);
|
||||
|
||||
mNoKeySelected = (TextView) view.findViewById(R.id.no_key_selected);
|
||||
mKeyUserId = (TextView) view.findViewById(R.id.select_secret_key_user_id);
|
||||
mKeyUserIdRest = (TextView) view.findViewById(R.id.select_secret_key_user_id_rest);
|
||||
mKeyMasterKeyIdHex = (TextView) view.findViewById(R.id.select_secret_key_master_key_hex);
|
||||
|
@ -52,16 +52,25 @@
|
||||
android:layout_marginRight="5dip"
|
||||
android:text=""
|
||||
android:visibility="gone"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:paddingLeft="10dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/select_secret_key_master_key_hex"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:visibility="gone"
|
||||
android:layout_marginRight="15dip" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_key_selected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:text="@string/api_settings_no_key"
|
||||
android:layout_marginRight="5dip" />
|
||||
android:layout_marginTop="15dp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user