-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain34.lua
278 lines (272 loc) · 7.28 KB
/
main34.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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
require "import"
import "android.app.*"
import "android.os.*"
import "android.widget.*"
import "mods.SnackerBar"
import "android.content.Intent"
import "android.net.Uri"
import "java.net.URLDecoder"
import "java.io.File"
import "android.content.Intent"
import "android.content.Intent"
import "android.net.Uri"
import "java.net.URLDecoder"
import "android.content.*"
import "android.view.inputmethod.InputMethodManager"
import "console"
import "android.view.*"
import "android.graphics.Typeface"
import "java.io.File"
import "android.view.animation.*"
import "android.view.animation.Animation"
import "android.graphics.*"
import "mods.andlua"
import "android.graphics.PorterDuffColorFilter"
import "android.graphics.PorterDuff"
import "android.text.SpannableString"
import "android.text.style.ForegroundColorSpan"
import "android.text.Spannable"
import "android.graphics.drawable.ColorDrawable"
import "android.graphics.Color"
import "android.support.v4.widget.*"
require "permission"
import "autotheme"
import "android.graphics.PorterDuffColorFilter"
import "android.graphics.PorterDuff"
import "android.graphics.drawable.ColorDrawable"
import "android.text.SpannableString"
import "android.text.style.ForegroundColorSpan"
import "android.text.Spannable"
import "mods.andlua"
import "mods.SnackerBar"
ztt()
main10 = {
LinearLayout,
layout_height = "fill",
layout_width = "fill",
orientation = "vertical",
background = "#ffffff",
{
RelativeLayout,
layout_height = "-1",
layout_width = "-1",
layout_marginTop = "10dp",
layout_marginBottom = "10dp",
{
SwipeRefreshLayout,
id = "sxlist1",
{
GridView,
numColumns = 3,
verticalSpacing = "15dp",
layout_height = "fill",
gravity = "center",
id = "grid",
horizontalSpacing = "0dp",
layout_width = "fill",
},
},
},
};
activity.setContentView(loadlayout(main10))
ztl()
id = ...
btl = {
LinearLayout,
layout_width = "fill",
elevation = "1dp",
layout_height = "55dp",
orientation = "horizontal",
{
LinearLayout,
layout_width = "55dp",
gravity = "center",
id = "Sideslip",
layout_height = "55dp",
layout_marginLeft = "-15dp",
{
ImageView,
layout_height = "25dp",
colorFilter = tonumber(bjzt()),
layout_width = "28dp",
src = "res/off.png",
},
},
{
LinearLayout,
layout_height = "fill",
layout_weight = "1",
orientation = "horizontal",
{
TextView,
layout_gravity = "center",
textSize = "18sp",
text = getLS("L_Tool_list"),
textColor = tonumber(bjzt()),
id = "bt",
singleLine = true,
},
},
{
LinearLayout,
layout_width = "55dp",
gravity = "center",
id = "menu11",
layout_height = "55dp",
layout_marginRight = "-15dp",
{
ImageView,
layout_height = "25dp",
colorFilter = tonumber(bjzt()),
layout_width = "28dp",
src = "res/ic_dots_vertical.png",
},
},
};
activity.ActionBar.setDisplayShowCustomEnabled(true)
activity.ActionBar.setCustomView(loadlayout(btl))
activity.ActionBar.setBackgroundDrawable(ColorDrawable(AndLuaB1))
activity.ActionBar.setElevation(6)
bw(Sideslip, 0x5FFFFFFF)
Sideslip.onClick = function()
activity.finish()
end
bw(menu11, 0x5FFFFFFF)
menu11.onClick = function()
pop = PopupMenu(activity, menu11)
menu = pop.Menu
menu.add("后台设置").onMenuItemClick = function(a)
activity.newActivity("main36", { id })
end
menu.add("复制KEY").onMenuItemClick = function(a)
import "android.content.Context"
dialog5 = ProgressDialog(this)
dialog5.setProgressStyle(ProgressDialog.STYLE_SPINNER)
dialog5.setCancelable(true)
dialog5.setCanceledOnTouchOutside(false)
dialog5.show()
uguid()
Http.post("https://ly250.cn/api/ugkey.php", "uid1=" ..
uid1 .. "&uid2=" .. uid2 .. "&uid3=" .. uid3 .. "&id=" .. id .. "&sid=" .. sid(), function(a1, b, c, d)
sid1 = b:match('%["ret"] = "(.-)%";')
if sid1 == "ok" then
kky = b:match('%["key"] = "(.-)%";')
activity.getSystemService(Context.CLIPBOARD_SERVICE).setText(kky)
SnackerBar.build()
:msg("key已复制,不能给别人看哟!")
:actionText(getLS("L_OK"))
:action(function()
end)
:show()
elseif sid1 == "1" then
SnackerBar.build()
:msg("获取失败")
:actionText(getLS("L_OK"))
:action(function()
end)
:show()
elseif sid1 == nil then
SnackerBar.build()
:msg("获取失败")
:actionText(getLS("L_OK"))
:action(function()
end)
:show()
elseif sid1 == "2" then
SnackerBar.build()
:msg(getLS("L_Identity_expired"))
:actionText(getLS("L_OK"))
:action(function()
end)
:show()
elseif sid1 == "no" then
SnackerBar.build()
:msg("该后台已被封禁")
:actionText(getLS("L_OK"))
:action(function()
end)
:show()
elseif sid1 == "3" then
SnackerBar.build()
:msg("服务器维护中")
:actionText(getLS("L_OK"))
:action(function()
end)
:show()
else
end
dialog5.hide()
end)
end
menu.add("删除后台").onMenuItemClick = function(a)
SnackerBar.build()
:msg("暂不支持删除")
:actionText(getLS("L_OK"))
:action(function()
end)
:show()
end
pop.show()
end
item = {
LinearLayout,
gravity = "center",
background = "#ffffff",
layout_width = "102dp",
layout_height = "102dp",
{
CardView,
radius = "5dp",
CardElevation = "2dp",
layout_width = "100dp",
background = "#ffffff",
layout_height = "100dp",
{
LinearLayout,
gravity = "center",
orientation = "vertical",
layout_width = "fill",
layout_height = "fill",
{
ImageView,
id = "img",
layout_width = "30dp",
layout_height = "30dp",
layout_marginBottom = "5dp",
colorFilter = "#757575",
},
{
TextView,
id = "bt",
},
},
},
};
data = {}
adp = LuaAdapter(activity, data, item)
adp.add { img = "res/Metrial842.png", bt = "远程公告" }
adp.add { img = "res/Metrial248.png", bt = "远程文档" }
adp.add { img = "res/Metrial485.png", bt = "远程更新" }
adp.add { img = "res/Metrial320.png", bt = "发件系统" }
--[[
adp.add{img="res/Metrial100.png",bt="用户权限"}
adp.add{img="res/Metrial19.png",bt="用户管理"}
adp.add{img="res/Metrial491.png",bt="启动图"}
adp.add{img="res/Metrial525.png",bt="IMEI管理"}
]]
grid.Adapter = adp
grid.onItemClick = function(l, v, p, i)
if v.Tag.bt.Text == "远程公告" then
activity.newActivity("main35", { id })
elseif v.Tag.bt.Text == "发件系统" then
activity.newActivity("main40", { id })
elseif v.Tag.bt.Text == "远程更新" then
activity.newActivity("main41", { id })
elseif v.Tag.bt.Text == "远程文档" then
activity.newActivity("main42", { id })
end
end
sxlist1.setColorSchemeColors({ tonumber(bjzt()) });
sxlist1.setOnRefreshListener(SwipeRefreshLayout.OnRefreshListener { onRefresh = function()
sxlist1.setRefreshing(false);
end })