1 /* 2 * Copyright (C) 2017 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package androidx.transition; 18 19 import android.annotation.SuppressLint; 20 21 import androidx.annotation.StyleableRes; 22 23 /** 24 * Copies of styleable ID values generated in the platform R.java. 25 */ 26 @SuppressLint("InlinedApi") 27 class Styleable { 28 29 @StyleableRes 30 static final int[] TRANSITION_TARGET = { 31 android.R.attr.targetClass, 32 android.R.attr.targetId, 33 android.R.attr.excludeId, 34 android.R.attr.excludeClass, 35 android.R.attr.targetName, 36 android.R.attr.excludeName, 37 }; 38 39 interface TransitionTarget { 40 @StyleableRes 41 int TARGET_CLASS = 0; 42 @StyleableRes 43 int TARGET_ID = 1; 44 @StyleableRes 45 int EXCLUDE_ID = 2; 46 @StyleableRes 47 int EXCLUDE_CLASS = 3; 48 @StyleableRes 49 int TARGET_NAME = 4; 50 @StyleableRes 51 int EXCLUDE_NAME = 5; 52 } 53 54 @StyleableRes 55 static final int[] TRANSITION_MANAGER = { 56 android.R.attr.fromScene, 57 android.R.attr.toScene, 58 android.R.attr.transition, 59 }; 60 61 interface TransitionManager { 62 @StyleableRes 63 int FROM_SCENE = 0; 64 @StyleableRes 65 int TO_SCENE = 1; 66 @StyleableRes 67 int TRANSITION = 2; 68 } 69 70 @StyleableRes 71 static final int[] TRANSITION = { 72 android.R.attr.interpolator, 73 android.R.attr.duration, 74 android.R.attr.startDelay, 75 android.R.attr.matchOrder, 76 }; 77 78 interface Transition { 79 @StyleableRes 80 int INTERPOLATOR = 0; 81 @StyleableRes 82 int DURATION = 1; 83 @StyleableRes 84 int START_DELAY = 2; 85 @StyleableRes 86 int MATCH_ORDER = 3; 87 } 88 89 @StyleableRes 90 static final int[] CHANGE_BOUNDS = { 91 android.R.attr.resizeClip, 92 }; 93 94 interface ChangeBounds { 95 @StyleableRes 96 int RESIZE_CLIP = 0; 97 } 98 99 @StyleableRes 100 static final int[] VISIBILITY_TRANSITION = { 101 android.R.attr.transitionVisibilityMode, 102 }; 103 104 interface VisibilityTransition { 105 @StyleableRes 106 int TRANSITION_VISIBILITY_MODE = 0; 107 } 108 109 @StyleableRes 110 static final int[] FADE = { 111 android.R.attr.fadingMode, 112 }; 113 114 interface Fade { 115 @StyleableRes 116 int FADING_MODE = 0; 117 } 118 119 @StyleableRes 120 static final int[] CHANGE_TRANSFORM = { 121 android.R.attr.reparent, 122 android.R.attr.reparentWithOverlay, 123 }; 124 125 interface ChangeTransform { 126 @StyleableRes 127 int REPARENT = 0; 128 @StyleableRes 129 int REPARENT_WITH_OVERLAY = 1; 130 } 131 132 @StyleableRes 133 static final int[] SLIDE = { 134 android.R.attr.slideEdge, 135 }; 136 137 interface Slide { 138 @StyleableRes 139 int SLIDE_EDGE = 0; 140 } 141 142 @StyleableRes 143 static final int[] TRANSITION_SET = { 144 android.R.attr.transitionOrdering, 145 }; 146 147 interface TransitionSet { 148 @StyleableRes 149 int TRANSITION_ORDERING = 0; 150 } 151 152 @StyleableRes 153 static final int[] ARC_MOTION = { 154 android.R.attr.minimumHorizontalAngle, 155 android.R.attr.minimumVerticalAngle, 156 android.R.attr.maximumAngle, 157 }; 158 159 interface ArcMotion { 160 @StyleableRes 161 int MINIMUM_HORIZONTAL_ANGLE = 0; 162 @StyleableRes 163 int MINIMUM_VERTICAL_ANGLE = 1; 164 @StyleableRes 165 int MAXIMUM_ANGLE = 2; 166 } 167 168 @StyleableRes 169 static final int[] PATTERN_PATH_MOTION = { 170 android.R.attr.patternPathData, 171 }; 172 173 interface PatternPathMotion { 174 @StyleableRes 175 int PATTERN_PATH_DATA = 0; 176 } 177 Styleable()178 private Styleable() { 179 } 180 } 181