Skip to content

Commit

Permalink
Added ScrollView to StorageMigrationDialog and moved the error TextVi…
Browse files Browse the repository at this point in the history
…ew up
  • Loading branch information
grzesiek2010 committed Feb 28, 2020
1 parent 254db8e commit 6122d41
Showing 1 changed file with 88 additions and 92 deletions.
180 changes: 88 additions & 92 deletions collect_app/src/main/res/layout/storage_migration_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,123 +12,119 @@
android:layout_height="match_parent"
android:orientation="vertical">

<LinearLayout
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="@dimen/margin_standard">

<TextView
android:id="@+id/messageText1"
style="@style/TextAppearance.Collect.Body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_small"
android:text="@string/storage_migration_dialog_message1" />

<TextView
android:id="@+id/messageText2"
style="@style/TextAppearance.Collect.Body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:layout_marginTop="@dimen/margin_small"
android:text="@string/storage_migration_dialog_message2" />

<TextView
android:id="@+id/messageText3"
style="@style/TextAppearance.Collect.Body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_small"
android:text="@string/storage_migration_dialog_message3" />

<com.google.android.material.button.MaterialButton
android:id="@+id/moreDetailsButton"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/storage_migration_more_details"
android:textColor="?colorSecondary"
android:paddingStart="0dp"
android:paddingEnd="0dp"
android:paddingTop="@dimen/margin_standard" />

<TextView
android:id="@+id/errorText"
style="@style/TextAppearance.Collect.Headline6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_standard"
android:visibility="gone"/>
android:layout_above="@+id/bottomBar">

<LinearLayout
android:id="@+id/progressBar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:visibility="gone">
android:padding="@dimen/margin_standard">

<ProgressBar
<TextView
android:id="@+id/errorText"
style="@style/TextAppearance.Collect.Headline6"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</ProgressBar>
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/margin_large"
android:visibility="gone"/>

<TextView
android:id="@+id/messageText1"
style="@style/TextAppearance.Collect.Body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/storage_migration_progress_msg"
android:layout_marginTop="@dimen/margin_small"
android:gravity="center_horizontal"/>
</LinearLayout>
</LinearLayout>
android:text="@string/storage_migration_dialog_message1" />

<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<TextView
android:id="@+id/messageText2"
style="@style/TextAppearance.Collect.Body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:layout_marginTop="@dimen/margin_small"
android:text="@string/storage_migration_dialog_message2" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/messageText3"
style="@style/TextAppearance.Collect.Body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_small"
android:text="@string/storage_migration_dialog_message3" />

<ImageView
android:layout_width="match_parent"
<com.google.android.material.button.MaterialButton
android:id="@+id/moreDetailsButton"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/shadow_up" />
android:text="@string/storage_migration_more_details"
android:textColor="?colorSecondary"
android:paddingStart="0dp"
android:paddingEnd="0dp"
android:paddingTop="@dimen/margin_standard" />

<LinearLayout
android:id="@+id/progressBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="end">
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:visibility="gone">

<com.google.android.material.button.MaterialButton
android:id="@+id/cancelButton"
style="@style/Widget.MaterialComponents.Button.TextButton"
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:text="@string/cancel"
android:textColor="?colorSecondary"
android:paddingTop="12dp"
android:paddingBottom="@dimen/margin_small" />

<com.google.android.material.button.MaterialButton
android:id="@+id/migrateButton"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_height="wrap_content">
</ProgressBar>

<TextView
style="@style/TextAppearance.Collect.Body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:text="@string/migrate"
android:textColor="?colorSecondary"
android:paddingTop="12dp"
android:paddingBottom="@dimen/margin_small" />
android:text="@string/storage_migration_progress_msg"
android:layout_marginTop="@dimen/margin_small"
android:gravity="center_horizontal"/>
</LinearLayout>
</LinearLayout>
</FrameLayout>
</ScrollView>

<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/shadow_up"
android:layout_above="@+id/bottomBar"/>

<LinearLayout
android:id="@+id/bottomBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="end"
android:layout_alignParentBottom="true">

<com.google.android.material.button.MaterialButton
android:id="@+id/cancelButton"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:text="@string/cancel"
android:textColor="?colorSecondary"
android:paddingTop="12dp"
android:paddingBottom="@dimen/margin_small" />

<com.google.android.material.button.MaterialButton
android:id="@+id/migrateButton"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:text="@string/migrate"
android:textColor="?colorSecondary"
android:paddingTop="12dp"
android:paddingBottom="@dimen/margin_small" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

0 comments on commit 6122d41

Please sign in to comment.