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


Java TiRHelper.getResource方法代码示例

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


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

示例1: setupIds

import org.appcelerator.titanium.util.TiRHelper; //导入方法依赖的package包/类
private void setupIds() {
	try {
		frame_layout = TiRHelper.getResource("layout.container");
		frame_layout_id = TiRHelper.getResource("id.container");
		
		image_view_layout = TiRHelper.getResource("layout.image_viewer");
		image_view_container = TiRHelper.getResource("id.image_container");
		image_id = TiRHelper.getResource("id.photo_gallery_image_view");
		title_id = TiRHelper.getResource("id.imageTitle");
		
		placeholder_image = TiRHelper.getResource("drawable.loading_placeholder");
		
	} catch (ResourceNotFoundException e) {
		Log.i(TAG, "XML resources could not be found!!!");
	}
}
 
开发者ID:prashantsaini1,项目名称:titanium-android-imagepicker,代码行数:17,代码来源:ImageViewerActivity.java

示例2: setupIds

import org.appcelerator.titanium.util.TiRHelper; //导入方法依赖的package包/类
private void setupIds() {
	try {
		container = TiRHelper.getResource("id.container");
		image_container_id = TiRHelper.getResource("id.image_container");
		main_layout_id = TiRHelper.getResource("layout.container");
		main_image_view = TiRHelper.getResource("layout.image_picker");
		image_id = TiRHelper.getResource("id.photo_gallery_image_view");
		image_cover = TiRHelper.getResource("id.coverView");
		image_checkbox = TiRHelper.getResource("id.checkbox");
		error_image = TiRHelper.getResource("drawable.no_image");
		
	} catch (ResourceNotFoundException e) {
		Log.i(TAG, "XML resources could not be found!!!");
	}
}
 
开发者ID:prashantsaini1,项目名称:titanium-android-imagepicker,代码行数:16,代码来源:ImagePickerActivity.java

示例3: getR

import org.appcelerator.titanium.util.TiRHelper; //导入方法依赖的package包/类
public static int getR(String path) {
	try {
		return TiRHelper.getResource(path);
		
	} catch (Exception exc) {
		return -1;
	}
}
 
开发者ID:prashantsaini1,项目名称:ti-chrometabs,代码行数:9,代码来源:Utils.java

示例4: Drawer

import org.appcelerator.titanium.util.TiRHelper; //导入方法依赖的package包/类
public Drawer(final DrawerProxy proxy) {
	super(proxy);

	try {
		string_drawer_open = TiRHelper.getResource("string.drawer_open");
		string_drawer_close = TiRHelper.getResource("string.drawer_close");
		layout_drawer_main = TiRHelper.getResource("layout.drawer_main");
		id_content_frame = TiRHelper.getResource("id.content_frame");
		id_main_container = TiRHelper.getResource("id.main_container");
		id_toolbar = TiRHelper.getResource("id.toolbar");
	} catch (ResourceNotFoundException e) {
		Log.e(TAG, "XML resources could not be found!!!");
	}

	AppCompatActivity activity = (AppCompatActivity) proxy.getActivity();

	// DrawerLayout
	LayoutInflater inflater = LayoutInflater.from(activity);
	DrawerLayout layout = (DrawerLayout) inflater.inflate(layout_drawer_main, null,
			false);

	layout.setDrawerListener(new DrawerListener());

	toolbar = (Toolbar)layout.findViewById(id_toolbar);
	// If no actionbar exists,
	if (activity.getSupportActionBar() == null && activity.getActionBar() == null) {
		setToolbar = true;
		activity.setSupportActionBar(toolbar);
		if (!hideToolbar) {
			setToolbarVisible(true);
		}
	}

	// TiUIView
	setNativeView(layout);

}
 
开发者ID:manumaticx,项目名称:Ti.DrawerLayout,代码行数:38,代码来源:Drawer.java


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