gpt4 book ai didi

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

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

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

XModuleResources.createInstance介绍

暂无

代码示例

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

@Override
public void initZygote(StartupParam startupParam) throws Throwable {
  MODULE_PATH = startupParam.modulePath;
  mResources = XModuleResources.createInstance(startupParam.modulePath, null);
}

代码示例来源:origin: shenm233/WechatMOD

@Override
  public void handleInitPackageResources(XC_InitPackageResources.InitPackageResourcesParam resparam)
      throws Throwable {
    if (!resparam.packageName.equals(WECHAT_PACKAGENAME)) return;
    if (Common.MOD_RES == null)
      Common.MOD_RES = XModuleResources.createInstance(MODULE_PATH, null);
    ResReplacement.init(resparam);
  }
}

代码示例来源: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: AdBlocker-Reborn/AdBlocker_Reborn

public void init(IXposedHookZygoteInit.StartupParam startupParam, String resName, HashSet blocklistName) throws IOException {
  String MODULE_PATH = startupParam.modulePath;
  Resources res = XModuleResources.createInstance(MODULE_PATH, null);
  byte[] array = XposedHelpers.assetAsByteArray(res, resName);
  String decoded = decodeString(resName, array);
  String[] sUrls = decoded.split("\n");
  Collections.addAll(blocklistName, sUrls);
}

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

Array.set(iconIdWrapperArray, 0, XposedHelpers.newInstance(mediaTekIconIdWrapperClass, XModuleResources.createInstance(XposedHook.getModulePath(), null), SystemUIHooks.R_drawable_stat_sys_data_disabled));
  param.args[typeIcon] = iconIdWrapperArray;
  Array.set(iconIdWrapperArray2, 0, XposedHelpers.newInstance(mediaTekIconIdWrapperClass, XModuleResources.createInstance(XposedHook.getModulePath(), null), SystemUIHooks.R_drawable_ic_qs_data_disabled));
  param.args[qsTypeIcon] = iconIdWrapperArray2;
} else {

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

@Override
protected void afterHookedMethod(MethodHookParam param) {
  try {
    XModuleResources modRes = XModuleResources.createInstance(MODULE_PATH, null);
    ImageView iv = (ImageView) param.thisObject;
    int resId = (Integer) param.args[0];

代码示例来源:origin: wasdennnoch/AndroidN-ify

Array.set(iconIdWrapperArray, 0, XposedHelpers.newInstance(mediaTekIconIdWrapperClass, XModuleResources.createInstance(XposedHook.getModulePath(), null), SystemUIHooks.R_drawable_stat_sys_data_disabled));
  param.args[typeIcon] = iconIdWrapperArray;
} else {

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

Resources res = XModuleResources.createInstance(startupParam.modulePath, null);
byte[] backImg = XposedHelpers.assetAsByteArray(res, "back.png");
byte[] clearMenImg = XposedHelpers.assetAsByteArray(res, "clear_mem.png");

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

int group_item = R.layout.group_item;
modRes = XModuleResources.createInstance(MODULE_PATH, resparam.res);

代码示例来源:origin: wasdennnoch/AndroidN-ify

if (ConfigUtils.qs().header) {
  XModuleResources modRes = XModuleResources.createInstance(modulePath, resparam.res);

代码示例来源:origin: wasdennnoch/AndroidN-ify

final XModuleResources modRes = XModuleResources.createInstance(modulePath, resparam.res);
XResources.DimensionReplacement zero = new XResources.DimensionReplacement(0, TypedValue.COMPLEX_UNIT_DIP);

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