mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-17 06:15:15 -05:00
More work on add subkey dialog design
This commit is contained in:
parent
04cdd45e1a
commit
39380a3617
@ -37,6 +37,7 @@ import android.widget.CompoundButton;
|
||||
import android.widget.DatePicker;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TableRow;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.spongycastle.bcpg.sig.KeyFlags;
|
||||
@ -59,6 +60,7 @@ public class AddSubkeyDialogFragment extends DialogFragment {
|
||||
private OnAlgorithmSelectedListener mAlgorithmSelectedListener;
|
||||
|
||||
private CheckBox mNoExpiryCheckBox;
|
||||
private TableRow mExpiryRow;
|
||||
private DatePicker mExpiryDatePicker;
|
||||
private Spinner mAlgorithmSpinner;
|
||||
private Spinner mKeySizeSpinner;
|
||||
@ -97,9 +99,10 @@ public class AddSubkeyDialogFragment extends DialogFragment {
|
||||
|
||||
View view = mInflater.inflate(R.layout.add_subkey_dialog, null);
|
||||
dialog.setView(view);
|
||||
dialog.setTitle(R.string.title_create_key);
|
||||
dialog.setTitle(R.string.title_add_subkey);
|
||||
|
||||
mNoExpiryCheckBox = (CheckBox) view.findViewById(R.id.add_subkey_no_expiry);
|
||||
mExpiryRow = (TableRow) view.findViewById(R.id.add_subkey_expiry_row);
|
||||
mExpiryDatePicker = (DatePicker) view.findViewById(R.id.add_subkey_expiry_date_picker);
|
||||
mAlgorithmSpinner = (Spinner) view.findViewById(R.id.add_subkey_algorithm);
|
||||
mKeySizeSpinner = (Spinner) view.findViewById(R.id.add_subkey_size);
|
||||
@ -115,9 +118,9 @@ public class AddSubkeyDialogFragment extends DialogFragment {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (isChecked) {
|
||||
mExpiryDatePicker.setVisibility(View.GONE);
|
||||
mExpiryRow.setVisibility(View.GONE);
|
||||
} else {
|
||||
mExpiryDatePicker.setVisibility(View.VISIBLE);
|
||||
mExpiryRow.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -7,6 +7,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:stretchColumns="1">
|
||||
@ -15,6 +16,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:text="@string/key_creation_el_gamal_info" />
|
||||
|
||||
<TableRow>
|
||||
@ -70,7 +72,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<TableRow>
|
||||
<TableRow
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label_expiry"
|
||||
@ -89,7 +93,9 @@
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
<TableRow
|
||||
android:id="@+id/add_subkey_expiry_row"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -100,7 +106,6 @@
|
||||
<DatePicker
|
||||
android:id="@+id/add_subkey_expiry_date_picker"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:spinnersShown="true"
|
||||
|
@ -7,7 +7,7 @@
|
||||
<string name="title_encrypt">Encrypt</string>
|
||||
<string name="title_decrypt">Decrypt</string>
|
||||
<string name="title_authentication">Passphrase</string>
|
||||
<string name="title_create_key">Create My Key</string>
|
||||
<string name="title_add_subkey">Add subkey</string>
|
||||
<string name="title_edit_key">Edit Key</string>
|
||||
<string name="title_preferences">Preferences</string>
|
||||
<string name="title_api_registered_apps">Apps</string>
|
||||
|
Loading…
Reference in New Issue
Block a user