当前位置: 首页>>代码示例>>Java>>正文


Java Globals.getContext方法代码示例

本文整理汇总了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);
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:17,代码来源:LVRefreshScroller.java

示例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个点
    }
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:10,代码来源:LVTextView.java

示例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();
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:8,代码来源:LVCustomViewPagerIndicator.java

示例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;
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:13,代码来源:LuaViewUtil.java

示例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;
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:7,代码来源:UDNavigation.java

示例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);
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:6,代码来源:LVRefreshRecyclerView.java

示例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);
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:6,代码来源:LVListView.java

示例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);
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:4,代码来源:LVViewGroup.java

示例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);//默认居中
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:7,代码来源:LVButton.java

示例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);
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:6,代码来源:LVRefreshListView.java

示例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);
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:7,代码来源:LVEditText.java

示例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);
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:6,代码来源:LVCircleViewPagerIndicator.java

示例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();
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:6,代码来源:LVImageView.java

示例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);
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:6,代码来源:LVRefreshLayout.java

示例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());
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:6,代码来源:LVWebView.java


注:本文中的org.luaj.vm2.Globals.getContext方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。