mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-27 20:15:29 +00:00
Updated module item design to follow suit with the rest of the app
This commit is contained in:
parent
f83f92d3fa
commit
bc5cbe9fba
@ -32,8 +32,7 @@
|
|||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:paddingBottom="@dimen/l1">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/module_state_icon"
|
android:id="@+id/module_state_icon"
|
||||||
@ -53,10 +52,11 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/l1"
|
android:layout_marginStart="@dimen/l1"
|
||||||
android:layout_marginTop="@dimen/l1"
|
android:layout_marginTop="@dimen/l1"
|
||||||
|
android:layout_marginEnd="@dimen/l1"
|
||||||
android:text="@{item.item.name}"
|
android:text="@{item.item.name}"
|
||||||
android:textAppearance="?appearanceTextBodyNormal"
|
android:textAppearance="?appearanceTextBodyNormal"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/module_remove"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/module_state_icon"
|
app:layout_constraintStart_toEndOf="@+id/module_state_icon"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:text="@tools:sample/lorem" />
|
tools:text="@tools:sample/lorem" />
|
||||||
@ -66,14 +66,16 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/l1"
|
android:layout_marginStart="@dimen/l1"
|
||||||
|
android:layout_marginEnd="@dimen/l1"
|
||||||
android:text="@{@string/module_version_author(item.item.version, item.item.author)}"
|
android:text="@{@string/module_version_author(item.item.version, item.item.author)}"
|
||||||
android:textAppearance="?appearanceTextCaptionVariant"
|
android:textAppearance="?appearanceTextCaptionVariant"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/module_remove"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/module_state_icon"
|
app:layout_constraintStart_toEndOf="@+id/module_state_icon"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/module_title"
|
app:layout_constraintTop_toBottomOf="@+id/module_title"
|
||||||
tools:text="v1 by topjohnwu" />
|
tools:text="v1 by topjohnwu" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/module_description"
|
||||||
gone="@{item.item.description.empty}"
|
gone="@{item.item.description.empty}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -86,16 +88,28 @@
|
|||||||
tools:lines="4"
|
tools:lines="4"
|
||||||
tools:text="@tools:sample/lorem/random" />
|
tools:text="@tools:sample/lorem/random" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<View
|
||||||
android:id="@+id/module_remove"
|
android:id="@+id/module_divider"
|
||||||
style="?styleIconNormal"
|
android:layout_width="match_parent"
|
||||||
isSelected="@{item.removed}"
|
android:layout_height="1dp"
|
||||||
android:alpha=".5"
|
android:layout_marginTop="@dimen/l1"
|
||||||
|
android:background="?colorSurfaceVariant"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/module_description" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
style="?styleButtonText"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:onClick="@{(v) -> item.delete(viewModel)}"
|
android:onClick="@{(v) -> item.delete(viewModel)}"
|
||||||
|
android:text="@{item.removed ? `Restore` : `Remove`}"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:icon="@{item.removed ? R.drawable.ic_restart : R.drawable.ic_delete_md2}"
|
||||||
|
app:iconGravity="textEnd"
|
||||||
|
app:iconPadding="@dimen/l_50"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/module_version_author"
|
app:layout_constraintTop_toBottomOf="@+id/module_divider"
|
||||||
app:layout_constraintTop_toTopOf="@+id/module_title"
|
tools:icon="@drawable/ic_delete_md2"
|
||||||
app:srcCompat="@drawable/ic_delete_restore" />
|
tools:text="Remove" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user