Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
machine
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hooloo
android
machine
Commits
d1e3b347
Commit
d1e3b347
authored
Jun 20, 2022
by
wjg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重做menu UI
parent
08dd6726
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
27 deletions
+60
-27
app/src/main/res/layout/activity_menu.xml
+38
-21
app/src/main/res/values-w1080dp/dimens.xml
+13
-5
app/src/main/res/values/dimens.xml
+9
-1
No files found.
app/src/main/res/layout/activity_menu.xml
View file @
d1e3b347
...
@@ -8,26 +8,27 @@
...
@@ -8,26 +8,27 @@
android:id=
"@+id/img_left"
android:id=
"@+id/img_left"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"
1.3
"
android:layout_weight=
"
0.5625
"
android:adjustViewBounds=
"true"
android:adjustViewBounds=
"true"
android:scaleType=
"centerCrop"
/>
android:scaleType=
"centerCrop"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"
1
"
android:layout_weight=
"
0.4375
"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<RelativeLayout
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_height=
"0dp"
android:layout_weight=
"
1
"
android:layout_weight=
"
0.5
"
android:background=
"@color/colorPrimary"
android:background=
"@color/colorPrimary"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:padding=
"@dimen/padding20"
>
android:paddingHorizontal=
"@dimen/menu_content_padding_hor"
android:paddingTop=
"@dimen/menu_content_padding_top"
android:paddingBottom=
"@dimen/menu_content_padding_bottom"
>
<TextView
<TextView
android:id=
"@+id/txt_title"
android:id=
"@+id/txt_title"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"@dimen/padding10"
android:text=
"自主取餐"
android:text=
"自主取餐"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"@dimen/ts_menu_title"
/>
android:textSize=
"@dimen/ts_menu_title"
/>
...
@@ -35,7 +36,7 @@
...
@@ -35,7 +36,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@+id/txt_title"
android:layout_below=
"@+id/txt_title"
android:layout_margin
=
"@dimen/padding10
"
android:layout_margin
Top=
"@dimen/menu_order_margin_top
"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<RelativeLayout
<RelativeLayout
android:layout_width=
"0dp"
android:layout_width=
"0dp"
...
@@ -53,15 +54,17 @@
...
@@ -53,15 +54,17 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@+id/txt_cooking"
android:layout_below=
"@+id/txt_cooking"
android:numColumns=
"2"
/>
android:horizontalSpacing=
"@dimen/menu_spacing_hor"
android:numColumns=
"2"
android:scrollbars=
"none"
android:verticalSpacing=
"@dimen/menu_spacing_ver"
/>
</RelativeLayout>
</RelativeLayout>
<ImageView
<ImageView
android:layout_width=
"
0.5dp
"
android:layout_width=
"
1px
"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginStart=
"@dimen/menu_divider_padding_hor"
android:layout_marginHorizontal=
"@dimen/menu_divider_padding_hor"
android:layout_marginTop=
"@dimen/menu_divider_padding_ver"
android:layout_marginTop=
"@dimen/menu_divider_padding_top"
android:layout_marginEnd=
"@dimen/menu_divider_padding_hor"
android:layout_marginBottom=
"@dimen/menu_divider_padding_bottom"
android:layout_marginBottom=
"@dimen/menu_divider_padding_ver"
android:background=
"@color/white"
android:background=
"@color/white"
tools:ignore=
"Suspicious0dp"
/>
tools:ignore=
"Suspicious0dp"
/>
<RelativeLayout
<RelativeLayout
...
@@ -80,15 +83,17 @@
...
@@ -80,15 +83,17 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@+id/txt_waiting"
android:layout_below=
"@+id/txt_waiting"
android:numColumns=
"2"
/>
android:horizontalSpacing=
"@dimen/menu_spacing_hor"
android:numColumns=
"2"
android:scrollbars=
"none"
android:verticalSpacing=
"@dimen/menu_spacing_ver"
/>
</RelativeLayout>
</RelativeLayout>
<ImageView
<ImageView
android:layout_width=
"
0.5dp
"
android:layout_width=
"
1px
"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginStart=
"@dimen/menu_divider_padding_hor"
android:layout_marginHorizontal=
"@dimen/menu_divider_padding_hor"
android:layout_marginTop=
"@dimen/menu_divider_padding_ver"
android:layout_marginTop=
"@dimen/menu_divider_padding_top"
android:layout_marginEnd=
"@dimen/menu_divider_padding_hor"
android:layout_marginBottom=
"@dimen/menu_divider_padding_bottom"
android:layout_marginBottom=
"@dimen/menu_divider_padding_ver"
android:background=
"@color/white"
android:background=
"@color/white"
tools:ignore=
"Suspicious0dp"
/>
tools:ignore=
"Suspicious0dp"
/>
<RelativeLayout
<RelativeLayout
...
@@ -99,15 +104,27 @@
...
@@ -99,15 +104,27 @@
android:id=
"@+id/txt_competed"
android:id=
"@+id/txt_competed"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"可取餐
(扫码取餐)
"
android:text=
"可取餐"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"@dimen/ts_menu_subtitle"
/>
android:textSize=
"@dimen/ts_menu_subtitle"
/>
<TextView
android:id=
"@+id/txt_competed1"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignBottom=
"@id/txt_competed"
android:layout_toRightOf=
"@id/txt_competed"
android:text=
"(扫码取餐)"
android:textColor=
"@color/white"
android:textSize=
"@dimen/ts_menu_subtitle1"
/>
<GridView
<GridView
android:id=
"@+id/grid_completed"
android:id=
"@+id/grid_completed"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@+id/txt_competed"
android:layout_below=
"@+id/txt_competed"
android:numColumns=
"2"
/>
android:horizontalSpacing=
"@dimen/menu_spacing_hor"
android:numColumns=
"2"
android:scrollbars=
"none"
android:verticalSpacing=
"@dimen/menu_spacing_ver"
/>
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
...
@@ -115,7 +132,7 @@
...
@@ -115,7 +132,7 @@
android:id=
"@+id/img_right"
android:id=
"@+id/img_right"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_height=
"0dp"
android:layout_weight=
"
1.3
"
android:layout_weight=
"
0.5
"
android:adjustViewBounds=
"true"
android:adjustViewBounds=
"true"
android:scaleType=
"centerCrop"
/>
android:scaleType=
"centerCrop"
/>
</LinearLayout>
</LinearLayout>
...
...
app/src/main/res/values-w1080dp/dimens.xml
View file @
d1e3b347
...
@@ -34,8 +34,15 @@
...
@@ -34,8 +34,15 @@
<dimen
name=
"tip_margin_top"
>
40px
</dimen>
<dimen
name=
"tip_margin_top"
>
40px
</dimen>
<dimen
name=
"tip_padding_top"
>
33px
</dimen>
<dimen
name=
"tip_padding_top"
>
33px
</dimen>
<dimen
name=
"tip_padding_bottom"
>
33px
</dimen>
<dimen
name=
"tip_padding_bottom"
>
33px
</dimen>
<dimen
name=
"menu_divider_padding_hor"
>
20dp
</dimen>
<dimen
name=
"menu_divider_padding_hor"
>
33px
</dimen>
<dimen
name=
"menu_divider_padding_ver"
>
80dp
</dimen>
<dimen
name=
"menu_divider_padding_top"
>
60px
</dimen>
<dimen
name=
"menu_divider_padding_bottom"
>
50px
</dimen>
<dimen
name=
"menu_content_padding_hor"
>
55px
</dimen>
<dimen
name=
"menu_content_padding_top"
>
38px
</dimen>
<dimen
name=
"menu_content_padding_bottom"
>
38px
</dimen>
<dimen
name=
"menu_order_margin_top"
>
43px
</dimen>
<dimen
name=
"menu_spacing_hor"
>
37px
</dimen>
<dimen
name=
"menu_spacing_ver"
>
20px
</dimen>
<dimen
name=
"goods_detail_padding_ver"
>
55px
</dimen>
<dimen
name=
"goods_detail_padding_ver"
>
55px
</dimen>
<dimen
name=
"goods_detail_padding_hor"
>
40px
</dimen>
<dimen
name=
"goods_detail_padding_hor"
>
40px
</dimen>
...
@@ -142,9 +149,10 @@
...
@@ -142,9 +149,10 @@
<dimen
name=
"ts_dialog_title"
>
40px
</dimen>
<dimen
name=
"ts_dialog_title"
>
40px
</dimen>
<dimen
name=
"ts_scan"
>
36px
</dimen>
<dimen
name=
"ts_scan"
>
36px
</dimen>
<dimen
name=
"ts_expire"
>
36px
</dimen>
<dimen
name=
"ts_expire"
>
36px
</dimen>
<dimen
name=
"ts_order_number"
>
22sp
</dimen>
<dimen
name=
"ts_menu_title"
>
40px
</dimen>
<dimen
name=
"ts_menu_title"
>
22sp
</dimen>
<dimen
name=
"ts_menu_subtitle"
>
32px
</dimen>
<dimen
name=
"ts_menu_subtitle"
>
18sp
</dimen>
<dimen
name=
"ts_menu_subtitle1"
>
28px
</dimen>
<dimen
name=
"ts_order_number"
>
36px
</dimen>
<dimen
name=
"ts_setting_name"
>
18sp
</dimen>
<dimen
name=
"ts_setting_name"
>
18sp
</dimen>
<dimen
name=
"ts_setting_desc"
>
16sp
</dimen>
<dimen
name=
"ts_setting_desc"
>
16sp
</dimen>
</resources>
</resources>
app/src/main/res/values/dimens.xml
View file @
d1e3b347
...
@@ -35,7 +35,14 @@
...
@@ -35,7 +35,14 @@
<dimen
name=
"tip_padding_top"
>
33px
</dimen>
<dimen
name=
"tip_padding_top"
>
33px
</dimen>
<dimen
name=
"tip_padding_bottom"
>
33px
</dimen>
<dimen
name=
"tip_padding_bottom"
>
33px
</dimen>
<dimen
name=
"menu_divider_padding_hor"
>
10dp
</dimen>
<dimen
name=
"menu_divider_padding_hor"
>
10dp
</dimen>
<dimen
name=
"menu_divider_padding_ver"
>
40dp
</dimen>
<dimen
name=
"menu_divider_padding_top"
>
60px
</dimen>
<dimen
name=
"menu_divider_padding_bottom"
>
50px
</dimen>
<dimen
name=
"menu_content_padding_hor"
>
55px
</dimen>
<dimen
name=
"menu_content_padding_top"
>
38px
</dimen>
<dimen
name=
"menu_content_padding_bottom"
>
38px
</dimen>
<dimen
name=
"menu_order_margin_top"
>
43px
</dimen>
<dimen
name=
"menu_spacing_hor"
>
37px
</dimen>
<dimen
name=
"menu_spacing_ver"
>
20px
</dimen>
<dimen
name=
"goods_detail_padding_ver"
>
55px
</dimen>
<dimen
name=
"goods_detail_padding_ver"
>
55px
</dimen>
<dimen
name=
"goods_detail_padding_hor"
>
40px
</dimen>
<dimen
name=
"goods_detail_padding_hor"
>
40px
</dimen>
...
@@ -145,6 +152,7 @@
...
@@ -145,6 +152,7 @@
<dimen
name=
"ts_order_number"
>
12sp
</dimen>
<dimen
name=
"ts_order_number"
>
12sp
</dimen>
<dimen
name=
"ts_menu_title"
>
22sp
</dimen>
<dimen
name=
"ts_menu_title"
>
22sp
</dimen>
<dimen
name=
"ts_menu_subtitle"
>
18sp
</dimen>
<dimen
name=
"ts_menu_subtitle"
>
18sp
</dimen>
<dimen
name=
"ts_menu_subtitle1"
>
14sp
</dimen>
<dimen
name=
"ts_setting_name"
>
16sp
</dimen>
<dimen
name=
"ts_setting_name"
>
16sp
</dimen>
<dimen
name=
"ts_setting_desc"
>
14sp
</dimen>
<dimen
name=
"ts_setting_desc"
>
14sp
</dimen>
</resources>
</resources>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment