Added caption to password dialog

pull/194/head
M66B 4 years ago
parent 064ee0ba48
commit 8c3c160aa8

@ -1308,10 +1308,13 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
final boolean export = getArguments().getBoolean("export");
View dview = LayoutInflater.from(getContext()).inflate(R.layout.dialog_password, null);
TextView tvCaption = dview.findViewById(R.id.tvCaption);
etPassword1 = dview.findViewById(R.id.tilPassword1);
etPassword2 = dview.findViewById(R.id.tilPassword2);
TextView tvImportHint = dview.findViewById(R.id.tvImportHint);
tvCaption.setText(export ? R.string.title_setup_export : R.string.title_setup_import);
if (savedInstanceState != null) {
etPassword1.getEditText().setText(savedInstanceState.getString("fair:password1"));
etPassword2.getEditText().setText(savedInstanceState.getString("fair:password2"));

@ -1,17 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<eu.faircode.email.ScrollViewEx xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="24dp">
android:padding="24dp"
android:scrollbarStyle="outsideOverlay">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<eu.faircode.email.FixedTextView
android:id="@+id/tvCaption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title_setup_export"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilPassword1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvCaption"
app:passwordToggleEnabled="true">
<com.google.android.material.textfield.TextInputEditText
@ -55,4 +70,5 @@
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tilPassword2" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</eu.faircode.email.ScrollViewEx>
Loading…
Cancel
Save