mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 10:37:39 +00:00
Fixed "enabled" state for download action button
This commit is contained in:
parent
265dca3723
commit
b2b81a5d0f
@ -95,6 +95,7 @@
|
|||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/module_download"
|
android:id="@+id/module_download"
|
||||||
style="?styleIconPrimary"
|
style="?styleIconPrimary"
|
||||||
|
isEnabled="@{!(item.progress == -100 || (item.progress > 0 && item.progress < 100))}"
|
||||||
android:contentDescription="@string/download"
|
android:contentDescription="@string/download"
|
||||||
android:onClick="@{() -> viewModel.download(item)}"
|
android:onClick="@{() -> viewModel.download(item)}"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
@ -104,19 +105,19 @@
|
|||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<ProgressBar
|
|
||||||
style="?styleProgressDeterminate"
|
|
||||||
goneUnless="@{item.progress > 0 && item.progress < 100}"
|
|
||||||
progressAnimated="@{item.progress}"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_gravity="bottom"
|
|
||||||
tools:progress="40" />
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom">
|
android:layout_gravity="bottom">
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
style="?styleProgressDeterminate"
|
||||||
|
goneUnless="@{item.progress > 0 && item.progress < 100}"
|
||||||
|
progressAnimated="@{item.progress}"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
tools:progress="40" />
|
||||||
|
|
||||||
<androidx.core.widget.ContentLoadingProgressBar
|
<androidx.core.widget.ContentLoadingProgressBar
|
||||||
style="?styleProgressIndeterminate"
|
style="?styleProgressIndeterminate"
|
||||||
goneUnless="@{item.progress == -100}"
|
goneUnless="@{item.progress == -100}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user