本文整理汇总了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!!!");
}
}
示例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!!!");
}
}
示例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;
}
}
示例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);
}