gpt4 book ai didi

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

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

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

XResources.getIdentifier介绍

暂无

代码示例

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

@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: 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);
  }
});

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

@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

@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: marzika/Snapprefs

public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
  final FrameLayout relativeLayout = (FrameLayout) liparam.view.findViewById(liparam.res.getIdentifier("top_panel", "id", Common.PACKAGE_SNAP));
  final RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(liparam.view.findViewById(liparam.res.getIdentifier("myfriends_action_bar_search_button", "id", Common.PACKAGE_SNAP)).getLayoutParams());
  final FrameLayout.LayoutParams layoutParams2 = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT, Gravity.RIGHT);

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

public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
  final RelativeLayout relativeLayout =
      (RelativeLayout) liparam.view.findViewById(liparam.res.getIdentifier("snap_preview_header", "id", Common.PACKAGE_SNAP)).getParent();
      new RelativeLayout.LayoutParams(liparam.view.findViewById(liparam.res.getIdentifier("drawing_btn", "id", Common.PACKAGE_SNAP)).getLayoutParams());
  layoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.ALIGN_PARENT_TOP);
  layoutParams.topMargin = px(45.0f);
      new RelativeLayout.LayoutParams(liparam.view.findViewById(liparam.res.getIdentifier("drawing_btn", "id", Common.PACKAGE_SNAP)).getLayoutParams());
  paramsSpeed.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.ALIGN_PARENT_TOP);
  paramsSpeed.topMargin = px(90.0f);
      new RelativeLayout.LayoutParams(liparam.view.findViewById(liparam.res.getIdentifier("drawing_btn", "id", Common.PACKAGE_SNAP)).getLayoutParams());
  paramsWeather.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.ALIGN_PARENT_TOP);
  paramsWeather.topMargin = px(180.0f);
      new RelativeLayout.LayoutParams(liparam.view.findViewById(liparam.res.getIdentifier("drawing_btn", "id", Common.PACKAGE_SNAP)).getLayoutParams());
  paramsLocation.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.ALIGN_PARENT_TOP);
  paramsLocation.topMargin = px(135.0f);

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

Logger.log("Updating view_snap.snap_container layout");
final FrameLayout frameLayout = (FrameLayout) liparam.view.findViewById(
    liparam.res.getIdentifier("snap_container", "id", Common.PACKAGE_SNAP)
).getParent();

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