gpt4 book ai didi

android.content.res.XModuleResources.fwd()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 02:39:05 38 4
gpt4 key购买 nike

本文整理了Java中android.content.res.XModuleResources.fwd()方法的一些代码示例,展示了XModuleResources.fwd()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XModuleResources.fwd()方法的具体详情如下:
包路径:android.content.res.XModuleResources
类名称:XModuleResources
方法名:fwd

XModuleResources.fwd介绍

暂无

代码示例

代码示例来源: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

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: 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

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));

代码示例来源: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));

代码示例来源:origin: marzika/Snapprefs

resparam.res.setReplacement(FriendListDialog.name, modRes.fwd(name));
resparam.res.setReplacement(FriendListDialog.checkBox, modRes.fwd(checkBox));
resparam.res.setReplacement(FriendListDialog.friend_item, modRes.fwd(friend_item));
resparam.res.setReplacement(GroupDialog.group_item, modRes.fwd(group_item));

38 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com