Added setting resetting state on install screen
It will additionally show that download is complete rather than being stuck on loading.
This commit is contained in:
parent
09ba4772b8
commit
6b0854749f
@ -39,8 +39,7 @@ class InstallViewModel : BaseViewModel(State.LOADED) {
|
||||
}
|
||||
this.progress.value = progress.times(100).roundToInt()
|
||||
if (this.progress.value >= 100) {
|
||||
// this might cause issues if the flash activity launches on top of this sooner
|
||||
// back()
|
||||
state = State.LOADED
|
||||
}
|
||||
}
|
||||
method.addOnPropertyChangedCallback {
|
||||
|
@ -25,7 +25,7 @@
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
goneUnless="@{viewModel.loaded}"
|
||||
goneUnless="@{viewModel.loaded && viewModel.progress <= 0}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
@ -91,9 +91,9 @@
|
||||
<FrameLayout
|
||||
gone="@{viewModel.step != 0}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="3dp"
|
||||
android:paddingEnd="3dp"
|
||||
android:layout_height="wrap_content">
|
||||
android:paddingEnd="3dp">
|
||||
|
||||
<include
|
||||
layout="@layout/include_install_options"
|
||||
@ -172,13 +172,13 @@
|
||||
gone="@{viewModel.step != 1}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="3dp"
|
||||
android:paddingEnd="3dp"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:layout_marginTop="@dimen/l_50"
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
android:layout_marginBottom="@dimen/l_50"
|
||||
android:checkedButton="@={viewModel.method}">
|
||||
android:checkedButton="@={viewModel.method}"
|
||||
android:paddingStart="3dp"
|
||||
android:paddingEnd="3dp">
|
||||
|
||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
||||
android:id="@+id/method_download"
|
||||
@ -271,6 +271,23 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
goneUnless="@{viewModel.loaded && viewModel.progress >= 100}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/download_complete"
|
||||
android:textAppearance="@style/AppearanceFoundation.Title" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
Loading…
Reference in New Issue
Block a user