1 /* 2 * Copyright (C) 2015 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 * in compliance with the License. You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software distributed under the License 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 * or implied. See the License for the specific language governing permissions and limitations under 12 * the License. 13 */ 14 15 package androidx.vectordrawable.graphics.drawable; 16 17 import androidx.annotation.StyleableRes; 18 19 class AndroidResources { 20 21 // Resources ID generated in the latest R.java for framework. 22 static final int[] STYLEABLE_VECTOR_DRAWABLE_TYPE_ARRAY = { 23 android.R.attr.name, android.R.attr.tint, android.R.attr.height, 24 android.R.attr.width, android.R.attr.alpha, android.R.attr.autoMirrored, 25 android.R.attr.tintMode, android.R.attr.viewportWidth, android.R.attr.viewportHeight 26 }; 27 static final int STYLEABLE_VECTOR_DRAWABLE_ALPHA = 4; 28 static final int STYLEABLE_VECTOR_DRAWABLE_AUTO_MIRRORED = 5; 29 static final int STYLEABLE_VECTOR_DRAWABLE_HEIGHT = 2; 30 static final int STYLEABLE_VECTOR_DRAWABLE_NAME = 0; 31 static final int STYLEABLE_VECTOR_DRAWABLE_TINT = 1; 32 static final int STYLEABLE_VECTOR_DRAWABLE_TINT_MODE = 6; 33 static final int STYLEABLE_VECTOR_DRAWABLE_VIEWPORT_HEIGHT = 8; 34 static final int STYLEABLE_VECTOR_DRAWABLE_VIEWPORT_WIDTH = 7; 35 static final int STYLEABLE_VECTOR_DRAWABLE_WIDTH = 3; 36 static final int[] STYLEABLE_VECTOR_DRAWABLE_GROUP = { 37 android.R.attr.name, android.R.attr.pivotX, android.R.attr.pivotY, 38 android.R.attr.scaleX, android.R.attr.scaleY, android.R.attr.rotation, 39 android.R.attr.translateX, android.R.attr.translateY 40 }; 41 static final int STYLEABLE_VECTOR_DRAWABLE_GROUP_NAME = 0; 42 static final int STYLEABLE_VECTOR_DRAWABLE_GROUP_PIVOT_X = 1; 43 static final int STYLEABLE_VECTOR_DRAWABLE_GROUP_PIVOT_Y = 2; 44 static final int STYLEABLE_VECTOR_DRAWABLE_GROUP_ROTATION = 5; 45 static final int STYLEABLE_VECTOR_DRAWABLE_GROUP_SCALE_X = 3; 46 static final int STYLEABLE_VECTOR_DRAWABLE_GROUP_SCALE_Y = 4; 47 static final int STYLEABLE_VECTOR_DRAWABLE_GROUP_TRANSLATE_X = 6; 48 static final int STYLEABLE_VECTOR_DRAWABLE_GROUP_TRANSLATE_Y = 7; 49 static final int[] STYLEABLE_VECTOR_DRAWABLE_PATH = { 50 android.R.attr.name, android.R.attr.fillColor, android.R.attr.pathData, 51 android.R.attr.strokeColor, android.R.attr.strokeWidth, android.R.attr.trimPathStart, 52 android.R.attr.trimPathEnd, android.R.attr.trimPathOffset, android.R.attr.strokeLineCap, 53 android.R.attr.strokeLineJoin, android.R.attr.strokeMiterLimit, 54 android.R.attr.strokeAlpha, android.R.attr.fillAlpha, android.R.attr.fillType 55 }; 56 static final int STYLEABLE_VECTOR_DRAWABLE_PATH_FILL_ALPHA = 12; 57 static final int STYLEABLE_VECTOR_DRAWABLE_PATH_FILL_COLOR = 1; 58 static final int STYLEABLE_VECTOR_DRAWABLE_PATH_NAME = 0; 59 static final int STYLEABLE_VECTOR_DRAWABLE_PATH_PATH_DATA = 2; 60 static final int STYLEABLE_VECTOR_DRAWABLE_PATH_STROKE_ALPHA = 11; 61 static final int STYLEABLE_VECTOR_DRAWABLE_PATH_STROKE_COLOR = 3; 62 static final int STYLEABLE_VECTOR_DRAWABLE_PATH_STROKE_LINE_CAP = 8; 63 static final int STYLEABLE_VECTOR_DRAWABLE_PATH_STROKE_LINE_JOIN = 9; 64 static final int STYLEABLE_VECTOR_DRAWABLE_PATH_STROKE_MITER_LIMIT = 10; 65 static final int STYLEABLE_VECTOR_DRAWABLE_PATH_STROKE_WIDTH = 4; 66 static final int STYLEABLE_VECTOR_DRAWABLE_PATH_TRIM_PATH_END = 6; 67 static final int STYLEABLE_VECTOR_DRAWABLE_PATH_TRIM_PATH_OFFSET = 7; 68 static final int STYLEABLE_VECTOR_DRAWABLE_PATH_TRIM_PATH_START = 5; 69 static final int STYLEABLE_VECTOR_DRAWABLE_PATH_TRIM_PATH_FILLTYPE = 13; 70 static final int[] STYLEABLE_VECTOR_DRAWABLE_CLIP_PATH = { 71 android.R.attr.name, android.R.attr.pathData 72 }; 73 static final int STYLEABLE_VECTOR_DRAWABLE_CLIP_PATH_NAME = 0; 74 static final int STYLEABLE_VECTOR_DRAWABLE_CLIP_PATH_PATH_DATA = 1; 75 76 static final int[] STYLEABLE_ANIMATED_VECTOR_DRAWABLE = { 77 android.R.attr.drawable 78 }; 79 static final int STYLEABLE_ANIMATED_VECTOR_DRAWABLE_DRAWABLE = 0; 80 static final int[] STYLEABLE_ANIMATED_VECTOR_DRAWABLE_TARGET = { 81 android.R.attr.name, android.R.attr.animation 82 }; 83 @StyleableRes 84 static final int STYLEABLE_ANIMATED_VECTOR_DRAWABLE_TARGET_ANIMATION = 1; 85 @StyleableRes 86 static final int STYLEABLE_ANIMATED_VECTOR_DRAWABLE_TARGET_NAME = 0; 87 88 ///////////////////////////////////////////////////////////////////// 89 90 public static final int[] STYLEABLE_ANIMATOR = { 91 0x01010141, 0x01010198, 0x010101be, 0x010101bf, 92 0x010101c0, 0x010102de, 0x010102df, 0x010102e0 93 }; 94 95 public static final int STYLEABLE_ANIMATOR_INTERPOLATOR = 0; 96 public static final int STYLEABLE_ANIMATOR_DURATION = 1; 97 public static final int STYLEABLE_ANIMATOR_START_OFFSET = 2; 98 public static final int STYLEABLE_ANIMATOR_REPEAT_COUNT = 3; 99 public static final int STYLEABLE_ANIMATOR_REPEAT_MODE = 4; 100 public static final int STYLEABLE_ANIMATOR_VALUE_FROM = 5; 101 public static final int STYLEABLE_ANIMATOR_VALUE_TO = 6; 102 public static final int STYLEABLE_ANIMATOR_VALUE_TYPE = 7; 103 public static final int[] STYLEABLE_ANIMATOR_SET = { 104 0x010102e2 105 }; 106 public static final int STYLEABLE_ANIMATOR_SET_ORDERING = 0; 107 108 public static final int[] STYLEABLE_PROPERTY_VALUES_HOLDER = { 109 0x010102de, 0x010102df, 0x010102e0, 0x010102e1 110 }; 111 public static final int STYLEABLE_PROPERTY_VALUES_HOLDER_VALUE_FROM = 0; 112 public static final int STYLEABLE_PROPERTY_VALUES_HOLDER_VALUE_TO = 1; 113 public static final int STYLEABLE_PROPERTY_VALUES_HOLDER_VALUE_TYPE = 2; 114 public static final int STYLEABLE_PROPERTY_VALUES_HOLDER_PROPERTY_NAME = 3; 115 116 public static final int[] STYLEABLE_KEYFRAME = { 117 0x01010024, 0x01010141, 0x010102e0, 0x010104d8 118 }; 119 public static final int STYLEABLE_KEYFRAME_VALUE = 0; 120 public static final int STYLEABLE_KEYFRAME_INTERPOLATOR = 1; 121 public static final int STYLEABLE_KEYFRAME_VALUE_TYPE = 2; 122 public static final int STYLEABLE_KEYFRAME_FRACTION = 3; 123 124 public static final int[] STYLEABLE_PROPERTY_ANIMATOR = { 125 0x010102e1, 0x01010405, 0x01010474, 0x01010475 126 }; 127 public static final int STYLEABLE_PROPERTY_ANIMATOR_PROPERTY_NAME = 0; 128 public static final int STYLEABLE_PROPERTY_ANIMATOR_PATH_DATA = 1; 129 public static final int STYLEABLE_PROPERTY_ANIMATOR_PROPERTY_X_NAME = 2; 130 public static final int STYLEABLE_PROPERTY_ANIMATOR_PROPERTY_Y_NAME = 3; 131 132 133 public static final int[] STYLEABLE_PATH_INTERPOLATOR = { 134 0x010103fc, 0x010103fd, 0x010103fe, 0x010103ff, 135 0x01010405 136 }; 137 138 public static final int STYLEABLE_PATH_INTERPOLATOR_CONTROL_X_1 = 0; 139 public static final int STYLEABLE_PATH_INTERPOLATOR_CONTROL_Y_1 = 1; 140 141 public static final int STYLEABLE_PATH_INTERPOLATOR_CONTROL_X_2 = 2; 142 public static final int STYLEABLE_PATH_INTERPOLATOR_CONTROL_Y_2 = 3; 143 144 public static final int STYLEABLE_PATH_INTERPOLATOR_PATH_DATA = 4; 145 146 public static final int FAST_OUT_LINEAR_IN = 0x010c000f; 147 public static final int FAST_OUT_SLOW_IN = 0x010c000d; 148 public static final int LINEAR_OUT_SLOW_IN = 0x010c000e; 149 150 private AndroidResources() { 151 } 152 } 153