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


Java TiRHelper.getApplicationResource方法代码示例

本文整理汇总了Java中org.appcelerator.titanium.util.TiRHelper.getApplicationResource方法的典型用法代码示例。如果您正苦于以下问题:Java TiRHelper.getApplicationResource方法的具体用法?Java TiRHelper.getApplicationResource怎么用?Java TiRHelper.getApplicationResource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.appcelerator.titanium.util.TiRHelper的用法示例。


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

示例1: getResource

import org.appcelerator.titanium.util.TiRHelper; //导入方法依赖的package包/类
private int getResource(String type, String name) {
    int icon = 0;
    if (name != null) {
        /* Remove extension from icon */
        int index = name.lastIndexOf(".");
        if (index > 0) {
            name = name.substring(0, index);
        }
        try {
            icon = TiRHelper.getApplicationResource(type + "." + name);
        } catch (TiRHelper.ResourceNotFoundException ex) {
            Log.e(LCAT, type + "." + name + " not found; make sure it's in platform/android/res/" + type);
        }
    }

    return icon;
}
 
开发者ID:morinel,项目名称:gcmpush,代码行数:18,代码来源:GCMIntentService.java

示例2: getResource

import org.appcelerator.titanium.util.TiRHelper; //导入方法依赖的package包/类
private int getResource(String type, String name) {
	int icon = 0;
	if (name != null) {
		int index = name.lastIndexOf(".");
		if (index > 0) name = name.substring(0, index);
		try {
			icon = TiRHelper.getApplicationResource(type + "." + name);
		} catch (TiRHelper.ResourceNotFoundException ex) {
			Log.e(LCAT, type + "." + name + " not found; make sure it's in platform/android/res/" + type);
		}
	}

	return icon;
}
 
开发者ID:caffeinalab,项目名称:ti.goosh,代码行数:15,代码来源:IntentService.java

示例3: getString

import org.appcelerator.titanium.util.TiRHelper; //导入方法依赖的package包/类
public static int getString(String str) {
	try {
		return TiRHelper.getApplicationResource("string." + str);
	} catch (ResourceNotFoundException e) {
		e.printStackTrace();
		return 0;
	}
}
 
开发者ID:PDF417,项目名称:pdf417-titanium,代码行数:9,代码来源:RHelper.java

示例4: getLayout

import org.appcelerator.titanium.util.TiRHelper; //导入方法依赖的package包/类
public static int getLayout(String str) {
	try {
		return TiRHelper.getApplicationResource("layout." + str);
	} catch (ResourceNotFoundException e) {
		e.printStackTrace();
		return 0;
	}
}
 
开发者ID:PDF417,项目名称:pdf417-titanium,代码行数:9,代码来源:RHelper.java

示例5: getId

import org.appcelerator.titanium.util.TiRHelper; //导入方法依赖的package包/类
public static int getId(String str) {
	try {
		return TiRHelper.getApplicationResource("id." + str);
	} catch (ResourceNotFoundException e) {
		e.printStackTrace();
		return 0;
	}
}
 
开发者ID:PDF417,项目名称:pdf417-titanium,代码行数:9,代码来源:RHelper.java

示例6: getDrawable

import org.appcelerator.titanium.util.TiRHelper; //导入方法依赖的package包/类
public static int getDrawable(String str) {
	try {
		return TiRHelper.getApplicationResource("drawable." + str);
	} catch (ResourceNotFoundException e) {
		e.printStackTrace();
		return 0;
	}
}
 
开发者ID:PDF417,项目名称:pdf417-titanium,代码行数:9,代码来源:RHelper.java

示例7: getColor

import org.appcelerator.titanium.util.TiRHelper; //导入方法依赖的package包/类
public static int getColor(String str) {
	try {
		return TiRHelper.getApplicationResource("color." + str);
	} catch (ResourceNotFoundException e) {
		e.printStackTrace();
		return 0;
	}
}
 
开发者ID:PDF417,项目名称:pdf417-titanium,代码行数:9,代码来源:RHelper.java

示例8: getRaw

import org.appcelerator.titanium.util.TiRHelper; //导入方法依赖的package包/类
public static int getRaw(String str) {
	try {
		return TiRHelper.getApplicationResource("raw." + str);
	} catch (ResourceNotFoundException e) {
		e.printStackTrace();
		return 0;
	}
}
 
开发者ID:PDF417,项目名称:pdf417-titanium,代码行数:9,代码来源:RHelper.java

示例9: getXML

import org.appcelerator.titanium.util.TiRHelper; //导入方法依赖的package包/类
public static int getXML(String str) {
	try {
		return TiRHelper.getApplicationResource("xml." + str);
	} catch (ResourceNotFoundException e) {
		e.printStackTrace();
		return 0;
	}
}
 
开发者ID:PDF417,项目名称:pdf417-titanium,代码行数:9,代码来源:RHelper.java


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