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


Java ResHelper.getStyleRes方法代码示例

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


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

示例1: popFilterMenu

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public void popFilterMenu(View rootview) {
	int style = ResHelper.getStyleRes(getContext(), "BBS_PopupMenu");
	Context wrapper = new ContextThemeWrapper(getContext(), style);
	//Creating the instance of PopupMenu
	PopupMenu popup = new PopupMenu(wrapper, rootview);
	//Inflating the Popup using xml file
	popup.getMenuInflater().inflate(PageForumThreadDetail.getMenuRes(getContext(), "bbs_popup_forumthread"), popup.getMenu());

	//registering popup with OnMenuItemClickListener
	popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
		public boolean onMenuItemClick(MenuItem item) {
			//only one menu item.
			if (item.getItemId() == ResHelper.getIdRes(getContext(), "action_arrangebycomment")) {
				orderType = ThreadListOrderType.LAST_POST;
				performPullingDown(true);
			} else if (item.getItemId() == ResHelper.getIdRes(getContext(), "action_arrangebypost")) {
				orderType = ThreadListOrderType.CREATE_ON;
				performPullingDown(true);
			}
			return true;
		}
	});
	popup.show();
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:25,代码来源:Theme1ForumThreadPullToRequestView.java

示例2: ProgressDialog

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
/**加载对话框*/
public static final Dialog ProgressDialog(Context context){
	int resId = ResHelper.getStyleRes(context, "CommonDialog");
	if (resId > 0) {
		final Dialog dialog = new Dialog(context, resId);
		LinearLayout layout = ProgressDialogLayout.create(context);
		if (layout != null) {
			dialog.setContentView(layout);
			return dialog;
		}
	}
	return null;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:CommonDialog.java

示例3: DefaultChooserDialog

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public DefaultChooserDialog(Context context, int[] strResIds) {
	super(context, ResHelper.getStyleRes(context, "BBS_Dialog"));
	for (int id : strResIds) {
		listItems.add(context.getResources().getString(id));
	}
	init(context);
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:8,代码来源:DefaultChooserDialog.java

示例4: onTitleRightClick

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
@Override
protected void onTitleRightClick(TitleBar titleBar) {
	super.onTitleRightClick(titleBar);
	int style = ResHelper.getStyleRes(getContext(), "BBS_PopupMenu");
	Context wrapper = new ContextThemeWrapper(getContext(), style);
	//Creating the instance of PopupMenu
	PopupMenu popup = new PopupMenu(wrapper, titleBar.getRightImageView());
	//Inflating the Popup using xml file
	popup.getMenuInflater().inflate(getMenuRes(getContext(), "bbs_popup_threaddetail"), popup.getMenu());

	//registering popup with OnMenuItemClickListener
	popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
		public boolean onMenuItemClick(MenuItem item) {
			//only one menu item.
			if(forumThread == null) {
				return true;
			}

			User user = null;
			try {
				user = BBSSDK.getApi(UserAPI.class).getCurrentUser();
			} catch (Exception e) {
				user = null;
			}
			if (user != null && user.uid == forumThread.authorId) {
				ToastUtils.showToast(getContext(), ResHelper.getStringRes(getContext(), "bbs_cant_reportaccusation_self"));
				return true;
			}
			PageReportAccusation page = BBSViewBuilder.getInstance().buildPageReportAccusation();
			page.initPage(forumThread.tid, forumThread.fid);
			page.show(getContext());
			return true;
		}
	});
	popup.show();
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:37,代码来源:PageForumThreadDetail.java

示例5: YesNoDialog

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public YesNoDialog(Context context) {
	super(context, ResHelper.getStyleRes(context, "BBS_Dialog"));
	init(context);
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:5,代码来源:YesNoDialog.java

示例6: WarningDialog

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public WarningDialog(Context context) {
	super(context, ResHelper.getStyleRes(context, "BBS_Dialog"));
	init(context);
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:5,代码来源:WarningDialog.java

示例7: ModelLoadingDialog

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public ModelLoadingDialog(Context context) {
	super(context, ResHelper.getStyleRes(context, "BBS_Dialog"));
	init(context);
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:5,代码来源:ModelLoadingDialog.java

示例8: getDialogStyle

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public int getDialogStyle(Context context) {
	return ResHelper.getStyleRes(context, "umssdk_default_DialogStyle");
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:4,代码来源:SingleChoiceView.java


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