@@ -109,7 +109,28 @@ private void extendsLuaView(final LuaView luaView) {
109109 * 加载数据
110110 */
111111 public void loadScript (final LuaView luaView ) {
112- luaView .load (getLuaUri (), new LuaScriptLoader .ScriptExecuteCallback () {
112+ // luaView.load(getLuaUri(), new LuaScriptLoader.ScriptExecuteCallback() {
113+ // @Override
114+ // public boolean onScriptPrepared(ScriptBundle bundle) {
115+ // return false;
116+ // }
117+ //
118+ // @Override
119+ // public boolean onScriptCompiled(LuaValue value, LuaValue context, LuaValue view) {
120+ // return false;
121+ // }
122+ //
123+ // @Override
124+ // public void onScriptExecuted(String uri, boolean executedSuccess) {
125+ // //测试调用 lua function
126+ // LogUtil.d("call-lua-function return:", luaView.callLuaFunction("global_fun_test1", 1, "a", 0.1));
127+ // LogUtil.d("call-lua-function return:", JsonUtil.toString(luaView.callLuaFunction("global_fun_test2", 2, "b", 0.2)));
128+ // LogUtil.d("call-window-function return:", luaView.callWindowFunction("window_fun1", 3, "c", 0.3));
129+ // LogUtil.d("call-window-function return:", luaView.callWindowFunction("window_fun2", 4, "d", 0.4));
130+ // }
131+ // });
132+
133+ luaView .load ("file:///android_asset/luaview/test.szip" , new LuaScriptLoader .ScriptExecuteCallback () {
113134 @ Override
114135 public boolean onScriptPrepared (ScriptBundle bundle ) {
115136 return false ;
@@ -122,11 +143,7 @@ public boolean onScriptCompiled(LuaValue value, LuaValue context, LuaValue view)
122143
123144 @ Override
124145 public void onScriptExecuted (String uri , boolean executedSuccess ) {
125- //测试调用 lua function
126- LogUtil .d ("call-lua-function return:" , luaView .callLuaFunction ("global_fun_test1" , 1 , "a" , 0.1 ));
127- LogUtil .d ("call-lua-function return:" , JsonUtil .toString (luaView .callLuaFunction ("global_fun_test2" , 2 , "b" , 0.2 )));
128- LogUtil .d ("call-window-function return:" , luaView .callWindowFunction ("window_fun1" , 3 , "c" , 0.3 ));
129- LogUtil .d ("call-window-function return:" , luaView .callWindowFunction ("window_fun2" , 4 , "d" , 0.4 ));
146+
130147 }
131148 });
132149 }
0 commit comments