parent
ea4ebf9efc
commit
53adea2949
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="8dp" />
|
||||
<solid android:color="#E0E0E0" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#BDBDBD" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="8dp" />
|
||||
<solid android:color="#FFFFFF" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#BDBDBD" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="12dp" />
|
||||
<solid android:color="#F0F0F0" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#E0E0E0" />
|
||||
</shape>
|
||||
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="12dp"
|
||||
android:background="@drawable/template_item_bg"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- 模板名称 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_template_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:fontFamily="sans-serif-medium" />
|
||||
|
||||
<!-- 模板类型标识 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_template_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@android:color/secondary_text_light"
|
||||
android:background="@drawable/template_type_bg"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="2dp"
|
||||
android:text="@string/template_type_system" />
|
||||
|
||||
<!-- 仅自定义模板显示删除按钮 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_delete"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:src="@android:drawable/ic_menu_delete"
|
||||
android:tint="@android:color/darker_gray"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:background="?android:attr/colorPrimary"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/menu_template"
|
||||
android:textSize="20sp"
|
||||
android:textColor="@android:color/white"
|
||||
android:fontFamily="sans-serif-medium" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@android:string/cancel"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@null" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 模板列表 -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_templates"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:padding="16dp" />
|
||||
|
||||
<!-- 添加自定义模板按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_save_as_template"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/save_as_template"
|
||||
android:background="?android:attr/colorPrimary"
|
||||
android:textColor="@android:color/white"
|
||||
android:padding="12dp"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
Loading…
Reference in new issue