Home | History | Annotate | Download | only in transition
      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 android.support.transition;
     18 
     19 import android.annotation.SuppressLint;
     20 import android.support.annotation.StyleableRes;
     21 
     22 /**
     23  * Copies of styleable ID values generated in the platform R.java.
     24  */
     25 @SuppressLint("InlinedApi")
     26 class Styleable {
     27 
     28     @StyleableRes
     29     static final int[] TRANSITION_TARGET = {
     30             android.R.attr.targetClass,
     31             android.R.attr.targetId,
     32             android.R.attr.excludeId,
     33             android.R.attr.excludeClass,
     34             android.R.attr.targetName,
     35             android.R.attr.excludeName,
     36     };
     37 
     38     interface TransitionTarget {
     39         @StyleableRes
     40         int TARGET_CLASS = 0;
     41         @StyleableRes
     42         int TARGET_ID = 1;
     43         @StyleableRes
     44         int EXCLUDE_ID = 2;
     45         @StyleableRes
     46         int EXCLUDE_CLASS = 3;
     47         @StyleableRes
     48         int TARGET_NAME = 4;
     49         @StyleableRes
     50         int EXCLUDE_NAME = 5;
     51     }
     52 
     53     @StyleableRes
     54     static final int[] TRANSITION_MANAGER = {
     55             android.R.attr.fromScene,
     56             android.R.attr.toScene,
     57             android.R.attr.transition,
     58     };
     59 
     60     interface TransitionManager {
     61         @StyleableRes
     62         int FROM_SCENE = 0;
     63         @StyleableRes
     64         int TO_SCENE = 1;
     65         @StyleableRes
     66         int TRANSITION = 2;
     67     }
     68 
     69     @StyleableRes
     70     static final int[] TRANSITION = {
     71             android.R.attr.interpolator,
     72             android.R.attr.duration,
     73             android.R.attr.startDelay,
     74             android.R.attr.matchOrder,
     75     };
     76 
     77     interface Transition {
     78         @StyleableRes
     79         int INTERPOLATOR = 0;
     80         @StyleableRes
     81         int DURATION = 1;
     82         @StyleableRes
     83         int START_DELAY = 2;
     84         @StyleableRes
     85         int MATCH_ORDER = 3;
     86     }
     87 
     88     @StyleableRes
     89     static final int[] CHANGE_BOUNDS = {
     90             android.R.attr.resizeClip,
     91     };
     92 
     93     interface ChangeBounds {
     94         @StyleableRes
     95         int RESIZE_CLIP = 0;
     96     }
     97 
     98     @StyleableRes
     99     static final int[] VISIBILITY_TRANSITION = {
    100             android.R.attr.transitionVisibilityMode,
    101     };
    102 
    103     interface VisibilityTransition {
    104         @StyleableRes
    105         int TRANSITION_VISIBILITY_MODE = 0;
    106     }
    107 
    108     @StyleableRes
    109     static final int[] FADE = {
    110             android.R.attr.fadingMode,
    111     };
    112 
    113     interface Fade {
    114         @StyleableRes
    115         int FADING_MODE = 0;
    116     }
    117 
    118     @StyleableRes
    119     static final int[] CHANGE_TRANSFORM = {
    120             android.R.attr.reparent,
    121             android.R.attr.reparentWithOverlay,
    122     };
    123 
    124     interface ChangeTransform {
    125         @StyleableRes
    126         int REPARENT = 0;
    127         @StyleableRes
    128         int REPARENT_WITH_OVERLAY = 1;
    129     }
    130 
    131     @StyleableRes
    132     static final int[] SLIDE = {
    133             android.R.attr.slideEdge,
    134     };
    135 
    136     interface Slide {
    137         @StyleableRes
    138         int SLIDE_EDGE = 0;
    139     }
    140 
    141     @StyleableRes
    142     static final int[] TRANSITION_SET = {
    143             android.R.attr.transitionOrdering,
    144     };
    145 
    146     interface TransitionSet {
    147         @StyleableRes
    148         int TRANSITION_ORDERING = 0;
    149     }
    150 
    151     @StyleableRes
    152     static final int[] ARC_MOTION = {
    153             android.R.attr.minimumHorizontalAngle,
    154             android.R.attr.minimumVerticalAngle,
    155             android.R.attr.maximumAngle,
    156     };
    157 
    158     interface ArcMotion {
    159         @StyleableRes
    160         int MINIMUM_HORIZONTAL_ANGLE = 0;
    161         @StyleableRes
    162         int MINIMUM_VERTICAL_ANGLE = 1;
    163         @StyleableRes
    164         int MAXIMUM_ANGLE = 2;
    165     }
    166 
    167     @StyleableRes
    168     static final int[] PATTERN_PATH_MOTION = {
    169             android.R.attr.patternPathData,
    170     };
    171 
    172     interface PatternPathMotion {
    173         @StyleableRes
    174         int PATTERN_PATH_DATA = 0;
    175     }
    176 
    177 }
    178