Added offline states for magisk and manager sections

This commit is contained in:
Viktor De Pasquale 2020-02-06 14:57:12 +01:00 committed by John Wu
parent 8146d0830d
commit 810468c279
2 changed files with 8 additions and 2 deletions

View File

@ -107,9 +107,9 @@
<com.google.android.material.card.MaterialCardView
style="@style/W.Home.Card.First"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:visibility="gone">
android:layout_width="wrap_content"
android:alpha="@{viewModel.stateCodeMagisk &lt; 0 ? .5f : 1f}">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
@ -132,6 +132,7 @@
<LinearLayout
android:id="@+id/home_magisk_remote_version"
style="@style/W.Home.Item.Top"
invisible="@{viewModel.stateCodeMagisk &lt; 0}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/home_magisk_remote_title">
@ -149,6 +150,7 @@
<LinearLayout
android:id="@+id/home_magisk_remote_version_code"
style="@style/W.Home.Item.Bottom"
invisible="@{viewModel.stateCodeMagisk &lt; 0}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/home_magisk_remote_version">

View File

@ -106,6 +106,7 @@
<com.google.android.material.card.MaterialCardView
style="@style/W.Home.Card.First"
android:layout_width="wrap_content"
android:alpha="@{viewModel.stateCodeManager &lt; 0 ? .5f : 1f}"
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
@ -129,6 +130,7 @@
<LinearLayout
android:id="@+id/home_manager_remote_version"
style="@style/W.Home.Item.Top"
invisible="@{viewModel.stateCodeManager &lt; 0}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/home_manager_remote_title">
@ -146,6 +148,7 @@
<LinearLayout
android:id="@+id/home_manager_remote_version_code"
style="@style/W.Home.Item"
invisible="@{viewModel.stateCodeManager &lt; 0}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/home_manager_remote_version">
@ -163,6 +166,7 @@
<LinearLayout
android:id="@+id/home_manager_remote_stub_version_code"
style="@style/W.Home.Item.Bottom"
invisible="@{viewModel.stateCodeManager &lt; 0}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/home_manager_remote_version_code">