mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-26 11:35:25 +00:00
73c4b21285
Most importantly added design and functionality backing for these items
67 lines
2.8 KiB
XML
67 lines
2.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
xmlns:tools="http://schemas.android.com/tools">
|
|
|
|
<data>
|
|
|
|
<variable
|
|
name="item"
|
|
type="com.topjohnwu.magisk.model.entity.recycler.TappableHeadlineItem" />
|
|
|
|
<variable
|
|
name="listener"
|
|
type="com.topjohnwu.magisk.model.entity.recycler.TappableHeadlineItem.Listener" />
|
|
|
|
</data>
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
style="@style/WidgetFoundation.Card.Primary"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:onClick="@{() -> listener.onItemPressed(item)}"
|
|
tools:layout_gravity="center">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<androidx.appcompat.widget.AppCompatImageView
|
|
android:id="@+id/tappable_icon"
|
|
style="@style/WidgetFoundation.Icon.OnPrimary"
|
|
android:background="@null"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:srcCompat="@{item.icon}"
|
|
tools:srcCompat="@drawable/ic_hide_md2" />
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:requiresFadingEdge="horizontal"
|
|
android:singleLine="true"
|
|
android:text="@{item.title}"
|
|
android:textAppearance="@style/AppearanceFoundation.Body.OnPrimary"
|
|
android:textStyle="bold"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toStartOf="@+id/headline_icon_pointer"
|
|
app:layout_constraintStart_toEndOf="@+id/tappable_icon"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
tools:text="@string/magisk_hide_md2" />
|
|
|
|
<androidx.appcompat.widget.AppCompatImageView
|
|
android:id="@+id/headline_icon_pointer"
|
|
style="@style/WidgetFoundation.Icon.OnPrimary"
|
|
android:background="@null"
|
|
android:rotation="180"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:srcCompat="@drawable/ic_back_md2" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
</layout> |