Fixed "enabled" state for download action button
This commit is contained in:
parent
265dca3723
commit
b2b81a5d0f
@ -95,6 +95,7 @@
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/module_download"
|
||||
style="?styleIconPrimary"
|
||||
isEnabled="@{!(item.progress == -100 || (item.progress > 0 && item.progress < 100))}"
|
||||
android:contentDescription="@string/download"
|
||||
android:onClick="@{() -> viewModel.download(item)}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -104,19 +105,19 @@
|
||||
|
||||
</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
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
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
|
||||
style="?styleProgressIndeterminate"
|
||||
goneUnless="@{item.progress == -100}"
|
||||
|
Loading…
Reference in New Issue
Block a user