require "import"
import "android.widget.*"
import "com.androlua.*"
import "android.widget.ArrayAdapter"
import "android.widget.LinearLayout"
import "android.widget.TextView"
import "java.io.File"
import "android.widget.ListView"
import "android.app.AlertDialog"
local function 界面 ()
return service.getAllTextList()
end
local function 显示 ()
layout={
GridView,
id="grid",
numColumns=10,
}
dlg=LuaDialog(service)
dlg.View=loadlayout(layout)
grid.adapter=SingleLineAdapter( service, 界面() )
dlg.setTitle("简单浏览")
dlg.setButton2("取消",nil)
dlg.show()
grid.onItemClick=function(l,v)
dlg.dismiss()
task(1,function()
service.click({{ "[" .. v.text .. "]" }})
task( 500 , function()
显示()
end)
end)
end
end
显示()
return true |