Obtains the message color from a specific theme.

@param themeResourceId
The resource id of the theme, the message color should be obtained from, as an {@link
Integer} value
170246
private void obtainMessageColor(@StyleRes final int themeResourceId) {
        TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
                new int[]{R.attr.materialDialogMessageColor});
        int defaultColor = ThemeUtil
                .getColor(getContext(), themeResourceId, android.R.attr.textColorSecondary);
        setMessageColor(typedArray.getColor(0, defaultColor));
    }
531732
public static String parentResourceIdFromResourceId(String id) {
        if (id == null) {
            return null;
        }
        ResourceId resourceId = ResourceId.fromString(id);
        if (resourceId != null && resourceId.parent() != null) {
            return ResourceId.fromString(id).parent().id();
        }

        return null;
    }
845854
public void setResourceId(java.util.Collection<StringFilter> resourceId) {
        if (resourceId == null) {
            this.resourceId = null;
            return;
        }

        this.resourceId = new java.util.ArrayList<StringFilter>(resourceId);
    }
1036162
public static Resource getResource(String resourceId)
    {
        for(Datatype datatype : miriam.getDatatype()) {
			for (Resource resource : getResources(datatype)) {
				if (resource.getId().equalsIgnoreCase(resourceId))
					return resource;
			}
        }
        
        throw new IllegalArgumentException("Resource not found : " + resourceId);
    }
709958
public function isPagesResourceId($resourceId)
    {
        $resources = explode('.', $resourceId);

        return ($this->isSitesResourceId($resourceId) && !empty($resources[2])
            && $resources[2] === self::RESOURCE_PAGES);
    }
797061
public static String colorizeResource(FileResource<?> resource)
   {
      String name = resource.getName();
      if (resource.isDirectory())
      {
         name = new TerminalString(name, new TerminalColor(Color.BLUE, Color.DEFAULT)).toString();
      }
      else if (resource.isExecutable())
      {
         name = new TerminalString(name, new TerminalColor(Color.GREEN, Color.DEFAULT)).toString();
      }
      return name;
   }
425166
@Override
	@Transactional
	public String getResource(String id)
	{
		final TemplateCall call = templater.template("resource_template");

		final ResourceTemplateEntity entity = resourceProvisionService.getOrCreateTemplate(id);

		if (entity == null)
			throw new RestException(404, "No such resource with id: " + id);

		call.set("entity", entity);
		call.set("nonce", nonceStore.getValue());

		return call.process();
	}
1261477
private void setHeaderBackground(int colorResId, int drawableResId) {
        if (drawableResId == -1) {
            try {
                header.setBackgroundColor(getResources().getColor(colorResId));
            } catch (Resources.NotFoundException e) {
                e.printStackTrace();
            }
        } else {
            try {
                header.setBackgroundDrawable(getResources().getDrawable(drawableResId));
            } catch (Resources.NotFoundException e) {
                e.printStackTrace();
            }
        }

    }
1200614
private void obtainScrollableArea(@StyleRes final int themeResourceId) {
        TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
                new int[]{R.attr.materialDialogScrollableAreaTop,
                        R.attr.materialDialogScrollableAreaBottom});
        int topIndex = typedArray.getInt(0, -1);
        int bottomIndex = typedArray.getInt(1, -1);

        if (topIndex != -1) {
            Area top = Area.fromIndex(topIndex);

            if (bottomIndex != -1) {
                Area bottom = Area.fromIndex(bottomIndex);
                setScrollableArea(top, bottom);
            } else {
                setScrollableArea(top);
            }
        } else {
            setScrollableArea(null, null);
        }
    }
1339210
public static int retrieveThemeColor(Context context, int resId) {
    TypedValue outValue = resolveAttributeFromId(context, resId);
    if (outValue.type >= TypedValue.TYPE_FIRST_COLOR_INT
      && outValue.type <= TypedValue.TYPE_LAST_COLOR_INT) {
      return outValue.data;
    } else {
      return ContextCompat.getColor(context, outValue.resourceId);
    }
  }
1015998
protected String formatMessageTemplate(String id, String messageTemplate) {
    return projectCode + "-" + componentId + id + " " + messageTemplate;
  }
385169
public static String subscriptionFromResourceId(String id) {
        return (id != null) ? ResourceId.fromString(id).subscriptionId() : null;
    }
60634
private void obtainItemColor(@StyleRes final int themeResourceId) {
        TypedArray typedArray = getContext().getTheme()
                .obtainStyledAttributes(themeResourceId, new int[]{R.attr.materialDialogItemColor});
        int defaultColor = ThemeUtil
                .getColor(getContext(), themeResourceId, android.R.attr.textColorSecondary);
        setItemColor(typedArray.getColor(0, defaultColor));
    }
182473
private void obtainHeaderHeight(@StyleRes final int themeResourceId) {
        TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
                new int[]{R.attr.materialDialogHeaderHeight});
        int defaultHeight =
                getContext().getResources().getDimensionPixelSize(R.dimen.dialog_header_height);
        setHeaderHeight(typedArray.getDimensionPixelSize(0, defaultHeight));
    }
23249
public static String resourceProviderFromResourceId(String id) {
        return (id != null) ? ResourceId.fromString(id).providerNamespace() : null;
    }
837506
public function getStylesheet($target, $themeId){
        $theme = $this->getTheme($target, $themeId);
        if(isset($theme['path'])){
            return $this->resolveStylesheetUrl($theme['path']);
        }
        return null;//not found
    }
150496
public void setColorSchemeResources(int... colorResIds) {
        final Resources res = getResources();
        int[] colorRes = new int[colorResIds.length];
        for (int i = 0; i < colorResIds.length; i++) {
            colorRes[i] = res.getColor(colorResIds[i]);
        }
        setColorSchemeColors(colorRes);
    }