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
Source File: LVTextView.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 5 votes |
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
Source File: LuaViewUtil.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 5 votes |
/** * 获得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 3
Source File: VenvyLVSvgeImageView.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 5 votes |
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 4
Source File: LVCustomViewPagerIndicator.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 5 votes |
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 5
Source File: LVRefreshLayout.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
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 6
Source File: VenvyLVAcrClouldCallback.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
public VenvyLVAcrClouldCallback(Platform platform, Globals globals, LuaValue metaTable, Varargs varargs) { super(globals.getContext()); this.mLuaUserdata = new VenvyUDAcrClouldCallback(platform, this, globals, metaTable, varargs); }
Example 7
Source File: VenvyLVActivityCallback.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
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 8
Source File: VenvyMediaPlayerView.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
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 9
Source File: VenvyLVWebView.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
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 10
Source File: LVHorizontalScrollView.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
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 11
Source File: LVViewPager.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
public LVViewPager(Globals globals, LuaValue metaTable, Varargs varargs) { super(globals.getContext()); this.mLuaUserdata = createUserdata(globals, metaTable, varargs); init(globals); }
Example 12
Source File: VenvyLVNotificationCallback.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
public VenvyLVNotificationCallback(Globals globals, LuaValue metaTable, Varargs varargs) { super(globals.getContext()); this.mLuaUserdata = new VenvyUDNotificationCallback(this, globals, metaTable, varargs); }
Example 13
Source File: LVScrollView.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
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
Source File: LVRefreshRecyclerView.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
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 15
Source File: VenvyLVKeyboardCallback.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
public VenvyLVKeyboardCallback(Globals globals, LuaValue metaTable, Varargs varargs) { super(globals.getContext()); mContext = globals.getContext(); this.mLuaUserdata = new VenvyUDKeyboardCallback(this, globals, metaTable, varargs); }
Example 16
Source File: VenvyLVMediaCallback.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
public VenvyLVMediaCallback(Platform platform, Globals globals, LuaValue metaTable, Varargs varargs) { super(globals.getContext()); this.mLuaUserdata = new VenvyUDMediaLifeCycle(platform, this, globals, metaTable, varargs); }
Example 17
Source File: LVRefreshListView.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
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 18
Source File: LVButton.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
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 19
Source File: VenvyLVMqttCallback.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
public VenvyLVMqttCallback(Globals globals, LuaValue metaTable, Varargs varargs) { super(globals.getContext()); this.mLuaUserdata = new VenvyUDMqttCallback(this, globals, metaTable, varargs); }
Example 20
Source File: LVListView.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
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); }