代码拉取完成,页面将自动刷新
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"
import "mods.lay"
ztt()
main10 = {
LinearLayout,
layout_width = "fill",
backgroundColor = AndLuaB,
layout_height = "fill",
{
RelativeLayout,
layout_width = "fill",
layout_height = "fill",
{
TextView,
textSize = "15sp",
layout_centerInParent = "true",
text = getLS("L_No_project"),
textColor = "#000000",
id = "wgc",
},
{
SwipeRefreshLayout,
layout_margin = "5dp",
id = "sxlist",
{
YLListView,
VerticalScrollBarEnabled = false,
overScrollMode = 2,
id = "list",
VerticalScrollBarEnabled = false,
layout_width = "-1",
layout_height = "-1",
DividerHeight = 0
},
},
},
};
activity.setContentView(loadlayout(main10))
ztt()
ztl()
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_Select_the_source_code"),
textColor = tonumber(bjzt()),
id = "bt",
singleLine = true,
},
},
};
activity.ActionBar.setDisplayShowCustomEnabled(true)
activity.ActionBar.setCustomView(loadlayout(btl))
activity.ActionBar.setBackgroundDrawable(ColorDrawable(AndLuaB1))
activity.ActionBar.setElevation(0)
bw(Sideslip, 0x5FFFFFFF)
Sideslip.onClick = function()
activity.finish()
end
function gxlbb(ggh, bbt, bh, bmh, g)
adp3.add { tb = ggh, bt = bbt, bb = bh, bmb = bmh, gcv = g, gcu = ggh }
end
sxlist.setRefreshing(true);
adp3 = LuaAdapter(activity, lap)
list.setAdapter(adp3)
function sjj()
end
function szlb(hkqq)
if hkqq == "0" then
wgc.setVisibility(View.VISIBLE)
else
wgc.setVisibility(View.GONE)
end
sxlist.setRefreshing(false);
end
function ddd()
adp3.clear()
end
function sxgg()
require "import"
import "java.io.File"
import "mods.andlua"
call("sjj")
function show(f)
dir = f
call("ddd")
ls = luajava.astable(f.listFiles() or String {})
table.sort(ls, function(a, b)
return (a.isDirectory() ~= b.isDirectory() and a.isDirectory()) or
((a.isDirectory() == b.isDirectory()) and a.Name < b.Name)
end)
if #ls == 0 then
hkqq = "0"
else
hkqq = "1"
for n = 1, #ls do
bbm = ls[n].Name
gg = ("/sdcard/AndLua/project/" .. ls[n].Name .. "/init.lua")
if File(gg).isFile() then
pdd = ("/sdcard/AndLua/project/" .. ls[n].Name .. "/main.lua")
file, err = io.open(pdd)
if err == nil then
ggh = ("/sdcard/AndLua/project/" .. ls[n].Name .. "/icon.png")
if File(ggh).isFile() == false then
ggh = activity.getLuaDir() .. "/icon.png"
end
g = ("/sdcard/AndLua/project/" .. ls[n].Name)
wj = tostring(io.open(gg):read("*a"))
bbt = tostring(wj:match('%appname="(.-)"'))
bh = getLS("L_Version") .. ": " .. tostring(wj:match('%appver="(.-)"'))
bmh = getLS("L_The_package_name") .. ": " .. tostring(wj:match('%kagename="(.-)"'))
call("gxlbb", ggh, bbt, bh, bmh, g)
else
end
end
end
end
end
show(File("/sdcard/AndLua/project/"))
call("szlb", hkqq)
end
thread(sxgg)
sxlist.setColorSchemeColors({ tonumber(bjzt()) });
sxlist.setOnRefreshListener(SwipeRefreshLayout.OnRefreshListener { onRefresh = function()
thread(sxgg)
end })
list.onItemClick = function(l, v, p, i)
if File(v.Tag.gcv.Text).isDirectory() then
if v.Tag.bt.Text ~= "nil" then
activity.newActivity("main11", { v.Tag.gcv.Text, v.Tag.bt.Text, v.Tag.gcu.Text })
end
else
SnackerBar.build()
:msg(getLS("L_This_project_does_not_exist"))
:actionText(getLS("L_OK"))
:action(function()
end)
:show()
end
end
function onResult(name, ...)
ah = ...
activity.finish()
end
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。