- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中android.content.res.XResources
类的一些代码示例,展示了XResources
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XResources
类的具体详情如下:
包路径:android.content.res.XResources
类名称:XResources
暂无
代码示例来源:origin: picone/ZhihuXposed
private void replaceCopyright(XC_InitPackageResources.InitPackageResourcesParam resourcesParam) {
int copyrightId = resourcesParam.res.getIdentifier("label_app_copyright", "string", ZhihuConstant.PACKAGE_NAME);
String copyright = resourcesParam.res.getString(copyrightId);
copyright += "\n@知乎助手 by ChienHo";
resourcesParam.res.setReplacement(copyrightId, copyright);
}
}
代码示例来源:origin: wasdennnoch/AndroidN-ify
public static void hookRes(final XC_InitPackageResources.InitPackageResourcesParam resparam, String modulePath) {
try {
if (ConfigUtils.others().package_installer) {
final XModuleResources modRes = XModuleResources.createInstance(modulePath, resparam.res);
resparam.res.setReplacement(PACKAGE_PACKAGEINSTALLER, "string", "install_failed_inconsistent_certificates", modRes.fwd(R.string.install_failed_conflict));
resparam.res.setReplacement(PACKAGE_PACKAGEINSTALLER, "string", "install_failed_cpu_abi_incompatible", modRes.fwd(R.string.install_failed_incompatible));
resparam.res.setReplacement(PACKAGE_PACKAGEINSTALLER, "string", "install_failed_older_sdk", modRes.fwd(R.string.install_failed_blocked));
resparam.res.hookLayout(PACKAGE_PACKAGEINSTALLER, "layout", "install_start", install_start);
resparam.res.hookLayout(PACKAGE_PACKAGEINSTALLER, "layout", "app_details", app_details);
resparam.res.hookLayout(PACKAGE_PACKAGEINSTALLER, "layout", "install_confirm", install_confirm);
resparam.res.hookLayout(PACKAGE_PACKAGEINSTALLER, "layout", "op_progress", op_progress);
resparam.res.hookLayout(PACKAGE_PACKAGEINSTALLER, "layout", "uninstall_confirm", uninstall_confirm);
resparam.res.hookLayout(PACKAGE_PACKAGEINSTALLER, "layout", "uninstall_progress", uninstall_progress);
}
} catch (Throwable t) {
XposedHook.logE(TAG, "Error hooking PackageInstaller resources", t);
}
}
代码示例来源:origin: wasdennnoch/AndroidN-ify
public static void hookResSystemUI(XC_InitPackageResources.InitPackageResourcesParam resparam, String modulePath) {
XModuleResources modRes = XModuleResources.createInstance(modulePath, resparam.res);
R_drawable_ic_qs_data_disabled = resparam.res.addResource(modRes, R.drawable.ic_qs_data_disabled);
R_drawable_stat_sys_data_disabled = resparam.res.addResource(modRes, R.drawable.stat_sys_data_disabled);
}
代码示例来源:origin: wasdennnoch/AndroidN-ify
@SuppressWarnings("deprecation")
private static RippleDrawable getNotificationBackgroundDimmed(XResources xRes) {
mNotificationBgDimmedColor = xRes.getColor(xRes.getIdentifier("notification_material_background_dimmed_color", "color", PACKAGE_SYSTEMUI));
return new RippleDrawable(
ColorStateList.valueOf(xRes.getColor(xRes.getIdentifier("notification_ripple_untinted_color", "color", PACKAGE_SYSTEMUI))),
getBackgroundRippleContent(mNotificationBgDimmedColor),
null);
}
代码示例来源:origin: wasdennnoch/AndroidN-ify
R_string_battery_panel_title = resparam.res.addResource(modRes, R.string.battery_panel_title);
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "notification_panel_width", modRes.fwd(R.dimen.notification_panel_width));
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "qs_peek_height", zero);
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "status_bar_header_height", modRes.fwd(R.dimen.status_bar_header_height));
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "status_bar_header_height_expanded", modRes.fwd(R.dimen.status_bar_header_height));
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "qs_emergency_calls_only_text_size", modRes.fwd(R.dimen.emergency_calls_only_text_size));
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "qs_date_collapsed_size", modRes.fwd(R.dimen.date_time_collapsed_size));
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "multi_user_avatar_collapsed_size", modRes.fwd(R.dimen.multi_user_avatar_size));
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "qs_brightness_padding_top", modRes.fwd(R.dimen.brightness_slider_padding_top));
if (ConfigUtils.M)
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "multi_user_avatar_expanded_size", modRes.fwd(R.dimen.multi_user_avatar_size));
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "color", "qs_tile_divider", 0x00000000);
resparam.res.hookLayout(PACKAGE_SYSTEMUI, "layout", "status_bar_expanded_header", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
resparam.res.hookLayout(PACKAGE_SYSTEMUI, "layout", "zz_moto_status_bar_expanded_header", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
resparam.res.hookLayout(PACKAGE_SYSTEMUI, "layout", "qs_detail_header", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
resparam.res.hookLayout(PACKAGE_SYSTEMUI, "layout", "qs_panel", new XC_LayoutInflated() {
@Override
代码示例来源:origin: iAcn/BiliNeat
@Override
public void handleLayoutInflated(LayoutInflatedParam layoutInflatedParam) throws Throwable {
TextView game = (TextView) layoutInflatedParam.view.findViewById(layoutInflatedParam.res
.getIdentifier("more_action", "id", Constant.biliPackageName));
game.setVisibility(View.GONE);
}
});
代码示例来源:origin: marzika/Snapprefs
public static void addSnapprefsBtn(XC_InitPackageResources.InitPackageResourcesParam resparam, final XModuleResources mResources) {
resparam.res.hookLayout(Common.PACKAGE_SNAP, "layout", "stories", new XC_LayoutInflated() {
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
final FrameLayout relativeLayout = (FrameLayout) liparam.view.findViewById(liparam.res.getIdentifier("top_panel", "id", Common.PACKAGE_SNAP));
代码示例来源:origin: MrYawnie/SpotifySkip
@Override
public void handleInitPackageResources(XC_InitPackageResources.InitPackageResourcesParam lpparam) throws Throwable {
// Enables unlimited skips
if (!lpparam.packageName.equals("com.spotify.music"))
return;
lpparam.res.setReplacement("com.spotify.music", "bool", "is_tablet", true);
}
代码示例来源:origin: marzika/Snapprefs
FriendListDialog.name = XResources.getFakeResId(modRes, name);
resparam.res.setReplacement(FriendListDialog.name, modRes.fwd(name));
FriendListDialog.checkBox = XResources.getFakeResId(modRes, checkBox);
resparam.res.setReplacement(FriendListDialog.checkBox, modRes.fwd(checkBox));
FriendListDialog.friend_item = XResources.getFakeResId(modRes, checkBox);
resparam.res.setReplacement(FriendListDialog.friend_item, modRes.fwd(friend_item));
GroupDialog.group_item = XResources.getFakeResId(modRes, group_item);
resparam.res.setReplacement(GroupDialog.group_item, modRes.fwd(group_item));
代码示例来源:origin: marzika/Snapprefs
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
final int padding = px(10f);
final int topMargin = 0;
final int size = px((int) resparam.res.getDimension(resparam.res.getIdentifier("profile_picture_button_size", "dimen", Common.PACKAGE_SNAP)));
(RelativeLayout) liparam.view.findViewById(liparam.res.getIdentifier("camera_preview_layout", "id", Common.PACKAGE_SNAP));
代码示例来源:origin: iAcn/BiliNeat
@Override
public void handleLayoutInflated(LayoutInflatedParam layoutInflatedParam) throws Throwable {
RelativeLayout rl = (RelativeLayout) layoutInflatedParam.view.findViewById(layoutInflatedParam.res
.getIdentifier("group", "id", Constant.biliPackageName));
rl.setVisibility(View.GONE);
}
});
代码示例来源:origin: marzika/Snapprefs
public static void fullScreenFilter(
XC_InitPackageResources.InitPackageResourcesParam resparam) {
try {
resparam.res.hookLayout(Common.PACKAGE_SNAP, "layout", "battery_view", new XC_LayoutInflated() {
LinearLayout.LayoutParams batteryLayoutParams =
new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
View battery =
liparam.view.findViewById(liparam.res.getIdentifier("battery_icon", "id", "com.snapchat.android"));
battery.setLayoutParams(batteryLayoutParams);
battery.setPadding(0, 0, 0, 0);
Logger.log("fullScreenFilter", true);
}
});
} catch (Resources.NotFoundException ignore) {
}
}
代码示例来源:origin: suraj0208/WhatsappExtensions
@Override
public void handleInitPackageResources(XC_InitPackageResources.InitPackageResourcesParam initPackageResourcesParam) throws Throwable {
if (!initPackageResourcesParam.packageName.equals("com.whatsapp"))
return;
modRes = XModuleResources.createInstance(MODULE_PATH, initPackageResourcesParam.res);
if (sharedPreferences != null && sharedPreferences.getBoolean("hideTabs", false))
initPackageResourcesParam.res.setReplacement("com.whatsapp", "dimen", "tab_height", modRes.fwd(R.dimen.tab_height));
if (sharedPreferences != null && sharedPreferences.getBoolean("showBlackTicks", false)) {
initPackageResourcesParam.res.setReplacement("com.whatsapp", "drawable", "message_got_read_receipt_from_target", modRes.fwd(R.mipmap.ic_black_tick_conv));
initPackageResourcesParam.res.setReplacement("com.whatsapp", "drawable", "message_got_read_receipt_from_target_onmedia", modRes.fwd(R.mipmap.ic_black_tick_conv));
initPackageResourcesParam.res.setReplacement("com.whatsapp", "drawable", "msg_status_client_read", modRes.fwd(R.mipmap.ic_black_tick_main));
}
}
代码示例来源:origin: wasdennnoch/AndroidN-ify
@SuppressWarnings("deprecation")
private static RippleDrawable getNotificationBackground(XResources xRes) {
mNotificationBgColor = xRes.getColor(xRes.getIdentifier("notification_material_background_color", "color", PACKAGE_SYSTEMUI));
return new RippleDrawable(
ColorStateList.valueOf(xRes.getColor(xRes.getIdentifier("notification_ripple_untinted_color", "color", PACKAGE_SYSTEMUI))),
getBackgroundRippleContent(mNotificationBgColor),
null);
}
代码示例来源:origin: wasdennnoch/AndroidN-ify
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "notification_side_padding", zero);
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "notifications_top_padding", zero);
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "notification_padding", ConfigUtils.notifications().enable_notifications_background ? modRes.fwd(R.dimen.notification_divider_height) : zero);
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "notification_padding_dimmed", ConfigUtils.notifications().enable_notifications_background ? modRes.fwd(R.dimen.notification_divider_height) : zero);
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "notification_material_rounded_rect_radius", zero);
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "speed_bump_height", zero);
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "notification_min_height", modRes.fwd(R.dimen.notification_min_height));
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "notification_mid_height", modRes.fwd(R.dimen.notification_mid_height));
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "notification_max_height", modRes.fwd(R.dimen.notification_max_height));
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "min_stack_height", modRes.fwd(R.dimen.min_stack_height));
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "keyguard_clock_notifications_margin_min", modRes.fwd(R.dimen.keyguard_clock_notifications_margin_min));
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "keyguard_clock_notifications_margin_max", modRes.fwd(R.dimen.keyguard_clock_notifications_margin_max));
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "color", "notification_material_background_color", modRes.fwd(R.color.notification_material_background_color));
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "color", "notification_material_background_dimmed_color", modRes.fwd(R.color.notification_material_background_dimmed_color));
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "color", "notification_material_background_low_priority_color", modRes.fwd(R.color.notification_material_background_low_priority_color));
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "integer", "keyguard_max_notification_count", config.notifications.keyguard_max);
resparam.res.hookLayout(PACKAGE_SYSTEMUI, "layout", "notification_public_default", notification_public_default);
resparam.res.hookLayout(PACKAGE_SYSTEMUI, "layout", "status_bar_no_notifications", status_bar_no_notifications);
resparam.res.hookLayout(PACKAGE_SYSTEMUI, "layout", "status_bar_notification_row", status_bar_notification_row);
resparam.res.hookLayout(PACKAGE_SYSTEMUI, "layout", "status_bar_notification_keyguard_overflow", status_bar_notification_row);
try {
resparam.res.hookLayout(PACKAGE_SYSTEMUI, "layout", "status_bar_notification_row_media", status_bar_notification_row);
} catch (Throwable ignore) {
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "drawable", "notification_material_bg", new XResources.DrawableLoader() {
@Override
代码示例来源:origin: marzika/Snapprefs
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
View battery =
liparam.view.findViewById(liparam.res.getIdentifier("battery_icon", "id", "com.snapchat.android"));
battery.setLayoutParams(batteryLayoutParams);
battery.setPadding(0, 0, 0, 0);
Logger.log("fullScreenFilter", true);
}
});
代码示例来源:origin: wasdennnoch/AndroidN-ify
resparam.res.hookLayout(PACKAGE_ANDROID, "layout", "notification_material_action", notification_material_action);
resparam.res.hookLayout(PACKAGE_ANDROID, "layout", "notification_material_action_list", notification_material_action_list);
try { //OOS
resparam.res.hookLayout(PACKAGE_ANDROID, "layout", "notification_material_action_list_padding", notification_material_action_list);
} catch (Throwable ignore) {}
resparam.res.hookLayout(PACKAGE_ANDROID, "layout", "notification_template_material_base", notification_template_material_base);
resparam.res.hookLayout(PACKAGE_ANDROID, "layout", "notification_template_material_big_base", notification_template_material_base);
resparam.res.hookLayout(PACKAGE_ANDROID, "layout", "notification_template_material_big_text", notification_template_material_base);
resparam.res.hookLayout(PACKAGE_ANDROID, "layout", "notification_template_material_inbox", notification_template_material_base);
resparam.res.hookLayout(PACKAGE_ANDROID, "layout", "notification_template_material_media", notification_template_material_media);
resparam.res.hookLayout(PACKAGE_ANDROID, "layout", "notification_template_material_big_base", notification_template_material_big_base); // Extra treatment
resparam.res.hookLayout(PACKAGE_ANDROID, "layout", "notification_template_material_big_media", notification_template_material_big_media);
resparam.res.hookLayout(PACKAGE_ANDROID, "layout", "notification_template_material_big_media_narrow", notification_template_material_big_media);
resparam.res.hookLayout(PACKAGE_ANDROID, "layout", "notification_template_material_big_picture", notification_template_material_big_picture);
resparam.res.hookLayout(PACKAGE_ANDROID, "layout", "notification_template_material_big_text", notification_template_material_big_text);
resparam.res.hookLayout(PACKAGE_ANDROID, "layout", "notification_template_material_inbox", notification_template_material_inbox);
resparam.res.hookLayout(PACKAGE_ANDROID, "layout", "notification_material_media_action", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
resparam.res.hookLayout(PACKAGE_ANDROID, "layout", "notification_template_part_line1", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
resparam.res.hookLayout(PACKAGE_ANDROID, "layout", "notification_template_part_line3", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
代码示例来源:origin: wasdennnoch/AndroidN-ify
public static void hookResSystemui(XC_InitPackageResources.InitPackageResourcesParam resparam, String modulePath) {
try {
ConfigUtils config = ConfigUtils.getInstance();
XModuleResources modRes = XModuleResources.createInstance(modulePath, resparam.res);
if (config.recents.no_recents_image) {
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "recents_stack_top_padding", modRes.fwd(R.dimen.recents_stack_top_padding));
try {
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "layout", "recents_empty", modRes.fwd(R.layout.recents_empty));
} catch (Throwable t) {
// AICP
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "layout", "no_recents_holder", modRes.fwd(R.layout.recents_empty));
}
}
if (config.recents.large_recents) {
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "recents_stack_top_padding", modRes.fwd(R.dimen.recents_stack_top_padding));
// srsly bliss? 12 dp looks ugly as hell...
resparam.res.setReplacement(PACKAGE_SYSTEMUI, "dimen", "recents_task_view_rounded_corners_radius", new XResources.DimensionReplacement(2, TypedValue.COMPLEX_UNIT_DIP));
}
} catch (Throwable t) {
XposedHook.logE(TAG, "Error hooking SystemUI resources", t);
}
}
代码示例来源:origin: GermainZ/Identiconizer
@Override
public void handleInitPackageResources(XC_InitPackageResources.InitPackageResourcesParam resparam) throws Throwable {
if (!resparam.packageName.equals("com.android.providers.contacts"))
return;
Resources res = XModuleResources.createInstance(MODULE_PATH, resparam.res);
NOTIF_ICON_RES_ID = resparam.res.addResource(res, R.drawable.ic_settings_identicons);
}
代码示例来源:origin: iAcn/BiliNeat
@Override
public void handleLayoutInflated(LayoutInflatedParam layoutInflatedParam) throws Throwable {
TextView textView = (TextView) layoutInflatedParam.view.findViewById(layoutInflatedParam.res
.getIdentifier("message", "id", Constant.biliPackageName));
textView.setAutoLinkMask(Linkify.WEB_URLS);
}
});
什么是 SASS 方法要求干燥这样的东西: .content p, .content ul, .content li, .content a 最佳答案 这 4 个元素都有共同的样式吗? .conten
我正在评估 Contentful.com 作为 Angular SPA 的内容引擎。 我面临的问题是按内容类型检索条目(例如,获取“博客”类型的所有条目)。如 documentation exampl
在我编辑的主 wiki 上有一个名为 Item: 的自定义命名空间,提示是该命名空间内的每个页面都显示为 Item:This_item - - Item:That_item -- Item:Foo_i
我正在尝试编写一个Python脚本,可以将图片和pdf上传到WordPress。我希望图像上传到文件夹‘/wp-Content/Uploads/’,将pdf文件上传到文件夹‘/wp-Content/U
是否可以监控进行了多少次 Contentful API 调用,并理想地在即将超过配额时收到通知? 谢谢 最佳答案 当然,您可以在右侧用户配置文件的下拉菜单 > Organizations and Bi
我在尝试在 IE8 中下载带有分号的文件名时遇到问题。 Response.AddHeader("Content-Disposition", "attachment; filename=\"" + at
我在 Contentful Delivery API 中运行查询以返回基于它的 slug 的特定页面项目。这个查询还设置了语言环境,以便它只返回我需要呈现的语言的数据。 但是,我还需要设置页面的 hr
我有兴趣使用 Gatsby建一个Netlify使用来自 Contentful 的内容的静态网站 Netlify 有这个不错的 Gatsby 入门指南: https://www.netlify.com/
目标是提交一个 git 分支。分支的“git status”的输出是: On branch zeromq_new Your branch is up to date with 'origin/zero
我目前正在学习在 ASP.NET 3.5 和 C# 中使用 MasterPages 和 ContentPlaceHolders - 现在,我正在拼命尝试通过我的编程代码编辑 asp:Content-C
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 1
我使用 bootstrap 3 作为我的网格框架和 CSS 来创建一个具有一个倾斜/倾斜边缘的半透明区域,但由于分层不透明度,我的元素遇到了问题。 期望是中心是倾斜的,但右侧仍然是正方形。 有没有更好
IllegalArgumentException: 未知 URL 内容:// ^ 对上述内容做了噩梦。我检查了我的变量和路径,但看不出问题是什么?非常感谢任何指点! 这是我的痕迹。 java.lan
我有两个元素:一个是 元素,另一个是 元素。 populated-drop-down extends drop-down ,但是,正如您可能已经猜到的那样,它会尝试使用一些选项预先填充它。假设我可以简
我想我也有同样的问题。 Using multiple yields to insert content 我尝试了这个解决方案。我试过 在我的 application.html.erb 中有 conte
此链接 ( https://css-tricks.com/snippets/css/a-guide-to-flexbox/ ) 表示 justify-content 和 align-content 的
我现在正在探索绑定(bind),并且有一个 NSPopUpButton - 它为我提供了一些值选择下的绑定(bind)选项 - Content , Content Objects , Content
正在尝试在内容页面中加载内容 View 。当我运行代码时,它不会出现在我的内容 View 中。我正在从我的内容页面分配两个可绑定(bind)参数。 内容页面: 内容 View :
我想从我的 :before 标签中获取 content。我知道有些人会说它不是真正的(伪)元素,但在 JS 中有一种方法,但有人可以帮助我在 JQ 中做到这一点,因为我有多个标签并且我想用 $.eac
我创建了一个.sh脚本,并将结果记录在一个文件中,执行后我会尝试将文件内容作为mail正文发送。 这是我运行的命令: sh update.sh >> update.$(date +"%Y-%m-%d:
我是一名优秀的程序员,十分优秀!