make restore backup dialog scrollable

Daniel Gultsch created

fixes #267

Change summary

src/conversations/res/layout/dialog_enter_password.xml | 71 ++++++-----
1 file changed, 38 insertions(+), 33 deletions(-)

Detailed changes

src/conversations/res/layout/dialog_enter_password.xml 🔗

@@ -2,47 +2,52 @@
 <layout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto">
 
-    <LinearLayout
+    <ScrollView
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:orientation="vertical"
-        android:padding="?dialogPreferredPadding">
+        android:layout_height="match_parent">
 
-        <TextView
-            android:id="@+id/explain"
+        <LinearLayout
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:text="@string/enter_password_to_restore"
-            android:textAppearance="?textAppearanceBodyMedium" />
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="18sp"
-            android:text="@string/restore_warning"
-            android:textAppearance="?textAppearanceBodyMedium" />
+            android:orientation="vertical"
+            android:padding="?dialogPreferredPadding">
+            
+            <TextView
+                android:id="@+id/explain"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/enter_password_to_restore"
+                android:textAppearance="?textAppearanceBodyMedium" />
 
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="18sp"
-            android:text="@string/restore_warning_continued"
-            android:textAppearance="?textAppearanceBodyMedium" />
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="18sp"
+                android:text="@string/restore_warning"
+                android:textAppearance="?textAppearanceBodyMedium" />
 
-        <com.google.android.material.textfield.TextInputLayout
-            android:id="@+id/account_password_layout"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="8dp"
-            app:endIconMode="password_toggle">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="18sp"
+                android:text="@string/restore_warning_continued"
+                android:textAppearance="?textAppearanceBodyMedium" />
 
-            <eu.siacs.conversations.ui.widget.TextInputEditText
-                android:id="@+id/account_password"
+            <com.google.android.material.textfield.TextInputLayout
+                android:id="@+id/account_password_layout"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:hint="@string/password"
-                android:inputType="textPassword" />
+                android:layout_marginTop="8dp"
+                app:endIconMode="password_toggle">
+
+                <eu.siacs.conversations.ui.widget.TextInputEditText
+                    android:id="@+id/account_password"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:hint="@string/password"
+                    android:inputType="textPassword" />
 
-        </com.google.android.material.textfield.TextInputLayout>
-    </LinearLayout>
+            </com.google.android.material.textfield.TextInputLayout>
+        </LinearLayout>
+    </ScrollView>
 </layout>