private void checkSizeSetInTheme() { // Look through the styles and determine whether each style is a theme if (mStyleParents == null) { return; } Map<String, Boolean> isTheme = Maps.newHashMap(); for (String style : mStyleParents.keySet()) { if (isTheme(stripStylePrefix(style), isTheme, 0)) { mSetWidthInTheme = true; mSetHeightInTheme = true; break; } } }
private void checkSizeSetInTheme() { // Look through the styles and determine whether each style is a theme if (mStyleParents == null) { return; } Map<String, Boolean> isTheme = Maps.newHashMap(); for (String style : mStyleParents.keySet()) { if (isTheme(stripStylePrefix(style), isTheme, 0)) { mSetWidthInTheme = true; mSetHeightInTheme = true; break; } } }
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(String style, Set<String> sizeStyles) { if (isFrameworkSizeStyle(style)) { return true; } if (sizeStyles == null) { return false; } return isSizeStyle(stripStylePrefix(style), sizeStyles, 0); }
String parentStyle = mStyleParents.get(style); if (parentStyle != null) { parentStyle = stripStylePrefix(parentStyle); if (isTheme(parentStyle, isTheme, depth + 1)) { isTheme.put(style, true);
String parentStyle = mStyleParents.get(style); if (parentStyle != null) { parentStyle = stripStylePrefix(parentStyle); if (isTheme(parentStyle, isTheme, depth + 1)) { isTheme.put(style, true);
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( @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; }