本文整理汇总了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();
}
示例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;
}
示例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);
}
示例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();
}
示例5: YesNoDialog
import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public YesNoDialog(Context context) {
super(context, ResHelper.getStyleRes(context, "BBS_Dialog"));
init(context);
}
示例6: WarningDialog
import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public WarningDialog(Context context) {
super(context, ResHelper.getStyleRes(context, "BBS_Dialog"));
init(context);
}
示例7: ModelLoadingDialog
import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public ModelLoadingDialog(Context context) {
super(context, ResHelper.getStyleRes(context, "BBS_Dialog"));
init(context);
}
示例8: getDialogStyle
import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public int getDialogStyle(Context context) {
return ResHelper.getStyleRes(context, "umssdk_default_DialogStyle");
}