Search in sources :

Example 1 with LuaView

use of com.taobao.luaview.global.LuaView in project LuaViewSDK by alibaba.

the class BaseCacheUserdata method cacheObject.

private void cacheObject() {
    final Globals globals = getGlobals();
    final LuaView luaView = globals != null ? globals.getLuaView() : null;
    if (luaView != null) {
        luaView.cacheObject(getClass(), this);
    }
}
Also used : Globals(org.luaj.vm2.Globals) LuaView(com.taobao.luaview.global.LuaView)

Example 2 with LuaView

use of com.taobao.luaview.global.LuaView in project LuaViewSDK by alibaba.

the class DemoLuaViewActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getActionBar().setDisplayShowHomeEnabled(false);
    getActionBar().setDisplayHomeAsUpEnabled(true);
    LuaView.createAsync(this, new LuaView.CreatedCallback() {

        @Override
        public void onCreated(LuaView luaView) {
            if (mDialog != null) {
                mDialog.cancel();
            }
            mLuaView = luaView;
            if (mLuaView != null) {
                registerNameBeforeLoad(mLuaView);
                load(mLuaView);
                setContentView(mLuaView);
            }
        }
    });
    LuaView.registerImageProvider(GlideImageProvider.class);
    mDialog = new LVLoadingDialog(this);
    mDialog.show();
}
Also used : LVLoadingDialog(com.taobao.luaview.view.LVLoadingDialog) LuaView(com.taobao.luaview.global.LuaView)

Aggregations

LuaView (com.taobao.luaview.global.LuaView)2 LVLoadingDialog (com.taobao.luaview.view.LVLoadingDialog)1 Globals (org.luaj.vm2.Globals)1