-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimport.lua
1804 lines (1611 loc) · 42.3 KB
/
import.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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
local require = require
local luajava = luajava
local type=type
local table = require "table"
local loaded = {}
local imported = {}
luajava.loaded = loaded
luajava.imported = imported
local _G = _G
local insert = table.insert
local new = luajava.new
local bindClass = luajava.bindClass
local dexes = {}
local _M = {}
local luacontext = activity or service
dexes = luajava.astable(luacontext.getClassLoaders())
local libs = luacontext.getLibrarys()
--添加新路径
local newPath = ";/" .. activity.getLuaDir() .."lua/?.lua;" .. activity.getLuaDir() .. "/lua/?/init.lua"
package.path = package.path .. newPath
local function libsloader(path)
local p = libs[path:match("^%a+")]
if p then
return assert(package.loadlib(p, "luaopen_" .. (path:gsub("%.", "_")))), p
else
return "\n\tno file ./libs/lib" .. path .. ".so"
end
end
table.insert(package.searchers, libsloader)
local function massage_classname(classname)
if classname:find('_') then
classname = classname:gsub('_', '$')
end
return classname
end
local function bind_class(packagename)
local res, class = pcall(bindClass, packagename)
if res then
loaded[packagename] = class
return class
end
end
local function import_class(packagename)
packagename = massage_classname(packagename)
local class = loaded[packagename] or bind_class(packagename)
return class
end
local function bind_dex_class(packagename)
packagename = massage_classname(packagename)
for _, dex in ipairs(dexes) do
local res, class = pcall(dex.loadClass, packagename)
if res then
loaded[packagename] = class
return class
end
end
end
local function import_dex_class(packagename)
packagename = massage_classname(packagename)
local class = loaded[packagename] or bind_dex_class(packagename)
return class
end
local pkgMT = {
__index = function(T, classname)
local ret, class = pcall(luajava.bindClass, rawget(T, "__name") .. classname)
if ret then
rawset(T, classname, class)
return class
else
error(classname .. " is not in " .. rawget(T, "__name"), 2)
end
end
}
local function import_pacckage(packagename)
local pkg = { __name = packagename }
setmetatable(pkg, pkgMT)
return pkg
end
--setmetatable(_G, globalMT)
local function import_require(name)
local s, r = pcall(require, name)
if not s and not r:find("no file") then
error(r, 0)
end
return s and r
end
local function append(t, v)
for _, _v in ipairs(t) do
if _v == v then
return
end
end
insert(t, v)
end
local function local_import(_env, packages, package)
local o = package:find('^./')
if o then
local ro=string.gsub(package,"%./","/")
return dofile(activity.getLuaDir()..ro)
end
local j = package:find(':')
if j then
local dexname = package:sub(1, j - 1)
local classname = package:sub(j + 1, -1)
local class = luacontext.loadDex(dexname).loadClass(classname)
local classname = package:match('([^%.$]+)$')
_env[classname] = class
append(imported, package)
return class
end
local i = package:find('%*$')
if i then -- a wildcard; put into the package list, including the final '.'
append(packages, package:sub(1, -2))
append(imported, package)
return import_pacckage(package:sub(1, -2))
else
local classname = package:match('([^%.$]+)$')
local class = import_require(package) or import_class(package) or import_dex_class(package)
if class then
if class ~= true then
--findtable(package)=class
if type(class) ~= "table" then
append(imported, package)
end
_env[classname] = class
end
return class
else
if pcall(function()
if activity.Import(package)=="Cannot find class" then
error("cannot find " .. package, 2)
end
end)
else
error("cannot find " .. package, 2)
end
end
end
end
local function env_import(env)
local _env = env or {}
local packages = {}
local loaders = {}
append(packages, '')
append(packages, 'java.lang.')
append(packages, 'java.util.')
append(packages, 'com.androlua.')
pcall(function()
append(packages, 'com.x5.WebView.')
append(packages, 'com.myren.wave.')
end)
--检查完毕
local function import_1(classname)
for i, p in ipairs(packages) do
local class = import_class(p .. classname)
if class then
return class
end
end
end
local function import_2(classname)
for _, p in ipairs(packages) do
local class = import_dex_class(p .. classname)
if class then
return class
end
end
end
append(loaders, import_1)
append(loaders, import_2)
local globalMT = {
__index = function(T, classname)
for i, p in ipairs(loaders) do
local class = loaded[classname] or p(classname)
if class then
T[classname] = class
return class
end
end
return nil
end
}
if type(_env)=="string" then
return globalMT.__index({},_env)
end
setmetatable(_env, globalMT)
for k, v in pairs(_M) do
_env[k] = v
end
local import = function(package, env)
env = env or _env
if type(package) == "string" then
return local_import(env, packages, package)
elseif type(package) == "table" then
local ret = {}
for k, v in ipairs(package) do
ret[k] = local_import(env, packages, v)
end
return ret
end
end
_env.import = import
import("loadlayout", _env)
import("loadbitmap", _env)
import("loadmenu", _env)
return _env
end
function _M.compile(name)
append(dexes, luacontext.loadDex(name))
end
function _M.enum(e)
return function()
if e.hasMoreElements() then
return e.nextElement()
end
end
end
function _M.each(o)
local iter = o.iterator()
return function()
if iter.hasNext() then
return iter.next()
end
end
end
local NIL = {}
setmetatable(NIL, { __tostring = function() return "nil" end })
function _M.dump(o)
local t = {}
local _t = {}
local _n = {}
local space, deep = string.rep(' ', 2), 0
local function _ToString(o, _k)
if type(o) == ('number') then
table.insert(t, o)
elseif type(o) == ('string') then
table.insert(t, string.format('%q', o))
elseif type(o) == ('table') then
local mt = getmetatable(o)
if mt and mt.__tostring then
table.insert(t, tostring(o))
else
deep = deep + 2
table.insert(t, '{')
for k, v in pairs(o) do
if v == _G then
table.insert(t, string.format('\r\n%s%s\t=%s ;', string.rep(space, deep - 1), k, "_G"))
elseif v ~= package.loaded then
if tonumber(k) then
k = string.format('[%s]', k)
else
k = string.format('[\"%s\"]', k)
end
table.insert(t, string.format('\r\n%s%s\t= ', string.rep(space, deep - 1), k))
if v == NIL then
table.insert(t, string.format('%s ;',"nil"))
elseif type(v) == ('table') then
if _t[tostring(v)] == nil then
_t[tostring(v)] = v
local _k = _k .. k
_t[tostring(v)] = _k
_ToString(v, _k)
else
table.insert(t, tostring(_t[tostring(v)]))
table.insert(t, ';')
end
else
_ToString(v, _k)
end
end
end
table.insert(t, string.format('\r\n%s}', string.rep(space, deep - 1)))
deep = deep - 2
end
else
table.insert(t, tostring(o))
end
table.insert(t, " ;")
return t
end
t = _ToString(o, '')
return table.concat(t)
end
function _M.printstack()
local stacks = {}
for m = 2, 16 do
local dbs = {}
local info = debug.getinfo(m)
if info == nil then
break
end
table.insert(stacks, dbs)
dbs.info = info
local func = info.func
local nups = info.nups
local ups = {}
dbs.upvalues = ups
for n = 1, nups do
local n, v = debug.getupvalue(func, n)
if v == nil then
v = NIL
end
if string.byte(n) == 40 then
if ups[n] == nil then
ups[n] = {}
end
table.insert(ups[n], v)
else
ups[n] = v
end
end
local lps = {}
dbs.localvalues = lps
lps.vararg = {}
--lps.temporary={}
for n = -1, -255, -1 do
local k, v = debug.getlocal(m, n)
if k == nil then
break
end
if v == nil then
v = NIL
end
table.insert(lps.vararg, v)
end
for n = 1, 255 do
local n, v = debug.getlocal(m, n)
if n == nil then
break
end
if v == nil then
v = NIL
end
if string.byte(n) == 40 then
if lps[n] == nil then
lps[n] = {}
end
table.insert(lps[n], v)
else
lps[n] = v
end
--table.insert(lps,string.format("%s=%s",n,v))
end
end
print(dump(stacks))
-- print("info="..dump(dbs))
-- print("_ENV="..dump(ups._ENV or lps._ENV))
end
if activity then
function _M.print(...)
local buf = {}
for n = 1, select("#", ...) do
table.insert(buf, tostring(select(n, ...)))
end
local msg = table.concat(buf, "\t\t")
activity.sendMsg(msg)
end
end
function _M.getids()
return luajava.ids
end
local LuaAsyncTask = luajava.bindClass("com.androlua.LuaAsyncTask")
local LuaThread = luajava.bindClass("com.androlua.LuaThread")
local LuaTimer = luajava.bindClass("com.androlua.LuaTimer")
local Object = luajava.bindClass("java.lang.Object")
local function setmetamethod(t, k, v)
getmetatable(t)[k] = v
end
local function getmetamethod(t, k, v)
return getmetatable(t)[k]
end
local getjavamethod = getmetamethod(LuaThread, "__index")
local function __call(t, k)
return function(...)
if ... then
t.call(k, Object { ... })
else
t.call(k)
end
end
end
local function __index(t, k)
local s, r = pcall(getjavamethod, t, k)
if s then
return r
end
local r = __call(t, k)
setmetamethod(t, k, r)
return r
end
local function __newindex(t, k, v)
t.set(k, v)
end
local function checkPath(path)
if path:find("^[^/][%w%./_%-]+$") then
if not path:find("%.lua$") then
path = string.format("%s/%s.lua", activity.luaDir, path)
else
path = string.format("%s/%s", activity.luaDir, path)
end
end
return path
end
function _M.thread(src, ...)
if type(src) == "string" then
src = checkPath(src)
end
local luaThread
if ... then
luaThread = LuaThread(activity or service, src, true, Object { ... })
else
luaThread = LuaThread(activity or service, src, true)
end
luaThread.start()
--setmetamethod(luaThread,"__index",__index)\
--setmetamethod(luaThread,"__newindex",__newindex)
return luaThread
end
function _M.task(src, ...)
local args = { ... }
local callback = args[select("#", ...)]
args[select("#", ...)] = nil
local luaAsyncTask = LuaAsyncTask(activity or service, src, callback)
luaAsyncTask.executeOnExecutor(LuaAsyncTask.THREAD_POOL_EXECUTOR, args)
return luaAsyncTask
end
function _M.timer(f, d, p, ...)
local luaTimer = LuaTimer(activity or service, f, Object { ... })
if p == 0 then
luaTimer.start(d)
else
luaTimer.start(d, p)
end
return luaTimer
end
function _M.dp2px(dp)
local TypedValue= import "android.util.TypedValue"
local a,b=dp:match("^(%-?[%.%d]+)(%a%a)$")
return TypedValue.applyDimension(1,tonumber(a),activity.getResources().getDisplayMetrics())
end
function _M.table2json(t)
local json = import "json"
return json.encode(t)
end
function _M.json2table(s)
local json = import "json"
return json.decode(s)
end
--支持库,解析init.lua
pcall(function()
local ColorFilter=luajava.bindClass("android.graphics.ColorFilter")
local ColorStateList=luajava.bindClass("android.content.res.ColorStateList")
local l=io.open(activity.getLuaDir().."/init.lua"):read("*a")
local a=l:match('loper="(.-)"')
local b=l:match('ption="(.-)"')
if a=="true" then nxn=0 else nxn=1 end
activity.setRequestedOrientation(nxn);
if b=="nil" then task(300,function()activity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
end)
end
function mainHeight()
import 'android.os.Build'
if Build.VERSION.SDK_INT >= 19 then
resourceId = activity.getResources().getIdentifier('status_bar_height','dimen','android')
height = activity.getResources().getDimensionPixelSize(resourceId)
return height
else
return 0
end
end
function getLayouti(a,c)
linearParams = a.getLayoutParams()
linearParams.height =c
a.setLayoutParams(linearParams)
end
function BaseColl(id,color)
local attrsArray = {android.R.attr.selectableItemBackgroundBorderless}
local typedArray =activity.obtainStyledAttributes(attrsArray)
ripple=typedArray.getResourceId(0,0)
Pretend=activity.Resources.getDrawable(ripple)
Pretend.setColor(ColorStateList(int[0].class{int{}},int{color}))
id.setBackground(Pretend.setColor(ColorStateList(int[0].class{int{}},int{color})))
end
end)
--第三方属性检查完毕
local os_mt = {}
os_mt.__index = function(t, k)
local _t = {}
_t.__cmd = (rawget(t, "__cmd") or "") .. k .. " "
setmetatable(_t, os_mt)
return _t
end
os_mt.__call = function(t, ...)
local cmd = t.__cmd .. table.concat({ ... }, " ")
local p = io.popen(cmd)
local s = p:read("a")
p:close()
return s
end
setmetatable(os, os_mt)
env_import(_G)
local luajava_mt = {}
luajava_mt.__index = function(t, k)
local b, ret = xpcall(function()
return luajava.bindClass((rawget(t, "__name") or "") .. k)
end,
function()
local p = {}
p.__name = (rawget(t, "__name") or "") .. k .. "."
setmetatable(p, luajava_mt)
return p
end)
rawset(t, k, ret)
return ret
end
setmetatable(luajava, luajava_mt)
pcall(function()
require 'init'
if this!=activity or !debugmode then
_G.safe_error=print
_G.explain=print
_G.info=print
_G.warning=print
else
_G.View=luajava.bindClass "android.view.View"
local LinearLayout=luajava.bindClass "android.widget.LinearLayout"
local Spannable=luajava.bindClass "android.text.Spannable"
local Toast=luajava.bindClass "android.widget.Toast"
local EditText=luajava.bindClass "android.widget.EditText"
local InputMethodManager=luajava.bindClass "android.view.inputmethod.InputMethodManager"
local Color=luajava.bindClass "android.graphics.Color"
local WindowManager=luajava.bindClass "android.view.WindowManager"
local TextView=luajava.bindClass "android.widget.TextView"
local LuaAdapter=luajava.bindClass "com.androlua.LuaAdapter"
local Gravity=luajava.bindClass "android.view.Gravity"
local FrameLayout=luajava.bindClass "android.widget.FrameLayout"
local Build=luajava.bindClass "android.os.Build"
local Ticker=luajava.bindClass "com.androlua.Ticker"
local System=luajava.bindClass "java.lang.System"
local Context=luajava.bindClass "android.content.Context"
local HapticFeedbackConstants=luajava.bindClass "android.view.HapticFeedbackConstants"
local ListView=luajava.bindClass "android.widget.ListView"
local ColorStateList=luajava.bindClass "android.content.res.ColorStateList"
local ForegroundColorSpan=luajava.bindClass "android.text.style.ForegroundColorSpan"
local PageView=luajava.bindClass "android.widget.PageView"
local Window=luajava.bindClass "android.view.Window"
local SimpleDateFormat=luajava.bindClass "java.text.SimpleDateFormat"
local Configuration=luajava.bindClass "android.content.res.Configuration"
local Dialog=luajava.bindClass "android.app.Dialog"
local ScrollView=luajava.bindClass "android.widget.ScrollView"
local SpannableStringBuilder=luajava.bindClass "android.text.SpannableStringBuilder"
local typedValue = luajava.newInstance('android.util.TypedValue')
luajava.getContext().getTheme().resolveAttribute(android.R.attr.colorAccent, typedValue, true);
local dark=luajava.getContext().getResources().getConfiguration().uiMode& Configuration.UI_MODE_NIGHT_YES!=0
--local tcolor=typedValue.data
--local bcolor=0xfff2f1f6
local tcolor=0xFF00B002
local bcolor=0xFF059600
if dark then
local hsv=float[3]
Color.colorToHSV(tcolor,hsv)
hsv[1]=0.7
hsv[2]=1
tcolor=Color.HSVToColor(hsv)
bcolor=0xFF404041
--bcolor=0x00
end
local ids={}
local wm=activity.getSystemService(Context.WINDOW_SERVICE)
local wp=WindowManager.LayoutParams()
wp.width=-2
wp.y = 50
wp.height=WindowManager.LayoutParams.WRAP_CONTENT
wp.gravity=Gravity.RIGHT | Gravity.CENTER
wp.flags=WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
ids.btn={}
local btn=loadlayout({
LinearLayout;
padding="1dp";
paddingRight="2";
backgroundColor=tcolor;
id='root';
{
TextView;
paddingLeft="6dp";
paddingBottom="2dp";
paddingTop="2dp";
id="title";
textSize="11dp";
textColor="0xFFF6F6F6";
gravity="center";
text="调试";
paddingRight="6dp";
};
},ids.btn)
ids.btn.title.getPaint().setFakeBoldText(true)
wm.addView(btn,wp)
--移动
local lastY=0
local vy=0
local vw=0
local vh=0
ids.btn.root.setOnTouchListener(View.OnTouchListener{onTouch=function(v,e)
ry=e.getRawY()--获取触摸绝对Y位置
if e.getAction() == 0 then
vh=v.getHeight()
wp=v.getLayoutParams()
vy=wp.y --当前Y
lastY=ry --起始Y
elseif e.getAction() == 2 then--移动
wp.y=(vy+(ry-lastY))
wm.updateViewLayout(btn,wp)
elseif e.getAction() == 1 then --抬起
end
end
})
local function readlog(s)
local p=io.popen("logcat -d -v long "..s)
local s=p:read("*a")
p:close()
s=s:gsub("%-+ beginning of[^\n]*\n","")
if #s==0 then
s="<run the app to see its log output>"
end
return s
end
local function clearlog()
local p=io.popen("logcat -c")
local s=p:read("*a")
p:close()
return s
end
task(clearlog)
control_hide=false
local ti=Ticker()
ti.Period=1500
ti.onTick=function()
if control_hide then
collectgarbage("restart")
if dia then dia.show() end
wm.removeView(btn)
ti.stop()
end
local s=readlog('lua:* *:S')
if s:find('Runtime%s-error')
safe_error((s:gsub('^%[.+%]\n','')))
ids.btn.title.setText('异常')
ids.btn.root.setBackgroundColor(0xFFe90000)
ids.btn.title.setTextColor(0xFFe0e0e0)
ti.stop()
end
s = nil
if this.isFinishing() or this.isDestroyed()
ti.stop()
end
end
ti.start()
ids.dia={}
local dia=Dialog(this)
dia.requestWindowFeature(Window.FEATURE_NO_TITLE)
dia.setContentView(loadlayout({
LinearLayout;
orientation="vertical";
layout_width="fill";
layout_height="fill";
backgroundColor="#323232";
{
LinearLayout;
layout_height="35dp";
layout_width="match_parent";
{
TextView;
textSize="12dp";
layout_weight="1";
layout_height="match_parent";
backgroundColor="#AFC1CC";
text="程序输出";
gravity="center";
textColor="#CACACA";
id="prints";
};
{
View;
layout_width="2";
backgroundColor="#484848";
};
{
TextView;
textSize="12dp";
layout_height="match_parent";
layout_weight="1";
text="当前节点";
gravity="center";
textColor="#CACACA";
id="variable";
};
{
View;
layout_width="2";
backgroundColor="#484848";
};
{
TextView;
textSize="12dp";
layout_height="match_parent";
layout_weight="1";
text="调试日志";
gravity="center";
textColor="#CACACA";
id="logcat";
};
{
View;
layout_width="2";
backgroundColor="#484848";
};
{
TextView;
textSize="12dp";
layout_height="match_parent";
layout_weight="1";
text="查看内容";
gravity="center";
textColor="#CACACA";
id="text";
};
{
View;
layout_width="2";
backgroundColor="#484848";
};
{
TextView;
textSize="12dp";
layout_height="match_parent";
layout_weight="1";
text="控制终端";
gravity="center";
textColor="#CACACA";
id="control";
};
};
{
View;
layout_height="2";
backgroundColor="#484848";
};
{
PageView;
backgroundColor="#242424";
layout_weight="1";
id="page";
overScrollMode="2";
pages={
{
FrameLayout;
layout_width="fill";
layout_height="fill";
{
LinearLayout;
layout_width="fill";
id="print_empty";
orientation="vertical";
{
TextView;
textSize="12dp";
paddingLeft="6dp";
padding="5dp";
layout_width="fill";
text="<run the app to see its log output>";
paddingRight="6dp";
textColor="#A9A9A9";
};
{
View;
backgroundColor="#484848";
layout_height="2";
};
};
{
ListView;
overScrollMode="2";
fastScrollEnabled=true;
layout_width="match_parent";
id="print_list";
dividerHeight="2";
layout_height="match_parent";
};
};
{
LinearLayout;
orientation="vertical";
layout_width="fill";
layout_height="fill";
{
LinearLayout;
orientation="vertical";
layout_width="fill";
{
LinearLayout;
focusable=true;
layout_width="fill";
focusableInTouchMode=true;
{
TextView;
padding="5dp";
paddingRight="0";
textColor="#2FE364";
textSize="12dp";
text="当前节点: /";
id="variable_path";
paddingLeft="10dp";
id="variable_path";
};
{
EditText;
padding="5dp";
paddingLeft="0";
textColor="#2FE364";
textSize="12dp";
backgroundColor="0";
singleLine="true";
paddingRight="6dp";
id="variable_search";
layout_width="fill";
imeOptions="actionSearch";
};
};
{
View;
backgroundColor="#484848";
layout_height="2";
};
};
{
ListView;
fastScrollEnabled=true;
dividerHeight="2";
overScrollMode="2";
id="variable_list";
layout_width="match_parent";
layout_height="match_parent";
};
};
{
LinearLayout;
layout_height="fill";
orientation="vertical";
layout_width="fill";
{
LinearLayout;
layout_height="20dp";
id="logcat_bar";
gravity="center";
layout_width="match_parent";
{
TextView;
textSize="10dp";
text="全部";
textColor="#9e9e9e";
gravity="center";
layout_weight="1";
};
{
View;
layout_width="2";
backgroundColor="#484848";
};
{
TextView;
textSize="10dp";
text="Lua";
textColor="#9e9e9e";
gravity="center";
layout_weight="1";
};
{
View;
layout_width="2";
backgroundColor="#484848";
};
{
TextView;
textSize="10dp";
text="测验";