9 changed files with 659 additions and 190 deletions
-
279app/src/main/java/com/ouxuan/oxface/orderOX/adapter/OrderSelectionAdapter.java
-
56app/src/main/java/com/ouxuan/oxface/orderOX/model/OrderVerificationData.java
-
32app/src/main/res/drawable/coupon_background.xml
-
9app/src/main/res/drawable/dashed_line.xml
-
6app/src/main/res/drawable/many_enter_tag_background.xml
-
9app/src/main/res/drawable/order_type_background.xml
-
10app/src/main/res/drawable/verify_button_background.xml
-
97app/src/main/res/layout/activity_order_selection.xml
-
209app/src/main/res/layout/item_order_selection.xml
@ -0,0 +1,32 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
|
<!-- 主背景 --> |
||||
|
<item> |
||||
|
<shape android:shape="rectangle"> |
||||
|
<solid android:color="#FFFFFF" /> |
||||
|
<corners android:radius="8dp" /> |
||||
|
</shape> |
||||
|
</item> |
||||
|
|
||||
|
<!-- 模拟左侧半圆形切口效果 --> |
||||
|
<item |
||||
|
android:left="118dp" |
||||
|
android:top="-5dp" |
||||
|
android:bottom="-5dp"> |
||||
|
<shape android:shape="oval"> |
||||
|
<solid android:color="#00000000" /> <!-- 透明 --> |
||||
|
<size android:width="10dp" android:height="10dp" /> |
||||
|
</shape> |
||||
|
</item> |
||||
|
|
||||
|
<!-- 模拟右侧半圆形切口效果 --> |
||||
|
<item |
||||
|
android:right="-5dp" |
||||
|
android:top="-5dp" |
||||
|
android:bottom="-5dp"> |
||||
|
<shape android:shape="oval"> |
||||
|
<solid android:color="#00000000" /> <!-- 透明 --> |
||||
|
<size android:width="10dp" android:height="10dp" /> |
||||
|
</shape> |
||||
|
</item> |
||||
|
</layer-list> |
@ -0,0 +1,9 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" |
||||
|
android:shape="rectangle"> |
||||
|
<stroke |
||||
|
android:width="1dp" |
||||
|
android:color="#9A9A9D" |
||||
|
android:dashWidth="8dp" |
||||
|
android:dashGap="4dp" /> |
||||
|
</shape> |
@ -0,0 +1,6 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" |
||||
|
android:shape="rectangle"> |
||||
|
<solid android:color="#e600121a" /> |
||||
|
<corners android:radius="3dp" /> |
||||
|
</shape> |
@ -0,0 +1,9 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" |
||||
|
android:shape="rectangle"> |
||||
|
<gradient |
||||
|
android:angle="180" |
||||
|
android:startColor="#FCD68C" |
||||
|
android:endColor="#F6B44A" /> |
||||
|
<corners android:radius="6dp" /> |
||||
|
</shape> |
@ -0,0 +1,10 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" |
||||
|
android:shape="rectangle"> |
||||
|
<solid android:color="#009874" /> |
||||
|
<corners |
||||
|
android:topLeftRadius="0dp" |
||||
|
android:topRightRadius="0dp" |
||||
|
android:bottomLeftRadius="38dp" |
||||
|
android:bottomRightRadius="0dp" /> |
||||
|
</shape> |
@ -1,127 +1,216 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:layout_width="match_parent" |
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
android:layout_height="wrap_content" |
||||
android:layout_marginBottom="15dp" |
|
||||
android:background="@drawable/gate_radius_compare" |
|
||||
|
android:layout_marginBottom="10dp" |
||||
|
android:background="@drawable/coupon_background" |
||||
android:clickable="true" |
android:clickable="true" |
||||
android:focusable="true" |
android:focusable="true" |
||||
android:orientation="horizontal" |
|
||||
android:padding="0dp"> |
|
||||
|
android:minHeight="150dp"> |
||||
|
|
||||
<!-- 左侧场次标识 --> |
|
||||
|
<!-- 左侧订单类型标识 --> |
||||
<RelativeLayout |
<RelativeLayout |
||||
android:layout_width="100dp" |
|
||||
|
android:id="@+id/layout_order_type" |
||||
|
android:layout_width="120dp" |
||||
android:layout_height="match_parent" |
android:layout_height="match_parent" |
||||
android:background="@drawable/gradient_button" |
|
||||
|
android:layout_alignParentLeft="true" |
||||
|
android:layout_centerVertical="true" |
||||
android:gravity="center" |
android:gravity="center" |
||||
android:minHeight="140dp"> |
|
||||
|
android:paddingTop="20dp" |
||||
|
android:paddingBottom="20dp"> |
||||
|
|
||||
<TextView |
<TextView |
||||
android:id="@+id/tv_session_label" |
|
||||
|
android:id="@+id/tv_order_type_label" |
||||
android:layout_width="wrap_content" |
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
android:layout_height="wrap_content" |
||||
android:layout_centerInParent="true" |
android:layout_centerInParent="true" |
||||
|
android:background="@drawable/order_type_background" |
||||
android:gravity="center" |
android:gravity="center" |
||||
|
android:paddingLeft="24dp" |
||||
|
android:paddingTop="24dp" |
||||
|
android:paddingRight="24dp" |
||||
|
android:paddingBottom="24dp" |
||||
android:text="场\n次" |
android:text="场\n次" |
||||
android:textColor="@android:color/white" |
android:textColor="@android:color/white" |
||||
android:textSize="20sp" |
|
||||
|
android:textSize="18sp" |
||||
android:textStyle="bold" /> |
android:textStyle="bold" /> |
||||
|
|
||||
</RelativeLayout> |
</RelativeLayout> |
||||
|
|
||||
<!-- 虚线分隔 --> |
<!-- 虚线分隔 --> |
||||
<View |
<View |
||||
android:layout_width="2dp" |
|
||||
|
android:id="@+id/divider_line" |
||||
|
android:layout_width="1dp" |
||||
android:layout_height="match_parent" |
android:layout_height="match_parent" |
||||
android:layout_marginTop="10dp" |
|
||||
android:layout_marginBottom="10dp" |
|
||||
android:background="#E0E0E0" /> |
|
||||
|
android:layout_marginTop="12dp" |
||||
|
android:layout_marginBottom="12dp" |
||||
|
android:layout_toRightOf="@id/layout_order_type" |
||||
|
android:background="@drawable/dashed_line" /> |
||||
|
|
||||
<!-- 右侧订单信息 --> |
<!-- 右侧订单信息 --> |
||||
<LinearLayout |
<LinearLayout |
||||
android:layout_width="0dp" |
|
||||
|
android:id="@+id/layout_order_info" |
||||
|
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
android:layout_height="wrap_content" |
||||
android:layout_weight="1" |
|
||||
android:orientation="vertical" |
|
||||
android:padding="20dp" |
|
||||
android:minHeight="140dp"> |
|
||||
|
android:layout_toRightOf="@id/divider_line" |
||||
|
android:layout_marginLeft="18dp" |
||||
|
android:layout_marginTop="20dp" |
||||
|
android:layout_marginRight="140dp" |
||||
|
android:layout_marginBottom="20dp" |
||||
|
android:orientation="vertical"> |
||||
|
|
||||
<!-- 订单信息标题 --> |
<!-- 订单信息标题 --> |
||||
|
<TextView |
||||
|
android:id="@+id/tv_order_title" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginBottom="6dp" |
||||
|
android:text="订单信息(共4场次)" |
||||
|
android:textColor="#1B1B1B" |
||||
|
android:textSize="12sp" |
||||
|
android:textStyle="bold" /> |
||||
|
|
||||
|
<!-- 订单信息列表 --> |
||||
<LinearLayout |
<LinearLayout |
||||
|
android:id="@+id/layout_order_details" |
||||
android:layout_width="match_parent" |
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
android:layout_height="wrap_content" |
||||
android:gravity="center_vertical" |
|
||||
|
android:orientation="vertical"> |
||||
|
|
||||
|
<!-- 订单编号 --> |
||||
|
<LinearLayout |
||||
|
android:id="@+id/layout_order_number" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginTop="8dp" |
||||
android:orientation="horizontal"> |
android:orientation="horizontal"> |
||||
|
|
||||
<TextView |
<TextView |
||||
android:id="@+id/tv_order_title" |
|
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:text="订单编号:" |
||||
|
android:textColor="#9A9A9D" |
||||
|
android:textSize="12sp" /> |
||||
|
|
||||
|
<TextView |
||||
|
android:id="@+id/tv_order_number" |
||||
android:layout_width="0dp" |
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
android:layout_height="wrap_content" |
||||
android:layout_weight="1" |
android:layout_weight="1" |
||||
android:text="订单信息 (共4场次)" |
|
||||
android:textColor="@android:color/black" |
|
||||
android:textSize="16sp" |
|
||||
android:textStyle="bold" /> |
|
||||
|
android:text="CC20250904093324823098" |
||||
|
android:textColor="#1B1B1B" |
||||
|
android:textSize="12sp" /> |
||||
|
|
||||
<!-- 去核销按钮 --> |
|
||||
<TextView |
<TextView |
||||
android:id="@+id/tv_verify_button" |
|
||||
|
android:id="@+id/tv_many_enter_tag" |
||||
android:layout_width="wrap_content" |
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
android:layout_height="wrap_content" |
||||
android:background="@drawable/primary_color_rounded_background" |
|
||||
android:clickable="true" |
|
||||
android:focusable="true" |
|
||||
android:paddingLeft="20dp" |
|
||||
android:paddingTop="8dp" |
|
||||
android:paddingRight="20dp" |
|
||||
android:paddingBottom="8dp" |
|
||||
android:text="去核销" |
|
||||
android:textColor="@android:color/white" |
|
||||
android:textSize="14sp" /> |
|
||||
|
android:layout_marginLeft="12dp" |
||||
|
android:background="@drawable/many_enter_tag_background" |
||||
|
android:paddingLeft="6dp" |
||||
|
android:paddingTop="2dp" |
||||
|
android:paddingRight="6dp" |
||||
|
android:paddingBottom="2dp" |
||||
|
android:text="可多次进出" |
||||
|
android:textColor="#E60012" |
||||
|
android:textSize="10sp" |
||||
|
android:textStyle="bold" |
||||
|
android:visibility="gone" /> |
||||
|
|
||||
</LinearLayout> |
</LinearLayout> |
||||
|
|
||||
<!-- 订单编号 --> |
|
||||
<TextView |
|
||||
android:id="@+id/tv_order_number" |
|
||||
|
<!-- 预订信息 --> |
||||
|
<LinearLayout |
||||
android:layout_width="match_parent" |
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
android:layout_height="wrap_content" |
||||
android:layout_marginTop="8dp" |
android:layout_marginTop="8dp" |
||||
android:text="订单编号:CC20250904093324823098" |
|
||||
android:textColor="#666666" |
|
||||
android:textSize="14sp" /> |
|
||||
|
android:orientation="horizontal"> |
||||
|
|
||||
|
<TextView |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:text="预订信息:" |
||||
|
android:textColor="#9A9A9D" |
||||
|
android:textSize="12sp" /> |
||||
|
|
||||
<!-- 预订信息 --> |
|
||||
<TextView |
<TextView |
||||
android:id="@+id/tv_booking_info" |
android:id="@+id/tv_booking_info" |
||||
android:layout_width="match_parent" |
|
||||
|
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
android:layout_height="wrap_content" |
||||
android:layout_marginTop="4dp" |
|
||||
android:text="预订信息:篮球2号馆 16:30-17:00;" |
|
||||
android:textColor="#666666" |
|
||||
android:textSize="14sp" /> |
|
||||
|
android:layout_weight="1" |
||||
|
android:text="篮球2号馆 16:30-17:00" |
||||
|
android:textColor="#1B1B1B" |
||||
|
android:textSize="12sp" /> |
||||
|
|
||||
|
</LinearLayout> |
||||
|
|
||||
<!-- 预订项目 --> |
<!-- 预订项目 --> |
||||
|
<LinearLayout |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginTop="8dp" |
||||
|
android:orientation="horizontal"> |
||||
|
|
||||
|
<TextView |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:text="预订项目:" |
||||
|
android:textColor="#9A9A9D" |
||||
|
android:textSize="12sp" /> |
||||
|
|
||||
<TextView |
<TextView |
||||
android:id="@+id/tv_project_name" |
android:id="@+id/tv_project_name" |
||||
android:layout_width="match_parent" |
|
||||
|
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
android:layout_height="wrap_content" |
||||
android:layout_marginTop="4dp" |
|
||||
android:text="预订项目:篮球" |
|
||||
android:textColor="#666666" |
|
||||
android:textSize="14sp" /> |
|
||||
|
android:layout_weight="1" |
||||
|
android:text="篮球" |
||||
|
android:textColor="#1B1B1B" |
||||
|
android:textSize="12sp" /> |
||||
|
|
||||
|
</LinearLayout> |
||||
|
|
||||
<!-- 使用日期 --> |
<!-- 使用日期 --> |
||||
|
<LinearLayout |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginTop="8dp" |
||||
|
android:orientation="horizontal"> |
||||
|
|
||||
|
<TextView |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:text="使用日期:" |
||||
|
android:textColor="#9A9A9D" |
||||
|
android:textSize="12sp" /> |
||||
|
|
||||
<TextView |
<TextView |
||||
android:id="@+id/tv_usage_date" |
android:id="@+id/tv_usage_date" |
||||
android:layout_width="match_parent" |
|
||||
|
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
android:layout_height="wrap_content" |
||||
android:layout_marginTop="4dp" |
|
||||
android:text="使用日期:2025-09-04 (今天)" |
|
||||
android:textColor="#666666" |
|
||||
android:textSize="14sp" /> |
|
||||
|
android:layout_weight="1" |
||||
|
android:text="2025-09-04(今天)" |
||||
|
android:textColor="#1B1B1B" |
||||
|
android:textSize="12sp" /> |
||||
|
|
||||
|
</LinearLayout> |
||||
|
|
||||
</LinearLayout> |
</LinearLayout> |
||||
|
|
||||
</LinearLayout> |
</LinearLayout> |
||||
|
|
||||
|
<!-- 右上角核销按钮 --> |
||||
|
<TextView |
||||
|
android:id="@+id/tv_verify_button" |
||||
|
android:layout_width="90dp" |
||||
|
android:layout_height="40dp" |
||||
|
android:layout_alignParentTop="true" |
||||
|
android:layout_alignParentRight="true" |
||||
|
android:background="@drawable/verify_button_background" |
||||
|
android:clickable="true" |
||||
|
android:focusable="true" |
||||
|
android:gravity="center" |
||||
|
android:text="去核销" |
||||
|
android:textColor="@android:color/white" |
||||
|
android:textSize="14sp" /> |
||||
|
|
||||
|
</RelativeLayout> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue