├── .classpath ├── .project ├── .settings ├── org.eclipse.core.resources.prefs └── org.eclipse.jdt.core.prefs ├── AndroidManifest.xml ├── README.md ├── assets ├── framework │ └── ui.lua └── lua │ ├── image │ ├── bg.jpg │ ├── bg2.jpg │ ├── bgs.jpg │ ├── login-button.png │ └── pen.png │ ├── main.lua │ ├── main.lua.bak │ ├── second.lua │ └── second.lua.bak ├── bin ├── AndroidManifest.xml ├── classes.dex ├── classes │ └── cn │ │ └── iolove │ │ ├── cache │ │ ├── ImageCache$1.class │ │ └── ImageCache.class │ │ ├── debug │ │ └── LOG.class │ │ ├── dialog │ │ └── GeneralDialog.class │ │ ├── domain │ │ ├── Device.class │ │ └── LuaData.class │ │ └── lui │ │ ├── Activity │ │ ├── BootActivity.class │ │ ├── PageContainerActivity$1.class │ │ ├── PageContainerActivity$2$1.class │ │ ├── PageContainerActivity$2$2.class │ │ ├── PageContainerActivity$2.class │ │ └── PageContainerActivity.class │ │ ├── BuildConfig.class │ │ ├── MainActivity.class │ │ ├── R$attr.class │ │ ├── R$dimen.class │ │ ├── R$drawable.class │ │ ├── R$id.class │ │ ├── R$layout.class │ │ ├── R$menu.class │ │ ├── R$string.class │ │ ├── R$style.class │ │ ├── R.class │ │ ├── context │ │ ├── RuntimeContext$1$1.class │ │ ├── RuntimeContext$1.class │ │ ├── RuntimeContext$2$1.class │ │ ├── RuntimeContext$2$2.class │ │ ├── RuntimeContext$2.class │ │ ├── RuntimeContext$RuntimeContextListener.class │ │ └── RuntimeContext.class │ │ ├── controller │ │ ├── PageController$PageControolerCallback.class │ │ └── PageController.class │ │ ├── lua │ │ └── LuaHelper.class │ │ ├── model │ │ ├── AbstractModel.class │ │ ├── ButtonModel.class │ │ ├── CheckBoxModel.class │ │ ├── EditTextModel.class │ │ ├── TextViewModel.class │ │ ├── UIModel.class │ │ ├── ViewModel.class │ │ └── function │ │ │ ├── LuaModelFucntion.class │ │ │ └── ModelFunctionImp.class │ │ ├── page │ │ ├── NormalPagFragement.class │ │ ├── Page.class │ │ └── PageCircle.class │ │ ├── sandbox │ │ ├── AppSandbox$AppSandboxCallback.class │ │ ├── AppSandbox.class │ │ └── PageSandbox.class │ │ ├── service │ │ ├── IService$1.class │ │ ├── IService.class │ │ ├── ImageService.class │ │ ├── LuaService$1$1.class │ │ ├── LuaService$1.class │ │ ├── LuaService$log.class │ │ ├── LuaService.class │ │ ├── PageService$PageControolerCallback.class │ │ ├── PageService.class │ │ ├── PageServiceInterface.class │ │ ├── Registry$RegistryAdapter.class │ │ └── Registry.class │ │ ├── thread │ │ ├── Method.class │ │ ├── ThreadFactory.class │ │ └── WorkThread.class │ │ ├── utils │ │ ├── BitmapUtils$1.class │ │ ├── BitmapUtils.class │ │ ├── LoadImageListener.class │ │ ├── PageFactory.class │ │ ├── Utils.class │ │ └── WidgetFactory.class │ │ ├── view │ │ ├── LuiView.class │ │ └── ViewFactory.class │ │ └── widget │ │ ├── AbstractWidget$1$1.class │ │ ├── AbstractWidget$1.class │ │ ├── AbstractWidget.class │ │ ├── ButtonWidget$1.class │ │ ├── ButtonWidget.class │ │ ├── CheckBoxWidget$1.class │ │ ├── CheckBoxWidget.class │ │ ├── EditTextWidget$1.class │ │ ├── EditTextWidget.class │ │ ├── ScrollViewWidget.class │ │ ├── UIGroupInterface.class │ │ ├── ViewWidget$1.class │ │ ├── ViewWidget$2.class │ │ ├── ViewWidget.class │ │ └── WidgetUtils.class ├── dexedLibs │ ├── android-support-v4-9d9d1ef6e61ddcceb1633c912a64b28a.jar │ └── luajava-2168fa4bd4957155f52894632beb41f3.jar ├── jarlist.cache ├── lui.apk ├── res │ └── crunch │ │ ├── drawable-hdpi │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ │ └── drawable-xxhdpi │ │ └── ic_launcher.png └── resources.ap_ ├── build.gradle ├── gen └── cn │ └── iolove │ └── lui │ ├── BuildConfig.java │ └── R.java ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── ic_launcher-web.png ├── libs ├── android-support-v4.jar ├── android-support-v4.jar.properties ├── luajava.jar └── x86 │ └── libluajava.so ├── proguard-project.txt ├── project.properties ├── project.properties.bak ├── res ├── drawable-hdpi │ └── ic_launcher.png ├── drawable-mdpi │ └── ic_launcher.png ├── drawable-xhdpi │ └── ic_launcher.png ├── drawable-xxhdpi │ └── ic_launcher.png ├── layout │ └── activity_main.xml ├── menu │ └── main.xml ├── values-sw600dp │ └── dimens.xml ├── values-sw720dp-land │ └── dimens.xml ├── values-v11 │ └── styles.xml ├── values-v14 │ └── styles.xml └── values │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml └── src └── cn └── iolove ├── cache └── ImageCache.java ├── debug └── LOG.java ├── dialog └── GeneralDialog.java ├── domain ├── Device.java └── LuaData.java └── lui ├── Activity ├── BootActivity.java └── PageContainerActivity.java ├── MainActivity.java ├── context └── RuntimeContext.java ├── controller └── PageController.java ├── lua └── LuaHelper.java ├── model ├── AbstractModel.java ├── ButtonModel.java ├── CheckBoxModel.java ├── EditTextModel.java ├── TextViewModel.java ├── UIModel.java ├── ViewModel.java └── function │ ├── LuaModelFucntion.java │ └── ModelFunctionImp.java ├── page ├── NormalPagFragement.java ├── Page.java └── PageCircle.java ├── sandbox ├── AppSandbox.java └── PageSandbox.java ├── service ├── IService.java ├── ImageService.java ├── LuaService.java ├── PageService.java ├── PageServiceInterface.java └── Registry.java ├── thread ├── Method.java ├── ThreadFactory.java └── WorkThread.java ├── utils ├── BitmapUtils.java ├── LoadImageListener.java ├── PageFactory.java ├── Utils.java └── WidgetFactory.java ├── view ├── LuiView.java └── ViewFactory.java └── widget ├── AbstractWidget.java ├── ButtonWidget.java ├── CheckBoxWidget.java ├── EditTextWidget.java ├── ScrollViewWidget.java ├── UIGroupInterface.java ├── ViewWidget.java └── WidgetUtils.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | lui 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//assets/lua/main.lua=UTF-8 3 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.source=1.6 5 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## What's LuiFrameWork 2 | a android UI framework that codes android UI by **lua** 3 | ## How do with LuiFrameWork 4 | * how to code android app by lui 5 | * new Android project,and Let MainActivity inherit cn.iolove.lui.Activity.BootActivity 6 | * Set a main.lua file in Asset directory 7 | * Add lui.jar,lua4java.jar, armeabi\libluajava.so in libs directory 8 | * finally,codding lua in main.lua 9 | 10 | ##LuiFramework是什么? 11 | 一个可以用lua脚本编写android APP的业务框架 12 | 13 | 14 | 15 | ##LuiFramework如何使用? 16 | 17 | * 如何使用lui框架编写自己的androidAPP 18 | * 新建Android的工程后MainActivity继承cn.iolove.lui.Activity.BootActivity 19 | * 然后在Asset目录下新建main.lua文件//(业务代码和UI代码) 20 | * 在libs目录下添加lui.jar,lua4.jar,armeabi\libluajava.so,四个文件 (四个文件本项目中libs中)可以拷贝到自己的android工程里 21 | * 接下来的工作将全部在Asset目录中的lua文件实现UI的基本业务逻辑编写 22 | * 基本的控件button edittext view 等控件已经实现 23 | * lui的优点 24 | * 抛弃原有的XML编写UI,而且Java代码动态生成UI和业务代码捆绑紧密,耦合度高,开发复杂 25 | * 简化UI编写流程,易于实现相对复杂UI布局,实现android开发的前端和后端核心数据数据服务处理的分离 26 | * 易于拓展添加自己编写新的UI控件 27 | 28 | 29 | 30 | ##有问题反馈 31 | * found some error not to run project when you import project,please delete lui.jar in libs path. 32 | 在使用中有任何问题,欢迎反馈给我,可以用以下联系方式跟我交流 33 | 34 | * 邮件(dou.roker@gmail.com or tzlhk@qq.com) 35 | * QQ: 316766907 36 | * weibo: [@溯源](http://weibo.com/u/2395014387) 37 | 38 | 39 | 40 | 41 | 42 | ##关于作者 43 | 44 | ```javascript 45 | var ihubo = { 46 | nickName : "roker dou" 47 | } 48 | ``` 49 | -------------------------------------------------------------------------------- /assets/framework/ui.lua: -------------------------------------------------------------------------------- 1 | View = {} 2 | View.__index = View 3 | 4 | function View:addChild(child) 5 | local sub = self.subitems 6 | if not sub then 7 | sub = {} 8 | self.subitems = sub 9 | end 10 | 11 | table.insert(sub, child) 12 | end 13 | 14 | function view(args) 15 | local m = {} 16 | setmetatable(m, View) 17 | m.qName = "view" 18 | if args then 19 | for k,v in pairs(args) do 20 | m[k] = v 21 | end 22 | end 23 | return m 24 | end 25 | function checkbox(args) 26 | local m = {} 27 | setmetatable(m, View) 28 | m.qName = "checkbox" 29 | if args then 30 | for k,v in pairs(args) do 31 | m[k] = v 32 | end 33 | end 34 | return m 35 | end 36 | function edittext(args) 37 | local m = {} 38 | m.qName = "edittext" 39 | m.height = 44 40 | if args then 41 | for k,v in pairs(args) do 42 | m[k] = v 43 | end 44 | end 45 | return m 46 | end 47 | function button(args) 48 | local m = {} 49 | m.qName = "button" 50 | m.height = 44 51 | if args then 52 | for k,v in pairs(args) do 53 | m[k] = v 54 | end 55 | end 56 | return m 57 | end 58 | function table2json(t) 59 | local function serialize(tbl) 60 | local tmp = {} 61 | for k, v in pairs(tbl) do 62 | local k_type = type(k) 63 | local v_type = type(v) 64 | local key = (k_type == "string" and "\"" .. k .. "\":") 65 | or (k_type == "number" and "") 66 | local value = (v_type == "table" and serialize(v)) 67 | or (v_type == "boolean" and tostring(v)) 68 | or (v_type == "string" and "\"" .. v .. "\"") 69 | or (v_type == "number" and v) 70 | tmp[#tmp + 1] = key and value and tostring(key) .. tostring(value) or nil 71 | end 72 | if table.maxn(tbl) == 0 then 73 | return "{" .. table.concat(tmp, ",") .. "}" 74 | else 75 | return "[" .. table.concat(tmp, ",") .. "]" 76 | end 77 | end 78 | assert(type(t) == "table") 79 | return serialize(t) 80 | end -------------------------------------------------------------------------------- /assets/lua/image/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/assets/lua/image/bg.jpg -------------------------------------------------------------------------------- /assets/lua/image/bg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/assets/lua/image/bg2.jpg -------------------------------------------------------------------------------- /assets/lua/image/bgs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/assets/lua/image/bgs.jpg -------------------------------------------------------------------------------- /assets/lua/image/login-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/assets/lua/image/login-button.png -------------------------------------------------------------------------------- /assets/lua/image/pen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/assets/lua/image/pen.png -------------------------------------------------------------------------------- /assets/lua/main.lua: -------------------------------------------------------------------------------- 1 | local math = require('math') 2 | function Onclick() 3 | 4 | end 5 | function sOnclick() 6 | App:pushPage("second"); 7 | end 8 | 9 | function onCreated() 10 | 11 | local root = view{id="at",marginleft="0%",margintop="0%",width="1000%",height="1000%",backgroundcolor="#303030"} 12 | --root:addChild(view{marginleft="0%",margintop="0%",width="1000%",height="200%",backgroundimage="image/fengjing10.png",alpha="50"}) 13 | root:addChild(view{marginleft="225%",margintop="0%",width="550%",height="180%",backgroundimage="image/logo.png"}) 14 | local login_btn = button{id="login_btn",marginleft="250%",margintop="600%",width="500%",height="100%",text="登陆",Onclick="Login",backgroundcolor="#ccff11"} 15 | root:addChild(edittext{id="user",marginleft="250%",margintop="300%",width="550%",height="80%",fontsize="12",backgroundcolor="#ffffff",alpha="50",type="password"}) 16 | root:addChild(edittext{id="pwd",marginleft="250%",margintop="400%",width="550%",height="80%",fontsize="12",backgroundcolor="#ffffff",alpha="50",type="password"}) 17 | 18 | root:addChild(login_btn) 19 | root:addChild(button{margintop="900%",marginleft="0%",width="1000%",backgroundcolor="#000000",height="100%",textcolor="#EAEAEA",text="窦佳毕业设计",alpha="50"}) 20 | 21 | --local checkline=view{marginleft="0%",margintop="500%",width="1000%",height="80%",backgroundcolor="#cccccc",alpha="50"} 22 | root:addChild(checkbox{id="stu_checkbox",margintop="500%",marginleft="260%",width="100%",height="70%"}) 23 | --root:addChild(checkline) 24 | return root 25 | end 26 | function Login() 27 | 28 | Log:i("进入了登陆函数") 29 | busy:show("正在登陆中"); 30 | --login:Login(user:getText(),pwd:getText(),3,function() busy:dismiss() App:pushPage("second") end,function() end); 31 | Log:i("退出登陆函数") 32 | busy:dismiss() App:pushPage("second") 33 | --busy:dismiss(); 34 | end 35 | function OnNavBack() 36 | App:popPage(); 37 | end 38 | function OnFronted() 39 | end -------------------------------------------------------------------------------- /assets/lua/main.lua.bak: -------------------------------------------------------------------------------- 1 | function Onclick() 2 | 3 | --Log:i("触发了"); 4 | if ss==nil then 5 | 6 | --as:setMarginleft("350%") 7 | at:addChild(view{id="ss",marginleft="0%",margintop="0%",width="350%",height="1000%",backgroundcolor="#1122cc",alpha="40"}); 8 | ss:addChild(button{id="sbutton",marginleft="1%",margintop="200%",width="200%",height="110%",backgroundcolor="#ffffff",text="切换",Onclick="sOnclick"}) 9 | else 10 | at:removeChild(ss) 11 | as:setMarginleft("0%") 12 | 13 | end 14 | end 15 | function sOnclick() 16 | App:pushPage("main"); 17 | end 18 | function onCreated() 19 | 20 | local root = view{id="at",marginleft="0%",margintop="0%",width="1000%",height="1000%"} 21 | roost = view{id="as",marginleft="0%",margintop="0%",width="1000%",height="1000%",backgroundimage="image/pen.png"} 22 | 23 | roost:addChild(button{id="buttons",marginleft="20%",Onclick="Onclick",margintop="200%",width="800%",height="110%",backgroundimage="image/login-button.png",backgroundscale="fill",text="你好",backgroundcolor="#cccccc",alpha="0"}) 24 | roost:addChild(edittext{id="b",marginleft="0%",margintop="800%",width="1000%",height="80%",backgroundcolor="#ffffff",alpha="40"}) 25 | root:addChild(roost) 26 | return root 27 | end 28 | function OnNavBack() 29 | App:popPage(); 30 | end 31 | function OnFronted() 32 | end -------------------------------------------------------------------------------- /assets/lua/second.lua: -------------------------------------------------------------------------------- 1 | function onCreated() 2 | 3 | local root = view{id="a",marginleft="0%",margintop="0%",width="1000%",height="1000%",backgroundimage="image/bgs.jpg",alpha="10"} 4 | 5 | root:addChild(button{id="button",marginleft="20%",Onclick="Onclick",margintop="200%",width="200%",height="200%",text="Second",backgroundcolor="#ff11aa",alpha="50"}) 6 | -- root:addChild(view{id="b",marginleft="0%",margintop="500%",width="1000%",height="1000%",backgroundcolor="#000000"}) 7 | 8 | return root 9 | end 10 | function Onclick() 11 | App:pushPage("main"); 12 | 13 | end 14 | function OnFronted() 15 | end 16 | function OnNavBack() 17 | App:popPage(); 18 | end -------------------------------------------------------------------------------- /assets/lua/second.lua.bak: -------------------------------------------------------------------------------- 1 | function onCreated() 2 | 3 | local root = view{id="a",marginleft="0%",margintop="0%",width="1000%",height="1000%",backgroundcolor="#debbff"} 4 | 5 | root:addChild(button{id="button",marginleft="20%",Onclick="Onclick",margintop="200%",width="200%",height="200%",text="Second",backgroundcolor="#cccccc"}) 6 | -- root:addChild(view{id="b",marginleft="0%",margintop="500%",width="1000%",height="1000%",backgroundcolor="#000000"}) 7 | 8 | return root 9 | end 10 | function Onclick() 11 | 12 | end 13 | function OnFronted() 14 | end -------------------------------------------------------------------------------- /bin/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /bin/classes.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes.dex -------------------------------------------------------------------------------- /bin/classes/cn/iolove/cache/ImageCache$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/cache/ImageCache$1.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/cache/ImageCache.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/cache/ImageCache.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/debug/LOG.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/debug/LOG.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/dialog/GeneralDialog.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/dialog/GeneralDialog.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/domain/Device.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/domain/Device.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/domain/LuaData.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/domain/LuaData.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/Activity/BootActivity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/Activity/BootActivity.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/Activity/PageContainerActivity$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/Activity/PageContainerActivity$1.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/Activity/PageContainerActivity$2$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/Activity/PageContainerActivity$2$1.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/Activity/PageContainerActivity$2$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/Activity/PageContainerActivity$2$2.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/Activity/PageContainerActivity$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/Activity/PageContainerActivity$2.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/Activity/PageContainerActivity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/Activity/PageContainerActivity.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/BuildConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/BuildConfig.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/MainActivity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/MainActivity.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/R$attr.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/R$attr.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/R$dimen.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/R$dimen.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/R$drawable.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/R$drawable.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/R$id.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/R$id.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/R$layout.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/R$layout.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/R$menu.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/R$menu.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/R$string.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/R$string.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/R$style.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/R$style.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/R.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/R.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/context/RuntimeContext$1$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/context/RuntimeContext$1$1.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/context/RuntimeContext$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/context/RuntimeContext$1.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/context/RuntimeContext$2$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/context/RuntimeContext$2$1.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/context/RuntimeContext$2$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/context/RuntimeContext$2$2.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/context/RuntimeContext$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/context/RuntimeContext$2.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/context/RuntimeContext$RuntimeContextListener.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/context/RuntimeContext$RuntimeContextListener.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/context/RuntimeContext.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/context/RuntimeContext.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/controller/PageController$PageControolerCallback.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/controller/PageController$PageControolerCallback.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/controller/PageController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/controller/PageController.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/lua/LuaHelper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/lua/LuaHelper.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/model/AbstractModel.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/model/AbstractModel.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/model/ButtonModel.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/model/ButtonModel.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/model/CheckBoxModel.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/model/CheckBoxModel.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/model/EditTextModel.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/model/EditTextModel.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/model/TextViewModel.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/model/TextViewModel.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/model/UIModel.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/model/UIModel.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/model/ViewModel.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/model/ViewModel.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/model/function/LuaModelFucntion.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/model/function/LuaModelFucntion.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/model/function/ModelFunctionImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/model/function/ModelFunctionImp.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/page/NormalPagFragement.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/page/NormalPagFragement.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/page/Page.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/page/Page.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/page/PageCircle.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/page/PageCircle.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/sandbox/AppSandbox$AppSandboxCallback.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/sandbox/AppSandbox$AppSandboxCallback.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/sandbox/AppSandbox.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/sandbox/AppSandbox.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/sandbox/PageSandbox.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/sandbox/PageSandbox.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/service/IService$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/service/IService$1.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/service/IService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/service/IService.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/service/ImageService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/service/ImageService.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/service/LuaService$1$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/service/LuaService$1$1.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/service/LuaService$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/service/LuaService$1.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/service/LuaService$log.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/service/LuaService$log.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/service/LuaService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/service/LuaService.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/service/PageService$PageControolerCallback.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/service/PageService$PageControolerCallback.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/service/PageService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/service/PageService.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/service/PageServiceInterface.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/service/PageServiceInterface.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/service/Registry$RegistryAdapter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/service/Registry$RegistryAdapter.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/service/Registry.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/service/Registry.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/thread/Method.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/thread/Method.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/thread/ThreadFactory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/thread/ThreadFactory.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/thread/WorkThread.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/thread/WorkThread.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/utils/BitmapUtils$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/utils/BitmapUtils$1.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/utils/BitmapUtils.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/utils/BitmapUtils.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/utils/LoadImageListener.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/utils/LoadImageListener.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/utils/PageFactory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/utils/PageFactory.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/utils/Utils.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/utils/Utils.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/utils/WidgetFactory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/utils/WidgetFactory.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/view/LuiView.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/view/LuiView.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/view/ViewFactory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/view/ViewFactory.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/widget/AbstractWidget$1$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/widget/AbstractWidget$1$1.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/widget/AbstractWidget$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/widget/AbstractWidget$1.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/widget/AbstractWidget.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/widget/AbstractWidget.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/widget/ButtonWidget$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/widget/ButtonWidget$1.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/widget/ButtonWidget.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/widget/ButtonWidget.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/widget/CheckBoxWidget$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/widget/CheckBoxWidget$1.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/widget/CheckBoxWidget.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/widget/CheckBoxWidget.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/widget/EditTextWidget$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/widget/EditTextWidget$1.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/widget/EditTextWidget.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/widget/EditTextWidget.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/widget/ScrollViewWidget.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/widget/ScrollViewWidget.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/widget/UIGroupInterface.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/widget/UIGroupInterface.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/widget/ViewWidget$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/widget/ViewWidget$1.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/widget/ViewWidget$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/widget/ViewWidget$2.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/widget/ViewWidget.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/widget/ViewWidget.class -------------------------------------------------------------------------------- /bin/classes/cn/iolove/lui/widget/WidgetUtils.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/classes/cn/iolove/lui/widget/WidgetUtils.class -------------------------------------------------------------------------------- /bin/dexedLibs/android-support-v4-9d9d1ef6e61ddcceb1633c912a64b28a.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/dexedLibs/android-support-v4-9d9d1ef6e61ddcceb1633c912a64b28a.jar -------------------------------------------------------------------------------- /bin/dexedLibs/luajava-2168fa4bd4957155f52894632beb41f3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/dexedLibs/luajava-2168fa4bd4957155f52894632beb41f3.jar -------------------------------------------------------------------------------- /bin/jarlist.cache: -------------------------------------------------------------------------------- 1 | # cache for current jar dependency. DO NOT EDIT. 2 | # format is 3 | # Encoding is UTF-8 4 | -------------------------------------------------------------------------------- /bin/lui.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/lui.apk -------------------------------------------------------------------------------- /bin/res/crunch/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/res/crunch/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/crunch/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/res/crunch/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/crunch/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/res/crunch/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/crunch/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/res/crunch/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/resources.ap_: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/bin/resources.ap_ -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | mavenCentral() 4 | } 5 | dependencies { 6 | classpath 'com.android.tools.build:gradle:0.5.+' 7 | } 8 | } 9 | apply plugin: 'android' 10 | 11 | dependencies { 12 | compile fileTree(dir: 'libs', include: '*.jar') 13 | } 14 | 15 | android { 16 | compileSdkVersion 18 17 | buildToolsVersion "18.1.0" 18 | 19 | sourceSets { 20 | main { 21 | manifest.srcFile 'AndroidManifest.xml' 22 | java.srcDirs = ['src'] 23 | resources.srcDirs = ['src'] 24 | aidl.srcDirs = ['src'] 25 | renderscript.srcDirs = ['src'] 26 | res.srcDirs = ['res'] 27 | assets.srcDirs = ['assets'] 28 | } 29 | 30 | // Move the tests to tests/java, tests/res, etc... 31 | instrumentTest.setRoot('tests') 32 | 33 | // Move the build types to build-types/ 34 | // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... 35 | // This moves them out of them default location under src//... which would 36 | // conflict with src/ being used by the main source set. 37 | // Adding new build types or product flavors should be accompanied 38 | // by a similar customization. 39 | debug.setRoot('build-types/debug') 40 | release.setRoot('build-types/release') 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /gen/cn/iolove/lui/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /** Automatically generated file. DO NOT MODIFY */ 2 | package cn.iolove.lui; 3 | 4 | public final class BuildConfig { 5 | public final static boolean DEBUG = true; 6 | } -------------------------------------------------------------------------------- /gen/cn/iolove/lui/R.java: -------------------------------------------------------------------------------- 1 | /* AUTO-GENERATED FILE. DO NOT MODIFY. 2 | * 3 | * This class was automatically generated by the 4 | * aapt tool from the resource data it found. It 5 | * should not be modified by hand. 6 | */ 7 | 8 | package cn.iolove.lui; 9 | 10 | public final class R { 11 | public static final class attr { 12 | } 13 | public static final class dimen { 14 | /** Default screen margins, per the Android Design guidelines. 15 | 16 | Customize dimensions originally defined in res/values/dimens.xml (such as 17 | screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. 18 | 19 | */ 20 | public static final int activity_horizontal_margin=0x7f040000; 21 | public static final int activity_vertical_margin=0x7f040001; 22 | } 23 | public static final class drawable { 24 | public static final int ic_launcher=0x7f020000; 25 | } 26 | public static final class id { 27 | public static final int action_settings=0x7f080001; 28 | public static final int root=0x7f080000; 29 | } 30 | public static final class layout { 31 | public static final int activity_main=0x7f030000; 32 | } 33 | public static final class menu { 34 | public static final int main=0x7f070000; 35 | } 36 | public static final class string { 37 | public static final int action_settings=0x7f050001; 38 | public static final int app_name=0x7f050000; 39 | public static final int hello_world=0x7f050002; 40 | } 41 | public static final class style { 42 | /** 43 | Base application theme, dependent on API level. This theme is replaced 44 | by AppBaseTheme from res/values-vXX/styles.xml on newer devices. 45 | 46 | 47 | Theme customizations available in newer API levels can go in 48 | res/values-vXX/styles.xml, while customizations related to 49 | backward-compatibility can go here. 50 | 51 | 52 | Base application theme for API 11+. This theme completely replaces 53 | AppBaseTheme from res/values/styles.xml on API 11+ devices. 54 | 55 | API 11 theme customizations can go here. 56 | 57 | Base application theme for API 14+. This theme completely replaces 58 | AppBaseTheme from BOTH res/values/styles.xml and 59 | res/values-v11/styles.xml on API 14+ devices. 60 | 61 | API 14 theme customizations can go here. 62 | */ 63 | public static final int AppBaseTheme=0x7f060000; 64 | /** Application theme. 65 | All customizations that are NOT specific to a particular API-level can go here. 66 | */ 67 | public static final int AppTheme=0x7f060001; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 10 15:27:10 PDT 2013 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip 7 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/ic_launcher-web.png -------------------------------------------------------------------------------- /libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/libs/android-support-v4.jar -------------------------------------------------------------------------------- /libs/android-support-v4.jar.properties: -------------------------------------------------------------------------------- 1 | src = F:\\~android-support-v4.jar -------------------------------------------------------------------------------- /libs/luajava.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/libs/luajava.jar -------------------------------------------------------------------------------- /libs/x86/libluajava.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/libs/x86/libluajava.so -------------------------------------------------------------------------------- /proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-19 15 | android.library=false 16 | -------------------------------------------------------------------------------- /project.properties.bak: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-19 15 | android.library=true 16 | -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /res/values-sw720dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 128dp 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 16dp 6 | 7 | 8 | -------------------------------------------------------------------------------- /res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | lui 5 | Settings 6 | Hello world! 7 | 8 | 9 | -------------------------------------------------------------------------------- /res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/cn/iolove/cache/ImageCache.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.cache; 2 | 3 | import android.annotation.SuppressLint; 4 | import android.graphics.Bitmap; 5 | import android.support.v4.util.LruCache; 6 | import android.util.Log; 7 | 8 | public class ImageCache { 9 | private LruCache mBitmapCache; 10 | public static Object file=new Object(); 11 | public ImageCache(int size) 12 | { 13 | mBitmapCache=new LruCache(size) 14 | { 15 | 16 | @Override 17 | protected int sizeOf(String key, Bitmap value) { 18 | // TODO Auto-generated method stub 19 | 20 | return (value.getRowBytes() * value.getHeight()); 21 | } 22 | 23 | 24 | }; 25 | Log.i("luiImageCache", "ImageCache..create "+size); 26 | 27 | } 28 | public void putBitmapToCache(String key, Bitmap bitmap) { 29 | synchronized (file) { 30 | 31 | 32 | if (getBitmapFromCache(key) == null) { 33 | Log.i("luiImageCache", "ImageCache..add "+key); 34 | mBitmapCache.put(key, bitmap); 35 | Log.i("luiImageCache", "ImageCache"+key+".height "+bitmap.getHeight()+".size "+ (bitmap.getRowBytes() * bitmap.getHeight())/1024/1024+"MB"); 36 | } 37 | } 38 | 39 | } 40 | public Bitmap getBitmapFromCache(String key) { 41 | synchronized (file) { 42 | 43 | 44 | Bitmap bmp =mBitmapCache.get(key); 45 | if(bmp!=null) 46 | { 47 | 48 | Log.i("luiImageCache", "ImageCache used "+mBitmapCache.putCount()*3 +"M");//3 is just avaerage bitmap memory 49 | Log.i("luiImageCache", "Cache not used "+mBitmapCache.size()/1024/1024 +"M"); 50 | //Log.i("luiImageCache", "ImageCache..get "+key); 51 | Log.i("luiImageCache", "ImageCache get "+key+".height "+bmp.getHeight()+".size "+ (bmp.getRowBytes() * bmp.getHeight())/1024+"KB"); 52 | Log.i("luiImageCache", "ImageCache hit "+mBitmapCache.hitCount()); 53 | Log.i("luiImageCache", "ImageCache not hit "+mBitmapCache.missCount()); 54 | 55 | 56 | } 57 | return bmp; 58 | } 59 | } 60 | 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/cn/iolove/debug/LOG.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.debug; 2 | 3 | import android.util.Log; 4 | 5 | public class LOG 6 | { 7 | public static void i(Object obj,String msg) 8 | { 9 | if(obj instanceof Class) 10 | Log.i("lui",((Class) obj).getName()+" "+msg); 11 | else 12 | { 13 | Log.i("lui", obj.getClass().getName()+" "+msg); 14 | } 15 | } 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/cn/iolove/dialog/GeneralDialog.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.dialog; 2 | 3 | import android.app.Dialog; 4 | import android.content.Context; 5 | 6 | public class GeneralDialog extends Dialog { 7 | 8 | public GeneralDialog(Context context) { 9 | super(context); 10 | // TODO Auto-generated constructor stub 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/cn/iolove/domain/Device.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.domain; 2 | public class Device { 3 | private static Device obj = new Device(); 4 | public static Device getInstance() {return obj;} 5 | public int ScreenWidth; 6 | public int ScreenHeight; 7 | private Device(){} 8 | public Device setScreenWidthAndHeight(int w,int h) 9 | { 10 | ScreenWidth=w; 11 | ScreenHeight=h; 12 | 13 | return this; 14 | } 15 | public int getScreenWidth() 16 | { 17 | return ScreenWidth; 18 | 19 | } 20 | public int getScreenHeight() 21 | { 22 | return ScreenHeight; 23 | 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/cn/iolove/domain/LuaData.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.domain; 2 | 3 | import java.util.ArrayList; 4 | import java.util.HashMap; 5 | import java.util.List; 6 | 7 | public class LuaData { 8 | 9 | private HashMap hm = new HashMap(); 10 | private List subitems = new ArrayList(); 11 | public LuaData addChild(LuaData c) 12 | { 13 | subitems.add(c); 14 | return c; 15 | 16 | } 17 | 18 | public boolean hasChild() 19 | { 20 | return !subitems.isEmpty(); 21 | 22 | } 23 | public HashMap getAttrs() 24 | { 25 | return hm; 26 | } 27 | public List getChild() 28 | { 29 | return subitems; 30 | } 31 | public void addAttrs(String key,String v) 32 | { 33 | hm.put(key, v); 34 | } 35 | public String toString() 36 | { 37 | String str = new String(); 38 | for (Object key : hm.keySet()) { 39 | 40 | String value = (String) hm.get(key); 41 | str= str+ " "+key+":"+value; 42 | } 43 | for(int i=0;i StackPage = new Stack() ; 13 | 14 | public static interface PageControolerCallback 15 | { 16 | public abstract void pushPage(LuiView v); 17 | 18 | 19 | } 20 | public Page getTopPage() 21 | { 22 | return StackPage.peek(); 23 | 24 | } 25 | public void start() 26 | { 27 | 28 | StackPage.push(CreateNewPage("main")); 29 | } 30 | public Page CreateNewPage(String name) 31 | { 32 | Page page = new Page(name); 33 | return page; 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/lua/LuaHelper.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/src/cn/iolove/lui/lua/LuaHelper.java -------------------------------------------------------------------------------- /src/cn/iolove/lui/model/AbstractModel.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.model; 2 | 3 | import java.util.HashMap; 4 | 5 | import android.view.View; 6 | import cn.iolove.domain.Device; 7 | import cn.iolove.domain.LuaData; 8 | import cn.iolove.lui.context.RuntimeContext; 9 | import cn.iolove.lui.utils.Utils; 10 | import cn.iolove.lui.view.LuiView; 11 | import cn.iolove.lui.widget.AbstractWidget; 12 | 13 | public class AbstractModel { 14 | 15 | public AbstractWidget widget; 16 | public AbstractWidget parentwidget; 17 | public int margintop=100; 18 | public int marginleft=100; 19 | public int width=100; 20 | public int height=100; 21 | public String backgroundcolor="#000000"; 22 | public String id=null; 23 | public boolean hidden=false; 24 | public int alpha=0; 25 | public String backgroundimage; 26 | public String backgroundscale="fill"; 27 | public AbstractModel(LuaData data) 28 | { 29 | //setAttrs(data.getAttrs()); 30 | if(data.getAttrs().get("margintop")!=null) margintop= Integer.parseInt((String)(data.getAttrs().get("margintop"))); 31 | if(data.getAttrs().get("marginleft")!=null) marginleft= Integer.parseInt((String)(data.getAttrs().get("marginleft"))); 32 | if(data.getAttrs().get("width")!=null) width= Integer.parseInt((String)(data.getAttrs().get("width"))); 33 | if(data.getAttrs().get("height")!=null) height= Integer.parseInt((String)(data.getAttrs().get("height"))); 34 | if(data.getAttrs().get("backgroundcolor")!=null) backgroundcolor= (String) (data.getAttrs().get("backgroundcolor")); 35 | if(data.getAttrs().get("id")!=null) id= (String) (data.getAttrs().get("id")); 36 | if(data.getAttrs().get("hidden")!=null) hidden= Boolean.parseBoolean((String) data.getAttrs().get("hidden")); 37 | if(data.getAttrs().get("alpha")!=null) alpha= Integer.parseInt((String) data.getAttrs().get("alpha")); 38 | if(data.getAttrs().get("backgroundimage")!=null) backgroundimage= (String) (data.getAttrs().get("backgroundimage")); 39 | if(data.getAttrs().get("backgroundscale")!=null) backgroundscale= (String) (data.getAttrs().get("backgroundscale")); 40 | 41 | } 42 | public String getBackgroundimage() { 43 | return backgroundimage; 44 | } 45 | public void setBackgroundimage(String backgroundimage) { 46 | this.backgroundimage = backgroundimage; 47 | } 48 | public String getBackgroundscale() { 49 | return backgroundscale; 50 | } 51 | public void setBackgroundscale(String backgroundscale) { 52 | this.backgroundscale = backgroundscale; 53 | } 54 | public void setHidden(boolean f) 55 | { 56 | hidden=f; 57 | 58 | } 59 | 60 | public String getId() { 61 | return id; 62 | } 63 | 64 | public int getAlpha() { 65 | return alpha; 66 | } 67 | public void setAlpha(int alpha) { 68 | this.alpha = alpha; 69 | } 70 | public void setWidget(AbstractWidget widget) { 71 | this.widget = widget; 72 | } 73 | public void setMargintop(String margintop) { 74 | this.margintop = Utils.toNativWidthHeightValue(margintop, Device.getInstance().getScreenHeight()); 75 | } 76 | public void setMarginleft(String marginleft) { 77 | this.marginleft = Utils.toNativWidthHeightValue(marginleft,Device.getInstance().getScreenWidth()); 78 | } 79 | public void setWidth(String width) { 80 | this.width = Utils.toNativWidthHeightValue(width,Device.getInstance().getScreenWidth()); 81 | } 82 | public void setHeight(String height) { 83 | this.height = Utils.toNativWidthHeightValue(height, Device.getInstance().getScreenHeight()); 84 | } 85 | public void setBackgroundcolor(String backgroundcolor) { 86 | this.backgroundcolor = backgroundcolor; 87 | } 88 | public boolean getHidden() 89 | { 90 | return hidden; 91 | 92 | } 93 | public int getMargintop() 94 | { 95 | 96 | return (Integer) margintop; 97 | } 98 | public int getMarginleft() 99 | { 100 | 101 | return (Integer) marginleft; 102 | } 103 | public String getBackgroundcolor() { 104 | 105 | return backgroundcolor; 106 | } 107 | 108 | public int getWidth() { 109 | // TODO Auto-generated method stub 110 | return width ; 111 | } 112 | 113 | 114 | public int getHeight() { 115 | // TODO Auto-generated method stub 116 | return height; 117 | } 118 | 119 | public AbstractWidget getWidget() 120 | 121 | { 122 | return widget; 123 | } 124 | public AbstractWidget getParenWidget() 125 | { 126 | return parentwidget ; 127 | } 128 | public void setWidget(AbstractWidget widgets,int index) 129 | { 130 | if(index==0) widget=widgets; 131 | parentwidget=widgets; 132 | } 133 | 134 | } 135 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/model/ButtonModel.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.model; 2 | 3 | import cn.iolove.domain.LuaData; 4 | 5 | public class ButtonModel extends TextViewModel { 6 | 7 | public String Onclick=null; 8 | 9 | 10 | public ButtonModel(LuaData data) { 11 | super(data); 12 | 13 | // if(data.getAttrs().get("text")!=null) text= (String) (data.getAttrs().get("text")); 14 | if(data.getAttrs().get("Onclick")!=null) Onclick= (String) (data.getAttrs().get("Onclick")); 15 | 16 | // TODO Auto-generated constructor stub 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/model/CheckBoxModel.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.model; 2 | 3 | import cn.iolove.domain.LuaData; 4 | 5 | public class CheckBoxModel extends UIModel { 6 | public boolean ischeck=false; 7 | public String Onclick=null; 8 | 9 | public boolean getIscheck() { 10 | return ischeck; 11 | } 12 | 13 | public void setIscheck(boolean oncheck) { 14 | ischeck = oncheck; 15 | } 16 | 17 | public CheckBoxModel(LuaData data) { 18 | super(data); 19 | if(data.getAttrs().get("Onclick")!=null) Onclick= (String) (data.getAttrs().get("Onclick")); 20 | 21 | // TODO Auto-generated constructor stub 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/model/EditTextModel.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.model; 2 | 3 | import cn.iolove.domain.LuaData; 4 | 5 | public class EditTextModel extends TextViewModel { 6 | public String type="text"; 7 | 8 | public EditTextModel(LuaData data) { 9 | super(data); 10 | if(data.getAttrs().get("type")!=null) 11 | type= (String) (data.getAttrs().get("type")); 12 | 13 | // TODO Auto-generated constructor stub 14 | } 15 | 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/model/TextViewModel.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.model; 2 | 3 | import cn.iolove.domain.LuaData; 4 | 5 | public class TextViewModel extends UIModel { 6 | public String textcolor="#000000"; 7 | public String text=null; 8 | public int fontsize=18; 9 | public TextViewModel(LuaData data) { 10 | super(data); 11 | if(data.getAttrs().get("textcolor")!=null) textcolor= (String) (data.getAttrs().get("textcolor")); 12 | if(data.getAttrs().get("text")!=null) text= (String) (data.getAttrs().get("text")); 13 | if(data.getAttrs().get("fontsize")!=null) fontsize= Integer.parseInt((String) (data.getAttrs().get("fontsize"))); 14 | 15 | } 16 | public void setText(String texts) 17 | { 18 | text=texts; 19 | } 20 | public String getTextcolor() { 21 | return textcolor; 22 | } 23 | public void setTextcolor(String textcolor) { 24 | this.textcolor = textcolor; 25 | } 26 | public String getText() { 27 | return text; 28 | } 29 | 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/model/UIModel.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.model; 2 | 3 | import cn.iolove.domain.LuaData; 4 | 5 | public class UIModel extends AbstractModel { 6 | 7 | 8 | 9 | 10 | public UIModel(LuaData data) { 11 | super(data); 12 | // TODO Auto-generated constructor stub 13 | } 14 | 15 | 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/model/ViewModel.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.model; 2 | 3 | 4 | import cn.iolove.domain.LuaData; 5 | import cn.iolove.luajava.LuaObject; 6 | import cn.iolove.lui.widget.ViewWidget; 7 | 8 | public class ViewModel extends UIModel{ 9 | 10 | public ViewModel(LuaData data) { 11 | super(data); 12 | // TODO Auto-generated constructor stub 13 | } 14 | public void addChild(LuaObject obj) 15 | { 16 | ((ViewWidget)widget)._LUA_addChild(obj); 17 | } 18 | public void removeChild(AbstractModel models) 19 | { 20 | 21 | 22 | 23 | ((ViewWidget)widget)._LUA_removeChild(models.id); 24 | } 25 | public void removaAllChild() 26 | { 27 | ((ViewWidget)widget).removeAllChild(); 28 | } 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/model/function/LuaModelFucntion.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.model.function; 2 | 3 | import cn.iolove.luajava.LuaObject; 4 | 5 | 6 | 7 | public interface LuaModelFucntion { 8 | 9 | public void addChild(LuaObject obj); 10 | public void removeChild(LuaObject obj); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/model/function/ModelFunctionImp.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.model.function; 2 | 3 | import cn.iolove.luajava.LuaObject; 4 | 5 | 6 | 7 | public class ModelFunctionImp implements LuaModelFucntion{ 8 | 9 | @Override 10 | public void addChild(LuaObject obj) { 11 | 12 | 13 | } 14 | 15 | @Override 16 | public void removeChild(LuaObject obj) { 17 | 18 | 19 | } 20 | 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/page/NormalPagFragement.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.page; 2 | 3 | 4 | import cn.iolove.debug.LOG; 5 | import cn.iolove.luajava.LuaException; 6 | import cn.iolove.lui.context.RuntimeContext; 7 | import cn.iolove.lui.service.PageService; 8 | import cn.iolove.lui.utils.PageFactory; 9 | import cn.iolove.lui.view.LuiView; 10 | import android.annotation.SuppressLint; 11 | import android.os.Bundle; 12 | import android.support.v4.app.Fragment; 13 | import android.util.Log; 14 | import android.view.LayoutInflater; 15 | import android.view.View; 16 | import android.view.ViewGroup; 17 | import android.widget.FrameLayout; 18 | import android.widget.RelativeLayout; 19 | 20 | 21 | 22 | 23 | 24 | @SuppressLint("ValidFragment") 25 | public class NormalPagFragement extends Fragment { 26 | FrameLayout mContainer; 27 | RelativeLayout mParent; 28 | private PageCircle page; 29 | private String name; 30 | public NormalPagFragement(PageCircle names) throws LuaException 31 | { 32 | page=names; 33 | 34 | page.Oncreate(); 35 | LOG.i(this, "onCreate : "+page.getPageName()); 36 | 37 | } 38 | 39 | 40 | @Override 41 | public void onCreate(Bundle savedInstanceState) { 42 | // TODO Auto-generated method stub 43 | super.onCreate(savedInstanceState); 44 | 45 | } 46 | @Override 47 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 48 | Bundle savedInstanceState) { 49 | // TODO Auto-generated method stub 50 | super.onCreateView(inflater, container, savedInstanceState); 51 | mParent = (RelativeLayout)(getActivity().findViewById(0x1237156)); 52 | LOG.i(this, "exe..Oncreated.."+ page.getPageName()); 53 | if (mContainer == null) 54 | { 55 | mContainer = new LuiView(getActivity()); 56 | 57 | 58 | mContainer.addView(page.getRootView()); 59 | 60 | 61 | 62 | }else 63 | { 64 | ViewGroup parent = (ViewGroup) mContainer.getParent(); 65 | if (parent != null) { 66 | parent.removeView(mContainer); 67 | } 68 | } 69 | 70 | return mContainer; 71 | } 72 | @Override 73 | public void onViewCreated(View view, Bundle savedInstanceState) { 74 | // TODO Auto-generated method stub 75 | super.onViewCreated(view, savedInstanceState); 76 | page.OnFronted(); 77 | LOG.i(this, "OnFronted : "+page.getPageName()); 78 | } 79 | @Override 80 | public void onPause() { 81 | // TODO Auto-generated method stub 82 | super.onPause(); 83 | page.OnBackend(); 84 | LOG.i(this, "OnBackend : "+page.getPageName()); 85 | } 86 | @Override 87 | public void onDestroy() { 88 | // TODO Auto-generated method stub 89 | super.onDestroy(); 90 | LOG.i(this, "onDestroy : "+page.getPageName()); 91 | } 92 | 93 | } 94 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/page/Page.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.page; 2 | 3 | 4 | 5 | import android.view.View; 6 | 7 | import cn.iolove.luajava.LuaException; 8 | import cn.iolove.luajava.LuaState; 9 | import cn.iolove.luajava.LuaStateFactory; 10 | import cn.iolove.lui.lua.LuaHelper; 11 | import cn.iolove.lui.service.LuaService; 12 | import cn.iolove.lui.view.LuiView; 13 | import cn.iolove.lui.widget.AbstractWidget; 14 | 15 | public class Page implements PageCircle { 16 | private AbstractWidget root; 17 | private LuaState luastate; 18 | private String pagename; 19 | 20 | /** 21 | * @param args 22 | */ 23 | public Page(String name) 24 | { 25 | LuaState mLuaState = LuaStateFactory.newLuaState(); 26 | pagename=name; 27 | 28 | mLuaState.openLibs(); 29 | luastate=mLuaState; 30 | 31 | } 32 | public String getPageName() 33 | { 34 | return pagename; 35 | } 36 | public LuaState getState() 37 | { 38 | return luastate; 39 | } 40 | public void Refresh() 41 | { 42 | if(root!=null) 43 | root.Refresh(); 44 | } 45 | public LuiView getRootView() 46 | { 47 | return (LuiView) root.getInnerView(); 48 | } 49 | @Override 50 | public void Oncreate() throws LuaException { 51 | // TODO Auto-generated method stub 52 | root = LuaService.getInstance().getWidget(LuaHelper.loadScript(luastate,pagename)); 53 | } 54 | @Override 55 | public void onDestroy() { 56 | luastate.close(); 57 | root.Ondestroy(); 58 | System.gc(); 59 | 60 | 61 | } 62 | @Override 63 | public void OnFronted() { 64 | LuaService.getInstance().excuteLuaFunctionCallBack("OnFronted", new Object[]{}, 0); 65 | 66 | 67 | 68 | } 69 | @Override 70 | public void OnBackend() { 71 | // TODO Auto-generated method stub 72 | 73 | } 74 | @Override 75 | public boolean OnNavBack() { 76 | LuaService.getInstance().excuteLuaFunctionCallBack("OnNavBack", new Object[]{}, 0); 77 | 78 | return false; 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/page/PageCircle.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.page; 2 | 3 | 4 | 5 | import cn.iolove.luajava.LuaException; 6 | import cn.iolove.lui.view.LuiView; 7 | 8 | public interface PageCircle { 9 | public void Oncreate() throws LuaException; 10 | public void onDestroy(); 11 | public void OnFronted(); 12 | public LuiView getRootView(); 13 | public String getPageName(); 14 | public abstract void OnBackend(); 15 | 16 | public abstract boolean OnNavBack(); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/sandbox/AppSandbox.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.sandbox; 2 | 3 | public class AppSandbox { 4 | private AppSandboxCallback bs; 5 | public interface AppSandboxCallback 6 | { 7 | abstract public void pushPage(String obj); 8 | abstract public void switchPage(String obj); 9 | abstract public void popPage(); 10 | } 11 | private AppSandbox(){}; 12 | private static AppSandbox obj=new AppSandbox(); 13 | public static AppSandbox getInstance(){return obj;} 14 | public void init(AppSandboxCallback b) 15 | { 16 | bs=b; 17 | 18 | } 19 | public void popPage() 20 | { 21 | bs.popPage(); 22 | } 23 | public void switchPage(String obj) 24 | { 25 | bs.switchPage(obj); 26 | } 27 | public void pushPage(String obj) 28 | { 29 | bs.pushPage(obj); 30 | 31 | 32 | } 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/sandbox/PageSandbox.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.sandbox; 2 | 3 | public class PageSandbox { 4 | 5 | 6 | } 7 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/service/IService.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.service; 2 | 3 | 4 | 5 | import cn.iolove.luajava.LuaObject; 6 | import cn.iolove.luajava.LuaState; 7 | import cn.iolove.lui.thread.Method; 8 | import cn.iolove.lui.thread.ThreadFactory; 9 | 10 | public abstract class IService { 11 | 12 | 13 | public abstract void fail(Object[] agrs); 14 | public abstract void success(Object[] agrs); 15 | LuaObject succFunc; 16 | LuaObject failFunc; 17 | LuaObject endedFunc; 18 | private LuaState stat =PageService.getInstance().getTopPage().getState(); 19 | public void work( Method m,LuaObject succ,LuaObject fail,LuaObject end) 20 | { 21 | ThreadFactory.getWorkThread(new Method() { 22 | 23 | @Override 24 | public void Work() { 25 | 26 | } 27 | }).start(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/service/ImageService.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.service; 2 | 3 | import cn.iolove.cache.ImageCache; 4 | 5 | public class ImageService { 6 | private static ImageService obj = new ImageService(); 7 | private ImageService(){}; 8 | 9 | public static ImageCache imcache = new ImageCache((int) (Runtime.getRuntime().maxMemory()/8)); 10 | public ImageService getInstance() 11 | { 12 | return obj; 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/service/LuaService.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.service; 2 | 3 | 4 | 5 | import android.util.Log; 6 | 7 | import cn.iolove.debug.LOG; 8 | import cn.iolove.domain.LuaData; 9 | 10 | import cn.iolove.luajava.LuaException; 11 | import cn.iolove.luajava.LuaObject; 12 | import cn.iolove.luajava.LuaState; 13 | import cn.iolove.lui.context.RuntimeContext; 14 | import cn.iolove.lui.lua.LuaHelper; 15 | import cn.iolove.lui.thread.Method; 16 | import cn.iolove.lui.thread.ThreadFactory; 17 | import cn.iolove.lui.thread.WorkThread; 18 | import cn.iolove.lui.utils.WidgetFactory; 19 | import cn.iolove.lui.widget.AbstractWidget; 20 | 21 | public class LuaService { 22 | 23 | private static LuaService obj = new LuaService(); 24 | private LuaService(){ 25 | 26 | } 27 | public static LuaService getInstance(){return obj;} 28 | class log 29 | { 30 | public void i(String text) 31 | { 32 | LOG.i(obj, text); 33 | } 34 | } 35 | public void init() 36 | { 37 | pushGlobalObject("Log",new log()); 38 | 39 | } 40 | public void error() 41 | { 42 | RuntimeContext.showLuaError(getLuaState().toString(-1)); 43 | } 44 | public LuaState getLuaState() 45 | { 46 | return PageService.getInstance().getTopPage().getState(); 47 | } 48 | public void pushGlobalObject(String name,Object obj) 49 | { 50 | LuaHelper.setGlobalObject(getLuaState(), name, obj); 51 | } 52 | public void removeGlobalObject(String name) 53 | { 54 | LuaHelper.removeGlobalObject(getLuaState(), name); 55 | } 56 | public void excuteLuaFunctionCallBack(final String mehodName,final Object[] args,final int returnnumber) 57 | { 58 | RuntimeContext.runOnWorkThread(ThreadFactory.getWorkThread(new Method() { 59 | 60 | @Override 61 | public void Work() { 62 | 63 | RuntimeContext.runOnUiThread(new Runnable() { 64 | 65 | @Override 66 | public void run() { 67 | try { 68 | LuaHelper.excuteLuaFunction(PageService.getInstance().getTopPage().getState(), mehodName, args, returnnumber); 69 | } catch (LuaException e) { 70 | // TODO Auto-generated catch block 71 | if(mehodName.equals("OnNavBack")||mehodName.equals("OnFronted")) 72 | { 73 | 74 | } 75 | else 76 | { 77 | RuntimeContext.showLuaError("mehodName:"+mehodName+" "+e.getMessage()); 78 | } 79 | e.printStackTrace(); 80 | return; 81 | } 82 | 83 | PageService.getInstance().Refresh(); 84 | } 85 | }); 86 | } 87 | })); 88 | 89 | 90 | } 91 | public AbstractWidget getWidget(LuaData data) 92 | { 93 | 94 | return WidgetFactory.createWidgetTree(data); 95 | } 96 | public AbstractWidget getWidget(LuaObject obj) throws LuaException 97 | { 98 | LuaData data = LuaHelper.toLuaDataByLuaScript(getLuaState(), obj); 99 | return WidgetFactory.createWidgetTree(data); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/service/PageService.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.service; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | 7 | import cn.iolove.luajava.LuaException; 8 | import cn.iolove.lui.page.Page; 9 | 10 | import cn.iolove.lui.view.LuiView; 11 | 12 | public class PageService implements PageServiceInterface { 13 | private PageService() 14 | {}; 15 | private static PageService obj = new PageService(); 16 | public static PageService getInstance(){return obj;} 17 | private static Stack StackPage = new Stack() ; 18 | 19 | public static interface PageControolerCallback 20 | { 21 | public abstract void pushPage(LuiView v); 22 | 23 | 24 | } 25 | 26 | public void Refresh() 27 | { 28 | if(!StackPage.isEmpty()) 29 | getTopPage().Refresh(); 30 | } 31 | public Page getTopPage() 32 | { 33 | return StackPage.peek(); 34 | 35 | } 36 | public int getStackSize() 37 | { 38 | return StackPage.size(); 39 | } 40 | public Page getSecontPage() 41 | { 42 | if(StackPage.size()<2) return null; 43 | 44 | return StackPage.get(StackPage.indexOf(StackPage.peek())-1); 45 | 46 | } 47 | public void start() throws LuaException 48 | { 49 | 50 | //StackPage.push(CreateNewPage("main")); 51 | 52 | 53 | //getTopPage().Oncreate(); 54 | } 55 | public Page CreateNewPage(String name) 56 | { 57 | Page page = new Page(name); 58 | return page; 59 | 60 | } 61 | @Override 62 | public void pushPage(Page obj) { 63 | StackPage.push(obj); 64 | LuaService.getInstance().init(); 65 | Registry.getInstance(); 66 | Registry.getInstance().pushServiceInLua(); 67 | 68 | 69 | 70 | } 71 | @Override 72 | public void switchPage(Page obj) { 73 | // TODO Auto-generated method stub 74 | 75 | } 76 | @Override 77 | public void popPage() { 78 | StackPage.remove(StackPage.peek()); 79 | // TODO Auto-generated method stub 80 | 81 | } 82 | } -------------------------------------------------------------------------------- /src/cn/iolove/lui/service/PageServiceInterface.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.service; 2 | 3 | import cn.iolove.lui.page.Page; 4 | 5 | public interface PageServiceInterface { 6 | abstract public void pushPage(Page obj); 7 | abstract public void switchPage(Page obj); 8 | abstract public void popPage(); 9 | } 10 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/service/Registry.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.service; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import cn.iolove.lui.lua.LuaHelper; 7 | import cn.iolove.lui.sandbox.AppSandbox; 8 | 9 | public class Registry { 10 | 11 | private static Registry obj = new Registry(); 12 | private Registry(){} 13 | public static Registry getInstance(){return obj;} 14 | private static Map ServiceMapping = new HashMap(); 15 | public RegistryAdapter a=null; 16 | public interface RegistryAdapter 17 | { 18 | public void addRegister(Registry r); 19 | } 20 | public void bindAdapter(RegistryAdapter adp) 21 | { 22 | a=adp; 23 | 24 | } 25 | 26 | public void registerInlua(String qName) 27 | { 28 | Object obj= ServiceMapping.get(qName); 29 | LuaHelper.setGlobalObject(PageService.getInstance().getTopPage().getState(), qName, obj); 30 | } 31 | public Object register(String qName) 32 | { 33 | Object obj= ServiceMapping.get(qName); 34 | return obj; 35 | 36 | } 37 | public void register(String qName,Object obj) 38 | { 39 | ServiceMapping.put(qName, obj); 40 | 41 | } 42 | public void pushServiceInLua() 43 | { 44 | register("Registry",getInstance()); 45 | registerInlua("Registry"); 46 | register("App",AppSandbox.getInstance()); 47 | registerInlua("App"); 48 | if(a!=null) 49 | a.addRegister(obj); 50 | } 51 | 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/thread/Method.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.thread; 2 | public interface Method{ 3 | public abstract void Work(); 4 | 5 | 6 | } -------------------------------------------------------------------------------- /src/cn/iolove/lui/thread/ThreadFactory.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.thread; 2 | 3 | public class ThreadFactory { 4 | 5 | /** 6 | * @param args 7 | */ 8 | public static WorkThread getWorkThread(Method m) 9 | { 10 | WorkThread obj = new WorkThread(); 11 | obj.setMehod(m); 12 | return obj; 13 | 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/thread/WorkThread.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.thread; 2 | 3 | /* 4 | getWorkThread.setMehod(new WorkThread.Method) 5 | */ 6 | public class WorkThread extends Thread { 7 | 8 | 9 | public Method m; 10 | public boolean busy; 11 | public Thread setMehod(Method ms) 12 | { 13 | m=ms; 14 | return this; 15 | 16 | } 17 | public void run() 18 | { 19 | busy=true; 20 | m.Work(); 21 | busy=false; 22 | 23 | 24 | } 25 | 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/utils/BitmapUtils.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.utils; 2 | 3 | import java.io.IOException; 4 | 5 | import cn.iolove.debug.LOG; 6 | import cn.iolove.lui.context.RuntimeContext; 7 | import cn.iolove.lui.service.ImageService; 8 | import cn.iolove.lui.service.PageService; 9 | import cn.iolove.lui.thread.Method; 10 | import cn.iolove.lui.thread.ThreadFactory; 11 | import android.graphics.Bitmap; 12 | import android.graphics.BitmapFactory; 13 | import android.graphics.drawable.BitmapDrawable; 14 | import android.graphics.drawable.Drawable; 15 | import android.graphics.drawable.PaintDrawable; 16 | import android.util.Log; 17 | 18 | public class BitmapUtils { 19 | public static synchronized void loadImage(final String path,final int reqHeight,final int reqWidth,final LoadImageListener lis) 20 | { 21 | Bitmap bmp = ImageService.imcache.getBitmapFromCache(path); 22 | if(bmp!=null) 23 | { 24 | Drawable drawable= new BitmapDrawable(bmp); 25 | 26 | 27 | lis.succeed(drawable); 28 | return; 29 | }else 30 | { 31 | loadDiskImage(path,reqHeight,reqWidth,lis); 32 | } 33 | 34 | 35 | 36 | } 37 | private static void loadDiskImage(final String path,final int reqHeight,final int reqWidth,final LoadImageListener lis) 38 | { 39 | ThreadFactory.getWorkThread(new Method() { 40 | 41 | @Override 42 | public void Work() { 43 | try { 44 | android.graphics.BitmapFactory.Options options = new android.graphics.BitmapFactory.Options(); 45 | options.inJustDecodeBounds = true; 46 | if(path==null) {lis.fail();return;} 47 | // BitmapFactory. 48 | BitmapFactory.Options maskOpts = new BitmapFactory.Options(); 49 | maskOpts.inJustDecodeBounds=true; 50 | maskOpts.inPreferredConfig = Bitmap.Config.ALPHA_8; 51 | 52 | Bitmap mask1 = BitmapFactory.decodeStream(RuntimeContext.getInstance().rl.getActivityContext().getAssets().open("lua/"+path), null, maskOpts); 53 | maskOpts.inSampleSize = calculateInSampleSize(maskOpts, reqWidth, reqHeight); 54 | LOG.i(BitmapUtils.class, "image : "+path+" Height"+reqHeight); 55 | maskOpts.inJustDecodeBounds=false; 56 | maskOpts.inPurgeable = true; 57 | maskOpts.inInputShareable = true; 58 | Bitmap mask2 = BitmapFactory.decodeStream(RuntimeContext.getInstance().rl.getActivityContext().getAssets().open("lua/"+path), null, maskOpts); 59 | 60 | Drawable drawable= new BitmapDrawable(mask2); 61 | ImageService.imcache.putBitmapToCache(path, mask2); 62 | 63 | 64 | lis.succeed(drawable); 65 | 66 | } catch (IOException e) { 67 | // TODO Auto-generated catch block 68 | e.printStackTrace(); 69 | lis.fail(); 70 | } 71 | 72 | } 73 | }).start(); 74 | } 75 | static int calculateInSampleSize( BitmapFactory.Options options, int reqWidth, int reqHeight) { 76 | int inSampleSize = 1; //Default subsampling size 77 | // See if image raw height and width is bigger than that of required view 78 | if (options.outHeight > reqHeight || options.outWidth > reqWidth) { 79 | //bigger 80 | final int halfHeight = options.outHeight / 2; 81 | final int halfWidth = options.outWidth / 2; 82 | // Calculate the largest inSampleSize value that is a power of 2 and keeps both 83 | // height and width larger than the requested height and width. 84 | while ((halfHeight / inSampleSize) > reqHeight 85 | && (halfWidth / inSampleSize) > reqWidth) { 86 | inSampleSize *= 2; 87 | } 88 | } 89 | return inSampleSize; 90 | } 91 | public static Drawable formatImage(BitmapDrawable drawable,String imageScale) 92 | { 93 | if (imageScale.equals("none")) 94 | drawable.setGravity(51); 95 | else 96 | if (imageScale.equals("center")) 97 | drawable.setGravity(17); 98 | else 99 | if (imageScale.equals("fill")) 100 | { 101 | drawable.setGravity(119); 102 | } 103 | if (imageScale.equals("repeat")) 104 | { 105 | drawable.setTileModeXY(android.graphics.Shader.TileMode.REPEAT, android.graphics.Shader.TileMode.REPEAT); 106 | drawable.setDither(true); 107 | } 108 | return drawable; 109 | 110 | 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/utils/LoadImageListener.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.utils; 2 | 3 | import android.graphics.drawable.Drawable; 4 | 5 | public interface LoadImageListener { 6 | public void succeed(Drawable rl); 7 | public void fail(); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/utils/PageFactory.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.utils; 2 | 3 | import cn.iolove.lui.page.Page; 4 | 5 | public class PageFactory { 6 | public static Page CreatePage(String pagename) 7 | { 8 | return new Page(pagename); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/utils/Utils.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.utils; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.util.Iterator; 6 | 7 | import org.apache.http.util.EncodingUtils; 8 | import org.json.JSONArray; 9 | import org.json.JSONException; 10 | import org.json.JSONObject; 11 | 12 | import cn.iolove.domain.Device; 13 | import cn.iolove.domain.LuaData; 14 | import cn.iolove.lui.context.RuntimeContext; 15 | 16 | import android.content.Context; 17 | 18 | public class Utils { 19 | 20 | /** 21 | * @param args 22 | */ 23 | public static LuaData getMap4Json(String jsonString) { 24 | 25 | LuaData root = new LuaData(); 26 | JSONObject jsonObject = null; 27 | 28 | try { 29 | jsonObject = new JSONObject(jsonString); 30 | 31 | Iterator keyIter = jsonObject.keys(); 32 | String key; 33 | Object value; 34 | 35 | 36 | while (keyIter.hasNext()) { 37 | 38 | key = (String) keyIter.next(); 39 | if(key.equals("subitems")) 40 | { 41 | JSONArray arr = new JSONArray(jsonObject.get(key).toString()); 42 | for (int i = 0; i < arr.length(); i++) { 43 | JSONObject temp = (JSONObject) arr.get(i); 44 | root.addChild( getMap4Json(temp.toString())); 45 | } 46 | 47 | } 48 | else 49 | { 50 | value = jsonObject.get(key); 51 | if(key.toLowerCase().equals("marginleft")||key.toLowerCase().equals("width")) 52 | { 53 | String v = jsonObject.get(key).toString(); 54 | v=v.substring(0, v.length()-1); 55 | int relativev= Integer.parseInt(v); 56 | int w=Device.getInstance().getScreenWidth(); 57 | int realv=(w*relativev)/1000; 58 | 59 | root.addAttrs(key,new Integer(realv).toString()); 60 | } 61 | else 62 | if(key.toLowerCase().equals("margintop")||key.toLowerCase().equals("height")) 63 | { 64 | String v = jsonObject.get(key).toString(); 65 | v=v.substring(0, v.length()-1); 66 | int relativev= Integer.parseInt(v); 67 | int h=Device.getInstance().getScreenHeight(); 68 | int realv=(h*relativev)/1000; 69 | 70 | root.addAttrs(key,new Integer(realv).toString()); 71 | 72 | } 73 | else 74 | 75 | root.addAttrs(key, jsonObject.get(key).toString()); 76 | } 77 | } 78 | } catch (JSONException e) { 79 | // TODO Auto-generated catch block 80 | e.printStackTrace(); 81 | RuntimeContext.getInstance().showLuaError(e.getMessage()); 82 | } 83 | 84 | return root; 85 | } 86 | public static String loadAssetsString(String resPath,Context co) { 87 | InputStream isread = null; 88 | byte[] luaByte = new byte[1]; 89 | try { 90 | isread = co.getAssets().open(resPath); 91 | int len = isread.available(); 92 | luaByte = new byte[len]; 93 | isread.read(luaByte); 94 | } catch (IOException e1) { 95 | e1.printStackTrace(); 96 | } finally { 97 | if (isread != null) { 98 | try { 99 | isread.close(); 100 | } catch (IOException e) { 101 | e.printStackTrace(); 102 | } 103 | } 104 | } 105 | return EncodingUtils.getString(luaByte, "UTF-8"); 106 | } 107 | public static int toNativWidthHeightValue(String v,int realwOrH) 108 | { 109 | v=v.substring(0, v.length()-1); 110 | int relativev= Integer.parseInt(v); 111 | 112 | int realv=(realwOrH*relativev)/1000; 113 | return realv; 114 | 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/utils/WidgetFactory.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/src/cn/iolove/lui/utils/WidgetFactory.java -------------------------------------------------------------------------------- /src/cn/iolove/lui/view/LuiView.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.view; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import cn.iolove.lui.model.AbstractModel; 7 | 8 | import android.content.Context; 9 | import android.view.DragEvent; 10 | import android.view.KeyEvent; 11 | import android.view.MotionEvent; 12 | import android.view.View; 13 | 14 | import android.widget.FrameLayout; 15 | 16 | public class LuiView extends FrameLayout { 17 | 18 | 19 | 20 | public LuiView(Context context) { 21 | super(context); 22 | 23 | // TODO Auto-generated constructor stub 24 | } 25 | 26 | /** 27 | * @param args 28 | */ 29 | 30 | @Override 31 | public void addView(View child) { 32 | // TODO Auto-generated method stub 33 | super.addView(child); 34 | 35 | } 36 | @Override 37 | public void removeView(View view) { 38 | // TODO Auto-generated method stub 39 | super.removeView(view); 40 | 41 | } 42 | @Override 43 | public void removeAllViews() { 44 | // TODO Auto-generated method stub 45 | super.removeAllViews(); 46 | 47 | } 48 | @Override 49 | public boolean dispatchTouchEvent(MotionEvent ev) { 50 | // TODO Auto-generated method stub 51 | super.dispatchTouchEvent(ev); 52 | return true ; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/view/ViewFactory.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.view; 2 | 3 | public class ViewFactory { 4 | 5 | /** 6 | * @param args 7 | */ 8 | public static LuiView createView() 9 | { 10 | 11 | return null; 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/widget/AbstractWidget.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/src/cn/iolove/lui/widget/AbstractWidget.java -------------------------------------------------------------------------------- /src/cn/iolove/lui/widget/ButtonWidget.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rokerdou/lui/6ab9c16f4c9a78014fb32e79ae13127d3385a97d/src/cn/iolove/lui/widget/ButtonWidget.java -------------------------------------------------------------------------------- /src/cn/iolove/lui/widget/CheckBoxWidget.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.widget; 2 | 3 | import cn.iolove.debug.LOG; 4 | import cn.iolove.lui.context.RuntimeContext; 5 | import cn.iolove.lui.model.CheckBoxModel; 6 | import cn.iolove.lui.model.UIModel; 7 | import cn.iolove.lui.service.LuaService; 8 | import android.view.View; 9 | import android.view.View.OnClickListener; 10 | import android.widget.CheckBox; 11 | import android.widget.CompoundButton; 12 | import android.widget.CompoundButton.OnCheckedChangeListener; 13 | 14 | public class CheckBoxWidget extends ViewWidget { 15 | 16 | private CheckBox cb=null; 17 | final CheckBoxModel mol =(CheckBoxModel)model; 18 | public CheckBoxWidget(UIModel m) { 19 | 20 | super(m); 21 | 22 | cb= new CheckBox(RuntimeContext.getInstance().rl.getActivityContext()); 23 | cb.setOnClickListener(new OnClickListener() { 24 | 25 | @Override 26 | public void onClick(View arg0) { 27 | cb.setChecked(!mol.ischeck); 28 | mol.ischeck=!mol.ischeck; 29 | if(mol.Onclick!=null) 30 | { 31 | LuaService.getInstance().excuteLuaFunctionCallBack(mol.Onclick, new Object[]{}, 0); 32 | 33 | 34 | } 35 | 36 | } 37 | }); 38 | lv.addView(cb); 39 | 40 | // TODO Auto-generated constructor stub 41 | } 42 | 43 | @Override 44 | public View getInnerView() { 45 | // TODO Auto-generated method stub 46 | return lv; 47 | } 48 | @Override 49 | protected void loadModel() { 50 | // TODO Auto-generated method stub 51 | WidgetUtils.loadModel(model, this); 52 | super.loadModel(); 53 | lv.getBackground().setAlpha(0); 54 | 55 | if(cb!=null) 56 | cb.setChecked(mol.ischeck); 57 | 58 | 59 | } 60 | 61 | @Override 62 | public void Ondestroy() { 63 | // TODO Auto-generated method stub 64 | 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/widget/EditTextWidget.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.widget; 2 | 3 | import cn.iolove.lui.context.RuntimeContext; 4 | import cn.iolove.lui.model.ButtonModel; 5 | import cn.iolove.lui.model.EditTextModel; 6 | import cn.iolove.lui.model.UIModel; 7 | import android.graphics.Color; 8 | import android.text.Editable; 9 | import android.text.InputType; 10 | import android.text.TextWatcher; 11 | import android.util.TypedValue; 12 | import android.view.View; 13 | import android.widget.Button; 14 | import android.widget.EditText; 15 | import android.widget.TextView; 16 | 17 | public class EditTextWidget extends AbstractWidget { 18 | 19 | private EditText et; 20 | public EditTextWidget(UIModel m) { 21 | super(m); 22 | et = new EditText(RuntimeContext.getInstance().rl.getActivityContext()); 23 | loadModel(); 24 | // TODO Auto-generated constructor stub 25 | } 26 | 27 | @Override 28 | public View getInnerView() { 29 | // TODO Auto-generated method stub 30 | return et; 31 | } 32 | 33 | @Override 34 | protected void loadModel() { 35 | WidgetUtils.loadModel(model, this); 36 | 37 | final EditTextModel bm = (EditTextModel)model; 38 | String str = ((EditTextModel)model).text; 39 | 40 | if(str!=null) 41 | { 42 | et.setText(str); 43 | 44 | } 45 | 46 | et.setTextColor(Color.parseColor(((EditTextModel)model).textcolor)); 47 | et.setTextSize(TypedValue.COMPLEX_UNIT_DIP, bm.fontsize); 48 | if(bm.type.equals("password")) 49 | { 50 | 51 | et.setInputType(InputType.TYPE_CLASS_TEXT|InputType.TYPE_TEXT_VARIATION_PASSWORD); 52 | } 53 | et.addTextChangedListener(new TextWatcher() { 54 | 55 | @Override 56 | public void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { 57 | // TODO Auto-generated method stub 58 | 59 | } 60 | 61 | @Override 62 | public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, 63 | int arg3) { 64 | // TODO Auto-generated method stub 65 | 66 | } 67 | 68 | @Override 69 | public void afterTextChanged(Editable arg0) { 70 | bm.text = et.getText().toString(); 71 | 72 | 73 | } 74 | }); 75 | super.loadModel(); 76 | reloadBackground(et); 77 | // TODO Auto-generated method stub 78 | 79 | } 80 | 81 | @Override 82 | public void Ondestroy() { 83 | // TODO Auto-generated method stub 84 | et.setBackgroundDrawable(null); 85 | et=null; 86 | 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/widget/ScrollViewWidget.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.widget; 2 | 3 | 4 | 5 | import android.view.View; 6 | import android.widget.ScrollView; 7 | import cn.iolove.luajava.LuaObject; 8 | import cn.iolove.lui.context.RuntimeContext; 9 | import cn.iolove.lui.model.UIModel; 10 | 11 | public class ScrollViewWidget extends AbstractWidget { 12 | 13 | private ScrollView scroll ; 14 | public ScrollViewWidget(UIModel m) { 15 | super(m); 16 | 17 | scroll = new ScrollView(RuntimeContext.getInstance().rl.getActivityContext()); 18 | // TODO Auto-generated constructor stub 19 | } 20 | @Override 21 | protected AbstractWidget findWidget(String ids) { 22 | // TODO Auto-generated method stub 23 | return super.findWidget(ids); 24 | } 25 | @Override 26 | public View getInnerView() { 27 | // TODO Auto-generated method stub 28 | return null; 29 | } 30 | @Override 31 | public void Ondestroy() { 32 | // TODO Auto-generated method stub 33 | 34 | } 35 | 36 | public void _LUA_addChild(LuaObject obj) { 37 | // TODO Auto-generated method stub 38 | 39 | } 40 | 41 | protected void addChild(AbstractWidget child) { 42 | // TODO Auto-generated method stub 43 | 44 | } 45 | 46 | public void _LUA_removeChild(String id) { 47 | // TODO Auto-generated method stub 48 | 49 | } 50 | 51 | protected void removeChild(AbstractWidget w) { 52 | 53 | 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/widget/UIGroupInterface.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.widget; 2 | 3 | import cn.iolove.luajava.LuaObject; 4 | 5 | 6 | 7 | public interface UIGroupInterface { 8 | public void _LUA_addChild(LuaObject obj) ; 9 | void addChild(AbstractWidget child); 10 | abstract AbstractWidget findWidget(String ids); 11 | public void _LUA_removeChild(final String id); 12 | void removeChild(AbstractWidget w); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/cn/iolove/lui/widget/ViewWidget.java: -------------------------------------------------------------------------------- 1 | package cn.iolove.lui.widget; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | 7 | 8 | import cn.iolove.luajava.LuaException; 9 | import cn.iolove.luajava.LuaObject; 10 | import cn.iolove.lui.context.RuntimeContext; 11 | 12 | import cn.iolove.lui.lua.LuaHelper; 13 | import cn.iolove.lui.model.UIModel; 14 | import cn.iolove.lui.service.LuaService; 15 | import cn.iolove.lui.utils.BitmapUtils; 16 | import cn.iolove.lui.utils.LoadImageListener; 17 | import cn.iolove.lui.view.LuiView; 18 | import android.graphics.Color; 19 | import android.graphics.drawable.BitmapDrawable; 20 | import android.graphics.drawable.ColorDrawable; 21 | import android.graphics.drawable.Drawable; 22 | import android.util.Log; 23 | import android.view.View; 24 | import android.view.ViewGroup.LayoutParams; 25 | import android.view.ViewGroup.MarginLayoutParams; 26 | import android.widget.FrameLayout; 27 | 28 | public class ViewWidget extends AbstractWidget { 29 | 30 | public ViewWidget(UIModel m) { 31 | super(m); 32 | lv = new LuiView(RuntimeContext.getInstance().rl.getActivityContext()); 33 | loadModel(); 34 | //lv.setVerticalScrollBarEnabled(true); 35 | 36 | 37 | 38 | } 39 | 40 | protected LuiView lv; 41 | protected List subitems=new ArrayList(); 42 | public void _LUA_addChild(LuaObject obj) 43 | { 44 | final AbstractWidget childWidget; 45 | try { 46 | childWidget = LuaService.getInstance().getWidget(obj); 47 | childWidget.model.parentwidget=this; 48 | RuntimeContext.runOnUiThread(new Runnable() { 49 | 50 | @Override 51 | public void run() { 52 | addChild(childWidget); 53 | 54 | } 55 | }); 56 | 57 | } catch (LuaException e) { 58 | // TODO Auto-generated catch block 59 | e.printStackTrace(); 60 | RuntimeContext.showLuaError(e.getMessage()); 61 | } 62 | 63 | } 64 | 65 | public void addChild(AbstractWidget child) 66 | { 67 | child.loadModel(); 68 | lv.addView(child.getInnerView()); 69 | 70 | 71 | subitems.add(child); 72 | 73 | } 74 | @Override 75 | public View getInnerView() { 76 | // TODO Auto-generated method stub 77 | return lv; 78 | } 79 | 80 | protected AbstractWidget findWidget(String ids) 81 | { 82 | if(ids.equals(id)) return this; 83 | int i=0; 84 | for(i=0;i