Java Code Examples for org.luaj.vm2.Globals#getContext()

The following examples show how to use org.luaj.vm2.Globals#getContext() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
public LVTextView(Globals globals, LuaValue metaTable, Varargs varargs) {
        super(globals.getContext());
        this.mLuaUserdata = new UDTextView(this, globals, metaTable, varargs);
        this.setIncludeFontPadding(false);//设置默认TextView不包含字体的padding,否则adjustSize的时候拿到的高度有问题
        this.setGravity(Gravity.CENTER_VERTICAL);//默认竖直居中
        this.setLines(1);//默认一行
        this.setTextSize(UDFontSize.FONTSIZE_SMALL);
//        this.setEllipsize(TextUtils.TruncateAt.END);//默认在最后有3个点
    }
 
Example 2
public VenvyLVSvgeImageView(Globals globals, LuaValue metaTable, Varargs varargs) {
    super(globals.getContext());
    this.mLuaUserdata = new VenvyUDSvgaImageView(this, globals, metaTable, varargs);

    iSvgaImageView = VenvyImageFactory.createSvgaImage(getContext());
    if (iSvgaImageView != null && iSvgaImageView instanceof View) {
        FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
        ((View) iSvgaImageView).setLayoutParams(params);
        addView((View) iSvgaImageView);
    }
}
 
Example 3
public LVCustomViewPagerIndicator(Globals globals, LuaValue metaTable, Varargs varargs) {
    super(globals.getContext());
    this.mInitParams = varargs != null ? varargs.arg1() : null;
    this.mLuaUserdata = new UDCustomViewPagerIndicator(this, globals, metaTable, this.mInitParams);
    this.mLayout = new IcsLinearLayout(globals.getContext(), R.attr.lv_vpiIconPageIndicatorStyle);
    this.setHorizontalScrollBarEnabled(false);
    super.addView(mLayout, LuaViewUtil.createRelativeLayoutParamsMM());
}
 
Example 4
/**
 * 获得actionbar
 *
 * @param globals
 * @return
 */
public static ActionBar getActionBar(Globals globals) {
    if (globals != null && globals.getContext() instanceof Activity) {
        return ((Activity) (globals.getContext())).getActionBar();
    }
    return null;
}
 
Example 5
public LVRefreshRecyclerView(Globals globals, LuaValue metaTable, Varargs varargs) {
    super(globals.getContext());
    this.mRecyclerView = LVRecyclerView.createVerticalView(globals, metaTable, varargs, new UDRefreshRecyclerView(this, globals, metaTable, varargs));
    init(globals);
}
 
Example 6
public LVListView(Globals globals, LuaValue metaTable, Varargs varargs, UDBaseListView udBaseListView) {
    super(globals.getContext());
    this.mLuaUserdata = udBaseListView != null ? udBaseListView : new UDListView(this, globals, metaTable, varargs);
    init(globals);
}
 
Example 7
public VenvyLVMqttCallback(Globals globals, LuaValue metaTable, Varargs varargs) {
    super(globals.getContext());
    this.mLuaUserdata = new VenvyUDMqttCallback(this, globals, metaTable, varargs);
}
 
Example 8
public LVButton(Globals globals, LuaValue metaTable, Varargs varargs) {
    super(globals.getContext());
    this.mLuaUserdata = new UDButton(this, globals, metaTable, varargs);
    this.setTextSize(UDFontSize.FONTSIZE_SMALL);
    this.setGravity(Gravity.CENTER);//默认居中
}
 
Example 9
public LVRefreshListView(Globals globals, LuaValue metaTable, Varargs varargs) {
    super(globals.getContext());
    this.mListView = new LVListView(globals, metaTable, varargs, new UDRefreshListView(this, globals, metaTable, varargs));
    init(globals);
}
 
Example 10
public VenvyLVMediaCallback(Platform platform, Globals globals, LuaValue metaTable, Varargs varargs) {
    super(globals.getContext());
    this.mLuaUserdata = new VenvyUDMediaLifeCycle(platform, this, globals, metaTable, varargs);
}
 
Example 11
public VenvyLVKeyboardCallback(Globals globals, LuaValue metaTable, Varargs varargs) {
    super(globals.getContext());
    mContext = globals.getContext();
    this.mLuaUserdata = new VenvyUDKeyboardCallback(this, globals, metaTable, varargs);

}
 
Example 12
public LVRefreshLayout(Globals globals, LuaValue metaTable, Varargs varargs) {
    super(globals.getContext());
    this.mLuaUserdata = new UDRefreshLayout(this, globals, metaTable, varargs != null ? varargs.arg1() : null);
    init(globals);
}
 
Example 13
public LVScrollView(Globals globals, LuaValue metaTable, Varargs varargs) {
    super(globals.getContext());
    this.mLuaUserdata = new UDScrollView(this, globals, metaTable, varargs != null ? varargs.arg1() : null);
    init(globals);
}
 
Example 14
public VenvyLVNotificationCallback(Globals globals, LuaValue metaTable, Varargs varargs) {
    super(globals.getContext());
    this.mLuaUserdata = new VenvyUDNotificationCallback(this, globals, metaTable, varargs);
}
 
Example 15
public LVViewPager(Globals globals, LuaValue metaTable, Varargs varargs) {
    super(globals.getContext());
    this.mLuaUserdata = createUserdata(globals, metaTable, varargs);
    init(globals);
}
 
Example 16
public LVHorizontalScrollView(Globals globals, LuaValue metaTable, Varargs varargs) {
    super(globals.getContext());
    this.mLuaUserdata = new UDHorizontalScrollView(this, globals, metaTable, varargs != null ? varargs.arg1() : null);
    init(globals);
}
 
Example 17
public VenvyLVWebView(Platform platform, Globals globals, LuaValue metaTable, Varargs varargs) {
    super(globals.getContext());
    this.platform = platform;
    this.mLuaUserdata = new VenvyUDWebView(this, globals, metaTable, varargs);
}
 
Example 18
public VenvyMediaPlayerView(Globals globals, LuaValue metaTable, Varargs varargs) {
    super(globals.getContext());
    mLuaUserdata = new VenvyUDMediaPlayerView(this, globals, metaTable, varargs != null ? varargs.arg1() : null);
    init(getContext());
}
 
Example 19
public VenvyLVActivityCallback(Globals globals, LuaValue metaTable, Varargs varargs) {
    super(globals.getContext());
    this.mLuaUserdata = new VenvyUDActivityLifeCycle(this, globals, metaTable, varargs);
    ObservableManager.getDefaultObserable().addObserver(TAG_ACTIVITY_CHANGED, this);
}
 
Example 20
public VenvyLVAcrClouldCallback(Platform platform, Globals globals, LuaValue metaTable, Varargs varargs) {
    super(globals.getContext());
    this.mLuaUserdata = new VenvyUDAcrClouldCallback(platform, this, globals, metaTable, varargs);
}