57 lines
2.2 KiB
XML
57 lines
2.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<com.google.android.material.card.MaterialCardView
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
app:strokeWidth="0dp"
|
|
android:layout_marginHorizontal="16dp"
|
|
android:layout_marginVertical="8dp">
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:clickable="true"
|
|
android:background="?attr/colorSurface"
|
|
android:foreground="?attr/selectableItemBackground"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal"
|
|
android:paddingHorizontal="16dp"
|
|
android:paddingVertical="8dp">
|
|
|
|
<!-- 图标 -->
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/ivIcon"
|
|
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:clickable="false" />
|
|
|
|
<!-- 按钮名称 -->
|
|
<TextView
|
|
android:id="@+id/tvName"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="12dp"
|
|
android:layout_weight="1"
|
|
android:text=""
|
|
android:textColor="?attr/colorOnSurface"
|
|
android:textSize="16sp" />
|
|
|
|
<!-- 禁用/隐藏按钮 -->
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnDisable"
|
|
style="@style/Widget.Material3Expressive.Button.IconButton.Outlined"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="8dp"
|
|
app:icon="@drawable/ic_visibility_on" />
|
|
|
|
<ImageView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="4dp"
|
|
android:src="@drawable/ic_drag_handle" />
|
|
|
|
</LinearLayout>
|
|
</com.google.android.material.card.MaterialCardView>
|