mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-26 19:45:26 +00:00
95 lines
4.0 KiB
XML
95 lines
4.0 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.redesign.settings.SettingsItem.Blank" />
|
||
|
|
||
|
<variable
|
||
|
name="callback"
|
||
|
type="com.topjohnwu.magisk.redesign.settings.SettingsItem.Callback" />
|
||
|
|
||
|
</data>
|
||
|
|
||
|
<com.google.android.material.card.MaterialCardView
|
||
|
style="@style/WidgetFoundation.Card"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:onClick="@{(view) -> callback.onItemPressed(view, item)}"
|
||
|
tools:layout_gravity="center">
|
||
|
|
||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:minHeight="?listPreferredItemHeightSmall"
|
||
|
android:orientation="vertical">
|
||
|
|
||
|
<androidx.appcompat.widget.AppCompatImageView
|
||
|
android:id="@+id/blank_icon"
|
||
|
style="@style/WidgetFoundation.Icon"
|
||
|
gone="@{item.icon == 0}"
|
||
|
android:background="@null"
|
||
|
android:rotation="180"
|
||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||
|
app:layout_constraintStart_toStartOf="parent"
|
||
|
app:layout_constraintTop_toTopOf="parent"
|
||
|
app:srcCompat="@{item.icon}"
|
||
|
tools:srcCompat="@drawable/ic_fingerprint" />
|
||
|
|
||
|
<androidx.appcompat.widget.AppCompatImageView
|
||
|
android:id="@+id/blank_indicator"
|
||
|
style="@style/WidgetFoundation.Icon"
|
||
|
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" />
|
||
|
|
||
|
<LinearLayout
|
||
|
android:id="@+id/blank_text"
|
||
|
android:layout_width="0dp"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:layout_marginStart="@{item.icon == 0 ? (int) @dimen/l1 : 0}"
|
||
|
android:gravity="center_vertical"
|
||
|
android:orientation="vertical"
|
||
|
android:paddingTop="@dimen/l1"
|
||
|
android:paddingBottom="@dimen/l1"
|
||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||
|
app:layout_constraintEnd_toStartOf="@+id/blank_indicator"
|
||
|
app:layout_constraintStart_toEndOf="@+id/blank_icon"
|
||
|
app:layout_constraintTop_toTopOf="parent">
|
||
|
|
||
|
<androidx.appcompat.widget.AppCompatTextView
|
||
|
android:id="@+id/blank_title"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:layout_gravity="center"
|
||
|
android:gravity="start"
|
||
|
android:text="@{item.title}"
|
||
|
android:textAppearance="@style/AppearanceFoundation.Body"
|
||
|
android:textStyle="bold"
|
||
|
tools:lines="1"
|
||
|
tools:text="@tools:sample/lorem/random" />
|
||
|
|
||
|
<androidx.appcompat.widget.AppCompatTextView
|
||
|
android:id="@+id/blank_description"
|
||
|
gone="@{item.description.empty}"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:text="@{item.description}"
|
||
|
android:textAppearance="@style/AppearanceFoundation.Tiny.Variant"
|
||
|
tools:lines="2"
|
||
|
tools:text="@tools:sample/lorem/random" />
|
||
|
|
||
|
</LinearLayout>
|
||
|
|
||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||
|
|
||
|
</com.google.android.material.card.MaterialCardView>
|
||
|
|
||
|
</layout>
|