1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 17:57:16 +00:00

Added export password hint

This commit is contained in:
M66B 2021-02-26 14:54:53 +01:00
parent 8c3c160aa8
commit fc7b243746
3 changed files with 14 additions and 1 deletions

View file

@ -1311,6 +1311,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
TextView tvCaption = dview.findViewById(R.id.tvCaption); TextView tvCaption = dview.findViewById(R.id.tvCaption);
etPassword1 = dview.findViewById(R.id.tilPassword1); etPassword1 = dview.findViewById(R.id.tilPassword1);
etPassword2 = dview.findViewById(R.id.tilPassword2); etPassword2 = dview.findViewById(R.id.tilPassword2);
TextView tvExportHint = dview.findViewById(R.id.tvExportHint);
TextView tvImportHint = dview.findViewById(R.id.tvImportHint); TextView tvImportHint = dview.findViewById(R.id.tvImportHint);
tvCaption.setText(export ? R.string.title_setup_export : R.string.title_setup_import); tvCaption.setText(export ? R.string.title_setup_export : R.string.title_setup_import);
@ -1321,6 +1322,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
} }
etPassword2.setVisibility(export ? View.VISIBLE : View.GONE); etPassword2.setVisibility(export ? View.VISIBLE : View.GONE);
tvExportHint.setVisibility(export ? View.VISIBLE : View.GONE);
tvImportHint.setVisibility(export ? View.GONE : View.VISIBLE); tvImportHint.setVisibility(export ? View.GONE : View.VISIBLE);
return new AlertDialog.Builder(getContext()) return new AlertDialog.Builder(getContext())

View file

@ -61,6 +61,16 @@
android:textAppearance="@style/TextAppearance.AppCompat.Medium" /> android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<eu.faircode.email.FixedTextView
android:id="@+id/tvExportHint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_setup_export_do"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tilPassword2" />
<eu.faircode.email.FixedTextView <eu.faircode.email.FixedTextView
android:id="@+id/tvImportHint" android:id="@+id/tvImportHint"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -69,6 +79,6 @@
android:text="@string/title_setup_import_do" android:text="@string/title_setup_import_do"
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tilPassword2" /> app:layout_constraintTop_toBottomOf="@id/tvExportHint" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</eu.faircode.email.ScrollViewEx> </eu.faircode.email.ScrollViewEx>

View file

@ -223,6 +223,7 @@
<string name="title_setup_export">Export settings</string> <string name="title_setup_export">Export settings</string>
<string name="title_setup_import">Import settings</string> <string name="title_setup_import">Import settings</string>
<string name="title_setup_export_do">The password is used to encrypt the settings and is required to import the settings again</string>
<string name="title_setup_import_do">Imported accounts will be added without overwriting any existing ones</string> <string name="title_setup_import_do">Imported accounts will be added without overwriting any existing ones</string>
<string name="title_setup_password">Password</string> <string name="title_setup_password">Password</string>
<string name="title_setup_password_chars">Password contains control or whitespace characters</string> <string name="title_setup_password_chars">Password contains control or whitespace characters</string>