androlua按钮事件
首先在aly布局界面设置ID。
{ LinearLayout; layout_width="fill"; orientation="vertical"; layout_height="fill"; { EditText; hint="rpgmvp文件路径"; layout_width="match_parent"; }; { Button; text="转换"; }; { TextView; text="默认文件保存路径/storage/emulated/0/Pictures/rpgmvp2"; }; { EditText; hint="测试用的单个rpgmvp文件路径"; layout_width="match_parent"; }; { Button; text="单文件测试转换"; id="test"; }; };
然后编写代码
function test.onClick() print("hello") end
浙公网安备 33010602011771号