private boolean isWidthStyle(String style) { return isSizeStyle(style, mWidthStyles); }
private boolean isWidthStyle(String style) { return isSizeStyle(style, mWidthStyles); }
private boolean isHeightStyle(String style) { return isSizeStyle(style, mHeightStyles); }
private boolean isHeightStyle(String style) { return isSizeStyle(style, mHeightStyles); }
private boolean isSizeStyle(String style, Set<String> sizeStyles) { if (isFrameworkSizeStyle(style)) { return true; } if (sizeStyles == null) { return false; } return isSizeStyle(stripStylePrefix(style), sizeStyles, 0); }
private boolean isSizeStyle( @NonNull String style, @NonNull Set<String> sizeStyles, int depth) { if (depth == 30) { // Cycle between local and framework attribute style missed // by the fact that we're stripping the distinction between framework // and local styles here return false; } assert !style.startsWith(STYLE_RESOURCE_PREFIX) && !style.startsWith(ANDROID_STYLE_RESOURCE_PREFIX); if (sizeStyles.contains(style)) { return true; } if (mStyleParents != null) { String parentStyle = mStyleParents.get(style); if (parentStyle != null) { parentStyle = stripStylePrefix(parentStyle); if (isSizeStyle(parentStyle, sizeStyles, depth + 1)) { return true; } } } int index = style.lastIndexOf('.'); if (index > 0) { return isSizeStyle(style.substring(0, index), sizeStyles, depth + 1); } return false; }
private boolean isSizeStyle(String style, Set<String> sizeStyles) { if (isFrameworkSizeStyle(style)) { return true; } if (sizeStyles == null) { return false; } return isSizeStyle(stripStylePrefix(style), sizeStyles, 0); }
private boolean isSizeStyle( @NonNull String style, @NonNull Set<String> sizeStyles, int depth) { if (depth == 30) { // Cycle between local and framework attribute style missed // by the fact that we're stripping the distinction between framework // and local styles here return false; } assert !style.startsWith(STYLE_RESOURCE_PREFIX) && !style.startsWith(ANDROID_STYLE_RESOURCE_PREFIX); if (sizeStyles.contains(style)) { return true; } if (mStyleParents != null) { String parentStyle = mStyleParents.get(style); if (parentStyle != null) { parentStyle = stripStylePrefix(parentStyle); if (isSizeStyle(parentStyle, sizeStyles, depth + 1)) { return true; } } } int index = style.lastIndexOf('.'); if (index > 0) { return isSizeStyle(style.substring(0, index), sizeStyles, depth + 1); } return false; }