本文整理汇总了Java中org.luaj.vm2.Globals.getContext方法的典型用法代码示例。如果您正苦于以下问题:Java Globals.getContext方法的具体用法?Java Globals.getContext怎么用?Java Globals.getContext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.luaj.vm2.Globals
的用法示例。
在下文中一共展示了Globals.getContext方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: LVRefreshScroller
import org.luaj.vm2.Globals; //导入方法依赖的package包/类
public LVRefreshScroller(Globals globals, LuaValue metaTable, Varargs varargs) {
super(globals.getContext());
mLuaUserdata = new UDRefreshScroller(this, globals, metaTable, varargs != null ? varargs.arg1() : null);
LayoutInflater inflater = (LayoutInflater) globals.getContext().getSystemService( Context.LAYOUT_INFLATER_SERVICE );
View view = inflater.inflate(R.layout.lv_scroller, null);
this.addView(view, LuaViewUtil.createRelativeLayoutParamsMM());
mHeaderContainer = (RelativeLayout) view.findViewById(R.id.header_container);
mPinnedContainer = (RelativeLayout) view.findViewById(R.id.pinned_container);
mContentContainer = (RelativeLayout) view.findViewById(R.id.content_container);
// 测试
this.setEnabled(false);
}
示例2: LVTextView
import org.luaj.vm2.Globals; //导入方法依赖的package包/类
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个点
}
示例3: LVCustomViewPagerIndicator
import org.luaj.vm2.Globals; //导入方法依赖的package包/类
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);
init();
}
示例4: getActionBar
import org.luaj.vm2.Globals; //导入方法依赖的package包/类
/**
* 获得actionbar
*
* @param globals
* @return
*/
public static ActionBar getActionBar(Globals globals) {
if (globals != null && globals.getContext() instanceof Activity) {
return ((Activity) (globals.getContext())).getActionBar();
}
return null;
}
示例5: getSupportActionBar
import org.luaj.vm2.Globals; //导入方法依赖的package包/类
public static android.support.v7.app.ActionBar getSupportActionBar(Globals globals) {
if (globals != null && globals.getContext() instanceof AppCompatActivity) {
return ((AppCompatActivity) (globals.getContext())).getSupportActionBar();
}
return null;
}
示例6: LVRefreshRecyclerView
import org.luaj.vm2.Globals; //导入方法依赖的package包/类
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);
}
示例7: LVListView
import org.luaj.vm2.Globals; //导入方法依赖的package包/类
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);
}
示例8: LVViewGroup
import org.luaj.vm2.Globals; //导入方法依赖的package包/类
public LVViewGroup(Globals globals, LuaValue metaTable, Varargs varargs) {
this(globals != null ? globals.getContext() : null, globals, metaTable, varargs);
}
示例9: LVButton
import org.luaj.vm2.Globals; //导入方法依赖的package包/类
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);//默认居中
}
示例10: LVRefreshListView
import org.luaj.vm2.Globals; //导入方法依赖的package包/类
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);
}
示例11: LVEditText
import org.luaj.vm2.Globals; //导入方法依赖的package包/类
public LVEditText(Globals globals, LuaValue metaTable, Varargs varargs) {
super(globals.getContext());
this.mLuaUserdata = new UDEditText(this, globals, metaTable, varargs);
this.setTextSize(UDFontSize.FONTSIZE_SMALL);
this.setInputType(InputType.TYPE_CLASS_TEXT);
}
示例12: LVCircleViewPagerIndicator
import org.luaj.vm2.Globals; //导入方法依赖的package包/类
public LVCircleViewPagerIndicator(Globals globals, LuaValue metaTable, Varargs varargs) {
super(globals.getContext());
this.mLuaUserdata = new UDCircleViewPagerIndicator(this, globals, metaTable, varargs);
this.setPadding(0, 2, 0, 0);
}
示例13: LVImageView
import org.luaj.vm2.Globals; //导入方法依赖的package包/类
public LVImageView(Globals globals, LuaValue metaTable, Varargs varargs) {
super(globals.getContext());
this.mLuaUserdata = new UDImageView(this, globals, metaTable, varargs);
init();
}
示例14: LVRefreshLayout
import org.luaj.vm2.Globals; //导入方法依赖的package包/类
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);
}
示例15: LVWebView
import org.luaj.vm2.Globals; //导入方法依赖的package包/类
public LVWebView(Globals globals, LuaValue metaTable, Varargs varargs) {
super(globals.getContext());
this.mLuaUserdata = new UDWebView(this, globals, metaTable, varargs);
init(globals.getContext());
}