forked from chudongjingling/open_code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAndroid带分页table格式showui测试脚本.lua
239 lines (235 loc) · 5.95 KB
/
Android带分页table格式showui测试脚本.lua
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
local sz = require("sz")
local json = sz.json
w,h = getScreenSize();
if w <= 0 then w,h = 3000,3000 end
MyTable = {
["style"] = "default",
["width"] = w,
["height"] = h,
["config"] = "save_002.dat",
["bg"] = "#cdffff",
["pagetype"] = "multi",
["cancelname"] = "取消",
["okname"] = "开始",
["title"] = "title是这里",
-- ["rettype"] = "array",
pages =
{
{
{
["type"] = "Label",
["text"] = "第一页",
["size"] = 25,
["align"] = "center",
["color"] = "0,0,255"
},
{
["type"] = "Label",
["text"] = "账号 : ",
["align"] = "center",
["size"] = 20,
["color"] = "134,187,21",
["width"] = "200",
["nowrap"] = "1"
},
{
["id"] = "edit_username",
["type"] = "Edit",
["prompt"] = "请输入账户",
["size"] = 20
},
{
["type"] = "Label",
["text"] = "密码 : ",
["align"] = "center",
["size"] = 20,
["color"] = "134,187,21",
["width"] = "200",
["nowrap"] = "1"
},
{
["id"] = "edit_password",
["type"] = "Edit",
["prompt"] = "请输入密码",
["size"] = 20
},
{
["id"] = "生肖1",
["type"] = "ComboBox",
["list"] = "12生肖,12星座",
["select"] = "0",
["data"] = "鼠,牛,虎,兔,龙,蛇,马,羊,猴,鸡,狗,猪#白羊座,金牛座,双子座,巨蟹座,狮子座,处女座,天秤座,天蝎座,射手座,摩羯座,水瓶座,双鱼座",
["width"] = "500",
["source"] = "test",
["nowrap"] = "1"
},
{
["id"] = "生肖2",
["type"] = "ComboBox",
["select"] = "0",
["dataSource"] = "test",
["width"] = "500",
},
{
["type"] = "Label",
["text"] = "生日 : ",
["align"] = "center",
["size"] = 20,
["color"] = "134,187,21",
["width"] = "200",
["nowrap"] = "1"
},
{
["id"] = "年",
["type"] = "Edit",
["prompt"] = "输入年",
["width"] = "300",
["size"] = 20,
["nowrap"] = "1"
},
{
["type"] = "Label",
["text"] = "年",
["size"] = 20,
["color"] = "134,187,21",
["width"] = "60",
["nowrap"] = "1"
},
{
["id"] = "月",
["type"] = "ComboBox",
["list"] = "1,2,3,4,5,6,7,8,9,10,11,12",
["select"] = "0",
["width"] = "200",
["nowrap"] = "1",
["source"] = "test"
},
{
["type"] = "Label",
["text"] = "月",
["size"] = 20,
["color"] = "134,187,21",
["width"] = "60",
["nowrap"] = "1"
},
{
["id"] = "日",
["type"] = "ComboBox",
["list"] = "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",
["select"] = "0",
["width"] = "200",
["nowrap"] = "1",
["source"] = "test"
},
{
["type"] = "Label",
["text"] = "日",
["size"] = 20,
["color"] = "134,187,21",
["width"] = "60",
},
{
["type"] = "Label",
["text"] = "性别 : ",
["size"] = 20,
["align"] = "center",
["color"] = "134,187,21",
["width"] = "200",
["nowrap"] = "1"
},
{
["id"] = "性别",
["type"] = "RadioGroup",
["align"] = "center",
["list"] = "男,女,人妖",
["select"] = "0",
}
},{
{
["type"] = "Label",
["text"] = "第二页",
["size"] = 25,
["align"] = "center",
["color"] = "0,168,233",
},
{
["type"] = "Label",
["text"] = "带图片单选",
["size"] = 22,
["align"] = "center",
["color"] = "134,187,21",
},
{
["id"] = "单选",
["type"] = "RadioGroup",
["align"] = "center",
["list"] = "选项00,选项01,选项02,选项03,选项04,选项05,选项06,选项07,选项08,选项09,选项10,选项11,选项12,选项13,选项14,选项15,选项16,选项17",
["images"] = "a.png,b.png,c.png,d.png,e.png,f.png,g.png,h.png,i.png,j.png,k.png,l.png,m.png,n.png,o.png,p.png,q.png,r.png",
["scale"] = "0.7",
["select"] = "0",
["width"] = "200",
["nowrap"] = "1"
},
{
["id"] = "单选",
["type"] = "RadioGroup",
["align"] = "center",
["list"] = "选项00,选项01,选项02,选项03,选项04,选项05,选项06,选项07,选项08,选项09,选项10,选项11,选项12,选项13,选项14,选项15,选项16,选项17",
["images"] = "a.png,b.png,c.png,d.png,e.png,f.png,g.png,h.png,i.png,j.png,k.png,l.png,m.png,n.png,o.png,p.png,q.png,r.png",
["scale"] = "0.7",
["select"] = "0",
["width"] = "200",
},
{
["type"] = "Label",
["text"] = "带图片多选",
["size"] = 22,
["align"] = "center",
["color"] = "134,187,21",
},
{
["id"] = "多选",
["type"] = "CheckBoxGroup",
["align"] = "center",
["list"] = "选项00,选项01,选项02,选项03,选项04,选项05,选项06,选项07,选项08,选项09,选项10,选项11,选项12,选项13,选项14,选项15,选项16,选项17",
["color"] = "0,0,255",
["images"] = "a.png,b.png,c.png,d.png,e.png,f.png,g.png,h.png,i.png,j.png,k.png,l.png,m.png,n.png,o.png,p.png,q.png,r.png",
["scale"] = "0.75",
["select"] = "3@5",
}
},{
{
["type"] = "Label",
["text"] = "第三页",
["size"] = 25,
["align"] = "center",
["color"] = "0,168,233",
},
{
["type"] = "Image",
["src"] = "http://www.baidu.com/img/bdlogo.png",
["align"] = "left",
["scale"] = "0.5",
},
{
["type"] = "Image",
["src"] = "http://www.baidu.com/img/bdlogo.png",
["align"] = "center",
["scale"] = "1",
},
{
["type"] = "Image",
["src"] = "http://www.baidu.com/img/bdlogo.png",
["align"] = "right",
["scale"] = "1.5",
}
}
}
}
local MyJsonString = json.encode(MyTable);
tblUIParm = {showUI(MyJsonString)};
string = "返回值:"
for i = 1 , #tblUIParm[2] do
string = string.."第"..i.."个返回值 : " .. tblUIParm[2][i].. "\r\n"
end
dialog(string..string..string,0)