forked from APIJSON/APIJSON-Demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscan_activity.xml
More file actions
119 lines (99 loc) · 4.14 KB
/
scan_activity.xml
File metadata and controls
119 lines (99 loc) · 4.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/activity_page" >
<SurfaceView
android:id="@+id/svCameraScan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
<!-- 必须在最底层,且不能指定宽高,否则扫描读取很难实现 -->
<com.zxing.view.ViewfinderView
android:id="@+id/vfvCameraScan"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<LinearLayout
style="@style/ll_vertical_match_match"
android:baselineAligned="false" >
<RelativeLayout
style="@style/topbar_bg"
android:background="@color/white_alpha" >
<TextView
style="@style/topbar_left_btn"
android:text=" " />
<TextView
style="@style/topbar_title"
android:layout_centerHorizontal="true"
android:text="扫一扫"
android:textColor="@color/black" />
</RelativeLayout>
<LinearLayout
style="@style/ll_vertical_match_match"
android:layout_gravity="center_horizontal"
android:layout_weight="1" >
<TextView
style="@style/text_middle_white"
android:layout_margin="30dp"
android:text="将取景框对准二维码\n即可自动扫描" />
</LinearLayout>
<LinearLayout
style="@style/ll_horizontal_match_wrap"
android:layout_gravity="bottom"
android:background="@color/white_alpha"
android:gravity="center" >
<LinearLayout
style="@style/ll_vertical_wrap_wrap"
android:layout_margin="12dp"
android:paddingBottom="4dp"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:paddingTop="4dp" >
<ImageView
android:onClick="onReturnClick"
style="@style/wrap_wrap"
android:background="@drawable/cilcle_gray_to_white"
android:padding="12dp"
android:src="@drawable/back_black_light" />
<TextView
style="@style/text_small"
android:layout_marginTop="4dp"
android:text="返回" />
</LinearLayout>
<LinearLayout
style="@style/ll_vertical_wrap_wrap"
android:layout_margin="12dp"
android:paddingBottom="4dp"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:paddingTop="4dp" >
<ImageView
android:id="@+id/ivCameraScanLight"
style="@style/wrap_wrap"
android:background="@drawable/cilcle_gray_to_white"
android:padding="12dp"
android:src="@drawable/flash_light" />
<TextView
style="@style/text_small"
android:layout_marginTop="4dp"
android:text="开灯/关灯" />
</LinearLayout>
<LinearLayout
style="@style/ll_vertical_wrap_wrap"
android:layout_margin="12dp"
android:paddingBottom="4dp"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:paddingTop="4dp" >
<ImageView
android:onClick="onForwardClick"
style="@style/wrap_wrap"
android:background="@drawable/cilcle_gray_to_white"
android:padding="12dp"
android:src="@drawable/qrcode" />
<TextView
style="@style/text_small"
android:layout_marginTop="4dp"
android:text="我的名片" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</FrameLayout>