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


Java R类代码示例

本文整理汇总了Java中it.gmariotti.changelibs.R的典型用法代码示例。如果您正苦于以下问题:Java R类的具体用法?Java R怎么用?Java R使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


R类属于it.gmariotti.changelibs包,在下文中一共展示了R类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initAttrs

import it.gmariotti.changelibs.R; //导入依赖的package包/类
/**
 * Init custom attrs.
 *
 * @param attrs
 * @param defStyle
 */
protected void initAttrs(AttributeSet attrs, int defStyle) {
    TypedArray a = getContext().getTheme().obtainStyledAttributes(
            attrs, R.styleable.ChangeLogListView, defStyle, defStyle);

    try {
        //Layout for rows and header
        mRowLayoutId = a.getResourceId(R.styleable.ChangeLogListView_rowLayoutId, mRowLayoutId);
        mRowHeaderLayoutId = a.getResourceId(R.styleable.ChangeLogListView_rowHeaderLayoutId, mRowHeaderLayoutId);

        //Changelog.xml file
        mChangeLogFileResourceId = a.getResourceId(R.styleable.ChangeLogListView_changeLogFileResourceId, mChangeLogFileResourceId);

        mChangeLogFileResourceUrl = a.getString(R.styleable.ChangeLogListView_changeLogFileResourceUrl);
        //String which is used in header row for Version
        //mStringVersionHeader= a.getResourceId(R.styleable.ChangeLogListView_StringVersionHeader,mStringVersionHeader);

    } finally {
        a.recycle();
    }
}
 
开发者ID:goodev,项目名称:droidddle,代码行数:27,代码来源:ChangeLogListView.java

示例2: getChangeText

import it.gmariotti.changelibs.R; //导入依赖的package包/类
public String getChangeText(Context context) {
    if (context == null)
        return getChangeText();

    String prefix = "";
    switch (type) {
        case BUGFIX:
            prefix = context.getResources().getString(R.string.changelog_row_prefix_bug);
            prefix = prefix.replaceAll("\\[", "<").replaceAll("\\]", ">");
            break;
        case IMPROVEMENT:
            prefix = context.getResources().getString(R.string.changelog_row_prefix_improvement);
            prefix = prefix.replaceAll("\\[", "<").replaceAll("\\]", ">");
            break;
    }
    return prefix + " " + changeText;
}
 
开发者ID:goodev,项目名称:droidddle,代码行数:18,代码来源:ChangeLogRow.java

示例3: initAttrs

import it.gmariotti.changelibs.R; //导入依赖的package包/类
/**
 * Init custom attrs.
 *
 * @param attrs
 * @param defStyle
 */
protected void initAttrs(AttributeSet attrs, int defStyle) {
    TypedArray a = getContext().getTheme().obtainStyledAttributes(
            attrs, R.styleable.ChangeLogListView, defStyle, defStyle);

    try {
        //Layout for rows and header
        mRowLayoutId = a.getResourceId(R.styleable.ChangeLogListView_rowLayoutId, mRowLayoutId);
        mRowHeaderLayoutId = a.getResourceId(R.styleable.ChangeLogListView_rowHeaderLayoutId, mRowHeaderLayoutId);

        //Changelog.xml file
        mChangeLogFileResourceId = a.getResourceId(R.styleable.ChangeLogListView_changeLogFileResourceId,mChangeLogFileResourceId);

        mChangeLogFileResourceUrl = a.getString(R.styleable.ChangeLogListView_changeLogFileResourceUrl);
        //String which is used in header row for Version
        //mStringVersionHeader= a.getResourceId(R.styleable.ChangeLogListView_StringVersionHeader,mStringVersionHeader);

    } finally {
        a.recycle();
    }
}
 
开发者ID:Daniele-Comi,项目名称:System-Monitor,代码行数:27,代码来源:ChangeLogListView.java

示例4: initAttrs

import it.gmariotti.changelibs.R; //导入依赖的package包/类
/**
 * Init custom attrs.
 *
 * @param attrs
 * @param defStyle
 */
protected void initAttrs(AttributeSet attrs, int defStyle) {
    TypedArray a = getContext().getTheme().obtainStyledAttributes(attrs, R.styleable.ChangeLogListView, defStyle, defStyle);

    try {
        //Layout for rows and header
        mRowLayoutId = a.getResourceId(R.styleable.ChangeLogListView_rowLayoutId, mRowLayoutId);
        mRowHeaderLayoutId = a.getResourceId(R.styleable.ChangeLogListView_rowHeaderLayoutId, mRowHeaderLayoutId);

        //Changelog.xml file
        mChangeLogFileResourceId = a.getResourceId(R.styleable.ChangeLogListView_changeLogFileResourceId, mChangeLogFileResourceId);

        //String which is used in header row for Version
        //mStringVersionHeader= a.getResourceId(R.styleable.ChangeLogListView_StringVersionHeader,mStringVersionHeader);

    } finally {
        a.recycle();
    }
}
 
开发者ID:goodev,项目名称:android-discourse,代码行数:25,代码来源:ChangeLogListView.java

示例5: initAdapter

import it.gmariotti.changelibs.R; //导入依赖的package包/类
/**
 * Init adapter
 */
protected void initAdapter() {

    try {
        //Read and parse changelog.xml
        XmlParser parse = new XmlParser(getContext(), mChangeLogFileResourceId);
        //ChangeLog chg=parse.readChangeLogFile();
        ChangeLog chg = new ChangeLog();

        if (chg != null) {
            //Create adapter and set custom attrs
            mAdapter = new ChangeLogAdapter(getContext(), chg.getRows());
            mAdapter.setmRowLayoutId(mRowLayoutId);
            mAdapter.setmRowHeaderLayoutId(mRowHeaderLayoutId);

            //Parse in a separate Thread to avoid UI block with large files
            new ParseAsyncTask(mAdapter, parse).execute();
            setAdapter(mAdapter);
        } else {
            setAdapter(null);
        }
    } catch (Exception e) {
        Log.e(TAG, getResources().getString(R.string.changelog_internal_error_parsing), e);
    }

}
 
开发者ID:goodev,项目名称:android-discourse,代码行数:29,代码来源:ChangeLogListView.java

示例6: doInBackground

import it.gmariotti.changelibs.R; //导入依赖的package包/类
@Override
protected ChangeLog doInBackground(Void... params) {

    try {
        if (mParse != null) {
            ChangeLog chg = mParse.readChangeLogFile();
            return chg;
        }
    } catch (Exception e) {
        Log.e(TAG, getResources().getString(R.string.changelog_internal_error_parsing), e);
    }
    return null;
}
 
开发者ID:goodev,项目名称:droidddle,代码行数:14,代码来源:ChangeLogListView.java

示例7: doInBackground

import it.gmariotti.changelibs.R; //导入依赖的package包/类
@Override
protected ChangeLog doInBackground(Void... params) {

    try{
        if (mParse!=null){
            ChangeLog chg=mParse.readChangeLogFile();
            return chg;
        }
    }catch (Exception e){
        Log.e(TAG,getResources().getString(R.string.changelog_internal_error_parsing),e);
    }
    return null;
}
 
开发者ID:Daniele-Comi,项目名称:System-Monitor,代码行数:14,代码来源:ChangeLogListView.java


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