Reserve space so that the progress and error doesn't jump around

And add margin to it
This commit is contained in:
Julian Raufelder 2022-06-04 08:57:12 +02:00
parent 9e92bc6a16
commit da34e1416c
No known key found for this signature in database
GPG Key ID: 17EE71F6634E381D
10 changed files with 44 additions and 21 deletions

View File

@ -18,13 +18,15 @@
layout="@layout/view_dialog_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv_message" />
android:layout_below="@id/tv_message"
android:layout_marginTop="16dp" />
<include
layout="@layout/view_dialog_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_message" />
android:layout_below="@+id/tv_message"
android:layout_marginTop="16dp" />
</RelativeLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -81,13 +81,15 @@
layout="@layout/view_dialog_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/password_hint" />
android:layout_below="@+id/password_hint"
android:layout_marginTop="16dp" />
<include
layout="@layout/view_dialog_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/password_hint" />
android:layout_below="@+id/password_hint"
android:layout_marginTop="16dp" />
</RelativeLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -28,13 +28,15 @@
layout="@layout/view_dialog_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/til_folder" />
android:layout_below="@id/til_folder"
android:layout_marginTop="16dp" />
<include
layout="@layout/view_dialog_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/til_folder" />
android:layout_below="@id/til_folder"
android:layout_marginTop="16dp" />
</RelativeLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -40,13 +40,15 @@
layout="@layout/view_dialog_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/til_license" />
android:layout_below="@+id/til_license"
android:layout_marginTop="16dp" />
<include
layout="@layout/view_dialog_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/til_license" />
android:layout_below="@+id/til_license"
android:layout_marginTop="16dp" />
</RelativeLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -30,13 +30,15 @@
layout="@layout/view_dialog_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/til_password" />
android:layout_below="@+id/til_password"
android:layout_marginTop="16dp" />
<include
layout="@layout/view_dialog_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/til_password" />
android:layout_below="@+id/til_password"
android:layout_marginTop="16dp" />
</RelativeLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -18,22 +18,24 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/dialog_file_name_hint"
android:text="@string/dialog_file_name_placeholder"
android:imeOptions="flagNoPersonalizedLearning"
android:inputType="text"
android:maxLines="1" />
android:maxLines="1"
android:text="@string/dialog_file_name_placeholder" />
</com.google.android.material.textfield.TextInputLayout>
<include
layout="@layout/view_dialog_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/til_file_name" />
android:layout_below="@+id/til_file_name"
android:layout_marginTop="16dp" />
<include
layout="@layout/view_dialog_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/til_file_name" />
android:layout_below="@+id/til_file_name"
android:layout_marginTop="16dp" />
</RelativeLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -27,12 +27,14 @@
layout="@layout/view_dialog_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/til_rename" />
android:layout_below="@+id/til_rename"
android:layout_marginTop="16dp" />
<include
layout="@layout/view_dialog_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/til_rename" />
android:layout_below="@+id/til_rename"
android:layout_marginTop="16dp" />
</RelativeLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -21,13 +21,15 @@
layout="@layout/view_dialog_intermediate_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/file_upload" />
android:layout_below="@id/file_upload"
android:layout_marginTop="16dp" />
<include
layout="@layout/view_dialog_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/file_upload" />
android:layout_below="@id/file_upload"
android:layout_marginTop="16dp" />
</RelativeLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -9,6 +9,10 @@
android:paddingEnd="16dp"
android:visibility="gone">
<Space
android:layout_width="0dp"
android:layout_height="48dp" />
<TextView
android:id="@+id/tv_error"
android:layout_width="match_parent"

View File

@ -9,14 +9,17 @@
android:paddingEnd="16dp"
android:visibility="gone">
<ProgressBar style="@style/AppTheme.ProgressBar" />
<ProgressBar
style="@style/AppTheme.ProgressBar"
android:layout_width="48dp"
android:layout_height="48dp" />
<TextView
android:id="@+id/tv_progress"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:ellipsize="middle"
android:gravity="center"
android:singleLine="true"
android:textSize="18sp" />
<!-- using android:singleLine to fix https://code.google.com/p/android/issues/detail?id=33868 -->