中文 | English
Compile AndroLua+ layout, convert it into Lua code.
{
LinearLayout,
orientation="vertical",
layout_width="fill",
layout_height="fill",
{
TextView,
gravity="center",
text="Hello AndroLua+",
layout_width="fill",
layout_height="fill",
},
}
local LayoutHelper=require "LayoutHelper"
return function(root,group)
local varsMap={}
root=root or _G
varsMap.view0=LinearLayout(activity)
varsMap.params0=ViewGroup.LayoutParams(-1,-1)
varsMap.params0=group and group.LayoutParams(varsMap.params0) or ViewGroup.LayoutParams(varsMap.params0)
varsMap.view1=TextView(activity)
varsMap.params1=LinearLayout.LayoutParams(ViewGroup.LayoutParams(-1,-1))
varsMap.view1.setText("Hello AndroLua+")
varsMap.view1.setGravity(17)
varsMap.view1.setLayoutParams(varsMap.params1)
--varsMap.params1=nil
varsMap.view0.addView(varsMap.view1)
--varsMap.view1=nil
varsMap.view0.setOrientation(1)
varsMap.view0.setLayoutParams(varsMap.params0)
--varsMap.params0=nil
--varsMap=nil
return varsMap.view0
end
- Core documents
lua/compilelayout.lua
Compiler ontology.lua/VituralG.lua
Virtual_ G
, used to obtain code calls.lua/obj2code.lua
Tools for converting objects into code.LayoutHelper.lua
layout helper that needs to be imported within the target software to provide some classes.
- Other files
lua/i18n/
i18n.lua for lua.lua/themeutil.lua
Theme helper for adaptive target platforms. This is a must-have component for AideLua shared pages.main.lua
AndroLua+ entry file.init.lua
AndroLua+ configuration file.layout.aly
Software layout file.i18n/
Internationalization profile.
- Go to the Gitee Release (NOT GITHUB) and download the pre-compiled installation package, usually with a filename ending in
.apk
. - Follow the tutorial in "Flashing Guide - Install Software" (Chinese) to install the utility.
- Fill in the information in the edit box above.
- Click "Export LayoutHelper" to export
LayoutHelper.lua
to theProject/lua
directory (orProject/Module/Type/src/luaLibs
for AideLua). - Click the "Compile Layout" button and select the save path.
- Fork this repository
- Create a new branch for Feat_xxx
- Commit code
- Create a new Pull Request
The Gitee repository is primary, and the GitHub repository is mirrored.
Although the repositories on GitHub are mirrors, you are not prevented from submitting Issues.
- Copy
i18n/en.lua
toi18n/your-language.lua
- Copy
i18n/en/*
toi18n/your-language/*
- Translate
i18n/your-language.lua
andi18n/your-language/*
- Commit the code and create a new Pull Request
For additional information, please refer to the instructions in the software.