refactor and improve EntryEditActivity: Ensure that configuration changes are handled properly
This commit is contained in:
@@ -316,7 +316,7 @@ namespace keepass2android
|
||||
|
||||
if (resultCode == KeePass.ResultOkPasswordGenerator)
|
||||
{
|
||||
String generatedPassword = data.GetStringExtra("keepass2android.password.generated_password");
|
||||
String generatedPassword = data.GetStringExtra(GeneratePasswordActivity.GeneratedPasswordKey);
|
||||
FindViewById<TextView>(Resource.Id.entry_password).Text = generatedPassword;
|
||||
FindViewById<TextView>(Resource.Id.entry_confpassword).Text = generatedPassword;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -62,7 +62,7 @@ namespace keepass2android
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Holds the state of the EntrryEditActivity. This is required to be able to keep a partially modified entry in memory
|
||||
/// Holds the state of the EntryEditActivity. This is required to be able to keep a partially modified entry in memory
|
||||
/// through the App variable. Serializing this state (especially the Entry/EntryInDatabase) can be a performance problem
|
||||
/// when there are big attachements.
|
||||
/// </summary>
|
||||
|
||||
@@ -46,7 +46,9 @@ namespace keepass2android
|
||||
#endif
|
||||
|
||||
{
|
||||
private readonly int[] _buttonLengthButtonIds = new[] {Resource.Id.btn_length6,
|
||||
public const string GeneratedPasswordKey = "keepass2android.password.generated_password";
|
||||
|
||||
private readonly int[] _buttonLengthButtonIds = new[] {Resource.Id.btn_length6,
|
||||
Resource.Id.btn_length8,
|
||||
Resource.Id.btn_length12,
|
||||
Resource.Id.btn_length16,
|
||||
@@ -259,7 +261,7 @@ namespace keepass2android
|
||||
EditText password = (EditText) FindViewById(Resource.Id.password_edit);
|
||||
|
||||
Intent intent = new Intent();
|
||||
intent.PutExtra("keepass2android.password.generated_password", password.Text);
|
||||
intent.PutExtra(GeneratedPasswordKey, password.Text);
|
||||
|
||||
SetResult(KeePass.ResultOkPasswordGenerator, intent);
|
||||
|
||||
|
||||
@@ -75,6 +75,11 @@ android:layout_height="wrap_content">
|
||||
android:layout_marginRight="0dip"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/protection"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="0dip"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
Reference in New Issue
Block a user