Home | History | Annotate | Download | only in api
      1 /*
      2  * Copyright (C) 2010 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 com.android.ide.common.rendering.api;
     18 
     19 /**
     20  * Enum describing the layout bridge capabilities.
     21  *
     22  */
     23 public enum Capability {
     24     /** Ability to render at full size, as required by the layout, and unbound by the screen */
     25     UNBOUND_RENDERING,
     26     /** Ability to override the background of the rendering with transparency using
     27      * {@link SessionParams#setOverrideBgColor(int)} */
     28     CUSTOM_BACKGROUND_COLOR,
     29     /** Ability to call {@link RenderSession#render()} and {@link RenderSession#render(long)}. */
     30     RENDER,
     31     /** Ability to ask for a layout only with no rendering through
     32      * {@link SessionParams#setLayoutOnly()}
     33      */
     34     LAYOUT_ONLY,
     35     /**
     36      * Ability to control embedded layout parsers through {@link ILayoutPullParser#getParser(String)}
     37      */
     38     EMBEDDED_LAYOUT,
     39     /** Ability to call<br>
     40      * {@link RenderSession#insertChild(Object, ILayoutPullParser, int, IAnimationListener)}<br>
     41      * {@link RenderSession#moveChild(Object, Object, int, java.util.Map, IAnimationListener)}<br>
     42      * {@link RenderSession#setProperty(Object, String, String)}<br>
     43      * The method that receives an animation listener can only use it if the
     44      * ANIMATED_VIEW_MANIPULATION, or FULL_ANIMATED_VIEW_MANIPULATION is also supported.
     45      */
     46     VIEW_MANIPULATION,
     47     /** Ability to play animations with<br>
     48      * {@link RenderSession#animate(Object, String, boolean, IAnimationListener)}
     49      */
     50     PLAY_ANIMATION,
     51     /**
     52      * Ability to manipulate views with animation, as long as the view does not change parent.
     53      * {@link RenderSession#insertChild(Object, ILayoutPullParser, int, IAnimationListener)}<br>
     54      * {@link RenderSession#moveChild(Object, Object, int, java.util.Map, IAnimationListener)}<br>
     55      * {@link RenderSession#removeChild(Object, IAnimationListener)}<br>
     56      */
     57     ANIMATED_VIEW_MANIPULATION,
     58     /**
     59      * Ability to move views (even into a different ViewGroup) with animation.
     60      * see {@link RenderSession#moveChild(Object, Object, int, java.util.Map, IAnimationListener)}
     61      */
     62     FULL_ANIMATED_VIEW_MANIPULATION,
     63     ADAPTER_BINDING,
     64     EXTENDED_VIEWINFO;
     65 }
     66