Show module suspend notice

Close #4862
This commit is contained in:
topjohnwu
2021-11-09 23:59:37 -08:00
parent b8c1588284
commit ddd153c00d
4 changed files with 33 additions and 2 deletions
+18 -2
View File
@@ -28,7 +28,7 @@
isEnabled="@{!item.removed}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="@{item.enabled ? 1f : .5f}"
android:alpha="@{(item.enabled && !item.suspended) ? 1f : .5f}"
android:nextFocusRight="@id/module_indicator"
tools:layout_gravity="center"
tools:layout_margin="@dimen/l1">
@@ -94,6 +94,22 @@
app:layout_constraintStart_toEndOf="@+id/module_info"
app:layout_constraintTop_toTopOf="@+id/module_title" />
<TextView
android:id="@+id/module_suspend_text"
goneUnless="@{item.suspended}"
strikeThrough="@{item.removed}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/l1"
android:layout_marginTop="@dimen/l_50"
android:layout_marginEnd="@dimen/l1"
android:text="@{item.suspendText}"
android:textAppearance="@style/AppearanceFoundation.Tiny.Bold"
android:textColor="?colorError"
app:layout_constraintTop_toBottomOf="@+id/module_version_author"
tools:lines="1"
tools:text="@tools:sample/lorem/random" />
<TextView
android:id="@+id/module_description"
gone="@{item.item.description.empty}"
@@ -105,7 +121,7 @@
android:layout_marginEnd="@dimen/l1"
android:text="@{item.item.description}"
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
app:layout_constraintTop_toBottomOf="@+id/module_version_author"
app:layout_constraintTop_toBottomOf="@+id/module_suspend_text"
tools:lines="4"
tools:text="@tools:sample/lorem/random" />
+2
View File
@@ -123,6 +123,8 @@
<string name="module_installed">@string/home_installed_version</string>
<string name="module_section_online">Online</string>
<string name="sorting_order">Sorting Order</string>
<string name="suspend_text_riru">Module suspended because %1$s is enabled</string>
<string name="suspend_text_zygisk">Module suspended because %1$s is not enabled</string>
<!--Settings-->
<string name="settings_dark_mode_title">Theme Mode</string>