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

 

posted on 2025-12-18 16:50  小沙盒工作室  阅读(4)  评论(0)    收藏  举报