mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 22:07:39 +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
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/l1">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/module_state_icon"
|
||||
@ -53,10 +52,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
android:text="@{item.item.name}"
|
||||
android:textAppearance="?appearanceTextBodyNormal"
|
||||
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_constraintTop_toTopOf="parent"
|
||||
tools:text="@tools:sample/lorem" />
|
||||
@ -66,14 +66,16 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
android:text="@{@string/module_version_author(item.item.version, item.item.author)}"
|
||||
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_constraintTop_toBottomOf="@+id/module_title"
|
||||
tools:text="v1 by topjohnwu" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/module_description"
|
||||
gone="@{item.item.description.empty}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -86,16 +88,28 @@
|
||||
tools:lines="4"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/module_remove"
|
||||
style="?styleIconNormal"
|
||||
isSelected="@{item.removed}"
|
||||
android:alpha=".5"
|
||||
<View
|
||||
android:id="@+id/module_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
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: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_constraintBottom_toBottomOf="@+id/module_version_author"
|
||||
app:layout_constraintTop_toTopOf="@+id/module_title"
|
||||
app:srcCompat="@drawable/ic_delete_restore" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/module_divider"
|
||||
tools:icon="@drawable/ic_delete_md2"
|
||||
tools:text="Remove" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user