You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Updated module sections so it looks more consistent
This commit is contained in:
@@ -32,13 +32,14 @@
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/module_state_icon"
|
||||
style="?styleImageSmall"
|
||||
gone="@{!item.removed && !item.updated}"
|
||||
srcCompat="@{item.removed ? R.drawable.ic_delete_md2 : R.drawable.ic_update_md2}"
|
||||
srcCompat="@{item.removed ? R.drawable.ic_delete_md2 : (item.updated ? R.drawable.ic_update_md2 : 0)}"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:background="@null"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_version_author"
|
||||
@@ -101,7 +102,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{(v) -> item.delete(viewModel)}"
|
||||
android:text="@{item.removed ? `Restore` : `Remove`}"
|
||||
android:text="@{item.removed ? @string/module_state_restore : @string/module_state_remove}"
|
||||
android:textAllCaps="false"
|
||||
app:icon="@{item.removed ? R.drawable.ic_restart : R.drawable.ic_delete_md2}"
|
||||
app:iconGravity="textEnd"
|
||||
|
||||
@@ -8,10 +8,15 @@
|
||||
name="item"
|
||||
type="com.topjohnwu.magisk.model.entity.recycler.SectionTitle" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.topjohnwu.magisk.redesign.module.ModuleViewModel" />
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
@@ -30,7 +35,8 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/module_button"
|
||||
style="?styleButtonText"
|
||||
gone="@{item.button == 0 || item.icon == 0}"
|
||||
gone="@{!item.hasButton}"
|
||||
android:onClick="@{() -> viewModel.sectionPressed(item)}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
|
||||
@@ -76,8 +76,10 @@
|
||||
<string name="module_safe_mode_message">You\'re in safe mode. None of user modules will work.\nThis message will disappear once safe mode is disabled.</string>
|
||||
<string name="module_version_author">%1$s by %2$s</string>
|
||||
<string name="module_section_pending">Pending changes</string>
|
||||
<string name="module_section_active">Active</string>
|
||||
<string name="module_section_installed">Installed</string>
|
||||
<string name="module_section_remote">Remote</string>
|
||||
<string name="module_state_remove">Remove</string>
|
||||
<string name="module_state_restore">Restore</string>
|
||||
|
||||
<string name="superuser_toggle_log">Toggles logging</string>
|
||||
<string name="superuser_toggle_notification">Toggles “toast” notifications</string>
|
||||
|
||||
Reference in New Issue
Block a user