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