关于LUA交互Anroid的求助贴

roker 发布于 2015年01月29日
无人欣赏。

最近寒假闲着没事写一个lua脚本开发android app的框架,lua写的界面代码如下

function onCreated()
local root = view{id="mainView",Marginleft=0,Margintop=0,Width=800,Height=1000,BackgroundColor="#ddeeff"}
local sub = EditText{Marginleft=90,Margintop=0,Width=300,Height=300,BackgroundColor="#ffffff"}
root:addChild(view{Marginleft=30,Margintop=0,Width=30,Height=300,BackgroundColor="#eeccff"})
root:addChild(sub)    
return  root

我在想 假如给view 加一个onclick(LUA函数)事件实现对界面控件某个属性的改变(如下),框架代码该怎么写?

onclick=function(){mainView.BackgroundColor="#eeeee"}

项目源代码github

暂无回复
登录 或者 注册
相关帖子