# LayoutTransition

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Nested Classes](https://developer.android.com/reference/android/animation/LayoutTransition#nestedclasses)\|[Constants](https://developer.android.com/reference/android/animation/LayoutTransition#constants)\|[Ctors](https://developer.android.com/reference/android/animation/LayoutTransition#pubctors)\|[Methods](https://developer.android.com/reference/android/animation/LayoutTransition#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/animation/LayoutTransition#inhmethods)  

# LayoutTransition

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/animation/LayoutTransition "View this page in Kotlin")\|Java

`
public


class
LayoutTransition
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.animation.LayoutTransition |

<br />

*** ** * ** ***

This class enables automatic animations on layout changes in ViewGroup objects. To enable transitions for a layout container, create a LayoutTransition object and set it on any ViewGroup by calling[ViewGroup.setLayoutTransition(LayoutTransition)](https://developer.android.com/reference/android/view/ViewGroup#setLayoutTransition(android.animation.LayoutTransition)). This will cause default animations to run whenever items are added to or removed from that container. To specify custom animations, use the[setAnimator()](https://developer.android.com/reference/android/animation/LayoutTransition#setAnimator(int,%20android.animation.Animator))method.

One of the core concepts of these transition animations is that there are two types of changes that cause the transition and four different animations that run because of those changes. The changes that trigger the transition are items being added to a container (referred to as an "appearing" transition) or removed from a container (also known as "disappearing"). Setting the visibility of views (between GONE and VISIBLE) will trigger the same add/remove logic. The animations that run due to those events are one that animates items being added, one that animates items being removed, and two that animate the other items in the container that change due to the add/remove occurrence. Users of the transition may want different animations for the changing items depending on whether they are changing due to an appearing or disappearing event, so there is one animation for each of these variations of the changing event. Most of the API of this class is concerned with setting up the basic properties of the animations used in these four situations, or with setting up custom animations for any or all of the four.

By default, the DISAPPEARING animation begins immediately, as does the CHANGE_APPEARING animation. The other animations begin after a delay that is set to the default duration of the animations. This behavior facilitates a sequence of animations in transitions as follows: when an item is being added to a layout, the other children of that container will move first (thus creating space for the new item), then the appearing animation will run to animate the item being added. Conversely, when an item is removed from a container, the animation to remove it will run first, then the animations of the other children in the layout will run (closing the gap created in the layout when the item was removed). If this default choreography behavior is not desired, the[setDuration(int, long)](https://developer.android.com/reference/android/animation/LayoutTransition#setDuration(int,%20long))and[setStartDelay(int, long)](https://developer.android.com/reference/android/animation/LayoutTransition#setStartDelay(int,%20long))of any or all of the animations can be changed as appropriate. Keep in mind, however, that if you start an APPEARING animation before a DISAPPEARING animation is completed, the DISAPPEARING animation stops, and any effects from the DISAPPEARING animation are reverted. If you instead start a DISAPPEARING animation before an APPEARING animation is completed, a similar set of effects occurs for the APPEARING animation.

The animations specified for the transition, both the defaults and any custom animations set on the transition object, are templates only. That is, these animations exist to hold the basic animation properties, such as the duration, start delay, and properties being animated. But the actual target object, as well as the start and end values for those properties, are set automatically in the process of setting up the transition each time it runs. Each of the animations is cloned from the original copy and the clone is then populated with the dynamic values of the target being animated (such as one of the items in a layout container that is moving as a result of the layout event) as well as the values that are changing (such as the position and size of that object). The actual values that are pushed to each animation depends on what properties are specified for the animation. For example, the default CHANGE_APPEARING animation animates the`left`,`top`,`right`,`bottom`,`scrollX`, and`scrollY`properties. Values for these properties are updated with the pre- and post-layout values when the transition begins. Custom animations will be similarly populated with the target and values being animated, assuming they use ObjectAnimator objects with property names that are known on the target object.

This class, and the associated XML flag for containers, animateLayoutChanges="true", provides a simple utility meant for automating changes in straightforward situations. Using LayoutTransition at multiple levels of a nested view hierarchy may not work due to the interrelationship of the various levels of layout. Also, a container that is being scrolled at the same time as items are being added or removed is probably not a good candidate for this utility, because the before/after locations calculated by LayoutTransition may not match the actual locations when the animations finish due to the container being scrolled as the animations are running. You can work around that particular issue by disabling the 'changing' animations by setting the CHANGE_APPEARING and CHANGE_DISAPPEARING animations to null, and setting the startDelay of the other animations appropriately.

<br />

## Summary

|                                                                                                           ### Nested classes                                                                                                           ||
|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` interface` | [LayoutTransition.TransitionListener](https://developer.android.com/reference/android/animation/LayoutTransition.TransitionListener) This interface is used for listening to starting and ending events for transitions. |

|                                                                                                                               ### Constants                                                                                                                                ||
|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#APPEARING) A flag indicating the animation that runs on those items that are appearing in the container.                                                                     |
| `int` | [CHANGE_APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_APPEARING) A flag indicating the animation that runs on those items that are changing due to a new item appearing in the container.                            |
| `int` | [CHANGE_DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_DISAPPEARING) A flag indicating the animation that runs on those items that are changing due to an item disappearing from the container.                    |
| `int` | [CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING) A flag indicating the animation that runs on those items that are changing due to a layout change not caused by items being added to or removed from the container. |
| `int` | [DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#DISAPPEARING) A flag indicating the animation that runs on those items that are disappearing from the container.                                                          |

|                                                                      ### Public constructors                                                                       ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[LayoutTransition](https://developer.android.com/reference/android/animation/LayoutTransition#LayoutTransition())`() ` Constructs a LayoutTransition object. |

|                                                                                                                                                                                                                                                                                                                                                                                     ### Public methods                                                                                                                                                                                                                                                                                                                                                                                     ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void`                                                                                                                                                                                                     | ` `[addChild](https://developer.android.com/reference/android/animation/LayoutTransition#addChild(android.view.ViewGroup,%20android.view.View))`(`[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup)` parent, `[View](https://developer.android.com/reference/android/view/View)` child) ` This method is called by ViewGroup when a child view is about to be added to the container.                                                                                                                                                               |
| ` void`                                                                                                                                                                                                     | ` `[addTransitionListener](https://developer.android.com/reference/android/animation/LayoutTransition#addTransitionListener(android.animation.LayoutTransition.TransitionListener))`(`[LayoutTransition.TransitionListener](https://developer.android.com/reference/android/animation/LayoutTransition.TransitionListener)` listener) ` Add a listener that will be called when the bounds of the view change due to layout processing.                                                                                                                                       |
| ` void`                                                                                                                                                                                                     | ` `[disableTransitionType](https://developer.android.com/reference/android/animation/LayoutTransition#disableTransitionType(int))`(int transitionType) ` Disables the specified transitionType for this LayoutTransition object.                                                                                                                                                                                                                                                                                                                                              |
| ` void`                                                                                                                                                                                                     | ` `[enableTransitionType](https://developer.android.com/reference/android/animation/LayoutTransition#enableTransitionType(int))`(int transitionType) ` Enables the specified transitionType for this LayoutTransition object.                                                                                                                                                                                                                                                                                                                                                 |
| ` `[Animator](https://developer.android.com/reference/android/animation/Animator)                                                                                                                           | ` `[getAnimator](https://developer.android.com/reference/android/animation/LayoutTransition#getAnimator(int))`(int transitionType) ` Gets the animation used during one of the transition types that may run.                                                                                                                                                                                                                                                                                                                                                                 |
| ` long`                                                                                                                                                                                                     | ` `[getDuration](https://developer.android.com/reference/android/animation/LayoutTransition#getDuration(int))`(int transitionType) ` Gets the duration on one of the animation objects used by this transition.                                                                                                                                                                                                                                                                                                                                                               |
| ` `[TimeInterpolator](https://developer.android.com/reference/android/animation/TimeInterpolator)                                                                                                           | ` `[getInterpolator](https://developer.android.com/reference/android/animation/LayoutTransition#getInterpolator(int))`(int transitionType) ` Gets the interpolator on one of the animation objects used by this transition.                                                                                                                                                                                                                                                                                                                                                   |
| ` long`                                                                                                                                                                                                     | ` `[getStagger](https://developer.android.com/reference/android/animation/LayoutTransition#getStagger(int))`(int transitionType) ` Gets the length of time to delay between starting each animation during one of the change animations.                                                                                                                                                                                                                                                                                                                                      |
| ` long`                                                                                                                                                                                                     | ` `[getStartDelay](https://developer.android.com/reference/android/animation/LayoutTransition#getStartDelay(int))`(int transitionType) ` Gets the start delay on one of the animation objects used by this transition.                                                                                                                                                                                                                                                                                                                                                        |
| ` `[List](https://developer.android.com/reference/java/util/List)`<`[LayoutTransition.TransitionListener](https://developer.android.com/reference/android/animation/LayoutTransition.TransitionListener)`>` | ` `[getTransitionListeners](https://developer.android.com/reference/android/animation/LayoutTransition#getTransitionListeners())`() ` Gets the current list of listeners for layout changes.                                                                                                                                                                                                                                                                                                                                                                                  |
| ` void`                                                                                                                                                                                                     | ` `[hideChild](https://developer.android.com/reference/android/animation/LayoutTransition#hideChild(android.view.ViewGroup,%20android.view.View))`(`[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup)` parent, `[View](https://developer.android.com/reference/android/view/View)` child) ` *This method was deprecated in API level 16. Use[hideChild(android.view.ViewGroup, android.view.View, int)](https://developer.android.com/reference/android/animation/LayoutTransition#hideChild(android.view.ViewGroup,%20android.view.View,%20int)).* |
| ` void`                                                                                                                                                                                                     | ` `[hideChild](https://developer.android.com/reference/android/animation/LayoutTransition#hideChild(android.view.ViewGroup,%20android.view.View,%20int))`(`[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup)` parent, `[View](https://developer.android.com/reference/android/view/View)` child, int newVisibility) ` This method is called by ViewGroup when a child view is about to be hidden in container.                                                                                                                                      |
| ` boolean`                                                                                                                                                                                                  | ` `[isChangingLayout](https://developer.android.com/reference/android/animation/LayoutTransition#isChangingLayout())`() ` Returns true if animations are running which animate layout-related properties.                                                                                                                                                                                                                                                                                                                                                                     |
| ` boolean`                                                                                                                                                                                                  | ` `[isRunning](https://developer.android.com/reference/android/animation/LayoutTransition#isRunning())`() ` Returns true if any of the animations in this transition are currently running.                                                                                                                                                                                                                                                                                                                                                                                   |
| ` boolean`                                                                                                                                                                                                  | ` `[isTransitionTypeEnabled](https://developer.android.com/reference/android/animation/LayoutTransition#isTransitionTypeEnabled(int))`(int transitionType) ` Returns whether the specified transitionType is enabled for this LayoutTransition object.                                                                                                                                                                                                                                                                                                                        |
| ` void`                                                                                                                                                                                                     | ` `[removeChild](https://developer.android.com/reference/android/animation/LayoutTransition#removeChild(android.view.ViewGroup,%20android.view.View))`(`[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup)` parent, `[View](https://developer.android.com/reference/android/view/View)` child) ` This method is called by ViewGroup when a child view is about to be removed from the container.                                                                                                                                                     |
| ` void`                                                                                                                                                                                                     | ` `[removeTransitionListener](https://developer.android.com/reference/android/animation/LayoutTransition#removeTransitionListener(android.animation.LayoutTransition.TransitionListener))`(`[LayoutTransition.TransitionListener](https://developer.android.com/reference/android/animation/LayoutTransition.TransitionListener)` listener) ` Remove a listener for layout changes.                                                                                                                                                                                           |
| ` void`                                                                                                                                                                                                     | ` `[setAnimateParentHierarchy](https://developer.android.com/reference/android/animation/LayoutTransition#setAnimateParentHierarchy(boolean))`(boolean animateParentHierarchy) ` This flag controls whether CHANGE_APPEARING or CHANGE_DISAPPEARING animations will cause the default changing animation to be run on the parent hierarchy as well.                                                                                                                                                                                                                           |
| ` void`                                                                                                                                                                                                     | ` `[setAnimator](https://developer.android.com/reference/android/animation/LayoutTransition#setAnimator(int,%20android.animation.Animator))`(int transitionType, `[Animator](https://developer.android.com/reference/android/animation/Animator)` animator) ` Sets the animation used during one of the transition types that may run.                                                                                                                                                                                                                                        |
| ` void`                                                                                                                                                                                                     | ` `[setDuration](https://developer.android.com/reference/android/animation/LayoutTransition#setDuration(int,%20long))`(int transitionType, long duration) ` Sets the duration on one of the animation objects used by this transition.                                                                                                                                                                                                                                                                                                                                        |
| ` void`                                                                                                                                                                                                     | ` `[setDuration](https://developer.android.com/reference/android/animation/LayoutTransition#setDuration(long))`(long duration) ` Sets the duration to be used by all animations of this transition object.                                                                                                                                                                                                                                                                                                                                                                    |
| ` void`                                                                                                                                                                                                     | ` `[setInterpolator](https://developer.android.com/reference/android/animation/LayoutTransition#setInterpolator(int,%20android.animation.TimeInterpolator))`(int transitionType, `[TimeInterpolator](https://developer.android.com/reference/android/animation/TimeInterpolator)` interpolator) ` Sets the interpolator on one of the animation objects used by this transition.                                                                                                                                                                                              |
| ` void`                                                                                                                                                                                                     | ` `[setStagger](https://developer.android.com/reference/android/animation/LayoutTransition#setStagger(int,%20long))`(int transitionType, long duration) ` Sets the length of time to delay between starting each animation during one of the change animations.                                                                                                                                                                                                                                                                                                               |
| ` void`                                                                                                                                                                                                     | ` `[setStartDelay](https://developer.android.com/reference/android/animation/LayoutTransition#setStartDelay(int,%20long))`(int transitionType, long delay) ` Sets the start delay on one of the animation objects used by this transition.                                                                                                                                                                                                                                                                                                                                    |
| ` void`                                                                                                                                                                                                     | ` `[showChild](https://developer.android.com/reference/android/animation/LayoutTransition#showChild(android.view.ViewGroup,%20android.view.View))`(`[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup)` parent, `[View](https://developer.android.com/reference/android/view/View)` child) ` *This method was deprecated in API level 16. Use[showChild(android.view.ViewGroup, android.view.View, int)](https://developer.android.com/reference/android/animation/LayoutTransition#showChild(android.view.ViewGroup,%20android.view.View,%20int)).* |
| ` void`                                                                                                                                                                                                     | ` `[showChild](https://developer.android.com/reference/android/animation/LayoutTransition#showChild(android.view.ViewGroup,%20android.view.View,%20int))`(`[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup)` parent, `[View](https://developer.android.com/reference/android/view/View)` child, int oldVisibility) ` This method is called by ViewGroup when a child view is about to be made visible in the container.                                                                                                                            |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Constants

### APPEARING

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int APPEARING
```

A flag indicating the animation that runs on those items that are appearing in the container.

<br />

Constant Value: 2 (0x00000002)  

### CHANGE_APPEARING

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int CHANGE_APPEARING
```

A flag indicating the animation that runs on those items that are changing due to a new item appearing in the container.

<br />

Constant Value: 0 (0x00000000)  

### CHANGE_DISAPPEARING

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int CHANGE_DISAPPEARING
```

A flag indicating the animation that runs on those items that are changing due to an item disappearing from the container.

<br />

Constant Value: 1 (0x00000001)  

### CHANGING

Added in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int CHANGING
```

A flag indicating the animation that runs on those items that are changing due to a layout change not caused by items being added to or removed from the container. This transition type is not enabled by default; it can be enabled via[enableTransitionType(int)](https://developer.android.com/reference/android/animation/LayoutTransition#enableTransitionType(int)).

<br />

Constant Value: 4 (0x00000004)  

### DISAPPEARING

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int DISAPPEARING
```

A flag indicating the animation that runs on those items that are disappearing from the container.

<br />

Constant Value: 3 (0x00000003)

## Public constructors

### LayoutTransition

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public LayoutTransition ()
```

Constructs a LayoutTransition object. By default, the object will listen to layout events on any ViewGroup that it is set on and will run default animations for each type of layout event.

<br />

## Public methods

### addChild

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void addChild (ViewGroup parent, 
                View child)
```

This method is called by ViewGroup when a child view is about to be added to the container. This callback starts the process of a transition; we grab the starting values, listen for changes to all of the children of the container, and start appropriate animations.

<br />

|                                  Parameters                                   ||
|----------|---------------------------------------------------------------------|
| `parent` | `ViewGroup`: The ViewGroup to which the View is being added. <br /> |
| `child`  | `View`: The View being added to the ViewGroup. <br />               |

### addTransitionListener

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void addTransitionListener (LayoutTransition.TransitionListener listener)
```

Add a listener that will be called when the bounds of the view change due to layout processing.

<br />

|                                                      Parameters                                                       ||
|------------|-----------------------------------------------------------------------------------------------------------|
| `listener` | `LayoutTransition.TransitionListener`: The listener that will be called when layout bounds change. <br /> |

### disableTransitionType

Added in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void disableTransitionType (int transitionType)
```

Disables the specified transitionType for this LayoutTransition object. By default, all transition types except[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING)are enabled.

<br />

|                                                                                                                                                                                                                                                                                        Parameters                                                                                                                                                                                                                                                                                         ||
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `transitionType` | `int`: One of[CHANGE_APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_APPEARING),[CHANGE_DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_DISAPPEARING),[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING),[APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#APPEARING), or[DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#DISAPPEARING). <br /> |

### enableTransitionType

Added in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void enableTransitionType (int transitionType)
```

Enables the specified transitionType for this LayoutTransition object. By default, a LayoutTransition listens for changes in children being added/remove/hidden/shown in the container, and runs the animations associated with those events. That is, all transition types besides[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING)are enabled by default. You can also enable[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING)animations by calling this method with the[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING)transitionType.

<br />

|                                                                                                                                                                                                                                                                                        Parameters                                                                                                                                                                                                                                                                                         ||
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `transitionType` | `int`: One of[CHANGE_APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_APPEARING),[CHANGE_DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_DISAPPEARING),[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING),[APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#APPEARING), or[DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#DISAPPEARING). <br /> |

### getAnimator

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Animator getAnimator (int transitionType)
```

Gets the animation used during one of the transition types that may run.

<br />

|                                                                                                                                                                                                                                                                                                                         Parameters                                                                                                                                                                                                                                                                                                                         ||
|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `transitionType` | `int`: One of[CHANGE_APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_APPEARING),[CHANGE_DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_DISAPPEARING),[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING),[APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#APPEARING), or[DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#DISAPPEARING), which determines the animation whose animator is being returned. <br /> |

|                                                                         Returns                                                                         ||
|--------------------------------------------------------------------------------|-------------------------------------------------------------------------|
| [Animator](https://developer.android.com/reference/android/animation/Animator) | Animator The animation being used for the given transition type. <br /> |

**See also:**

- [setAnimator(int, Animator)](https://developer.android.com/reference/android/animation/LayoutTransition#setAnimator(int,%20android.animation.Animator))  

### getDuration

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public long getDuration (int transitionType)
```

Gets the duration on one of the animation objects used by this transition. The`transitionType`parameter determines the animation whose duration is returned.

<br />

|                                                                                                                                                                                                                                                                                                                      Parameters                                                                                                                                                                                                                                                                                                                      ||
|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `transitionType` | `int`: One of[CHANGE_APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_APPEARING),[CHANGE_DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_DISAPPEARING),[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING),[APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#APPEARING), or[DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#DISAPPEARING), which determines the animation whose duration is returned. <br /> |

|                           Returns                            ||
|--------|------------------------------------------------------|
| `long` | long The duration of the specified animation. <br /> |

**See also:**

- [Animator.getDuration()](https://developer.android.com/reference/android/animation/Animator#getDuration())  

### getInterpolator

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public TimeInterpolator getInterpolator (int transitionType)
```

Gets the interpolator on one of the animation objects used by this transition. The`transitionType`parameter determines the animation whose interpolator is returned.

<br />

|                                                                                                                                                                                                                                                                                                                           Parameters                                                                                                                                                                                                                                                                                                                           ||
|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `transitionType` | `int`: One of[CHANGE_APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_APPEARING),[CHANGE_DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_DISAPPEARING),[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING),[APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#APPEARING), or[DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#DISAPPEARING), which determines the animation whose interpolator is being returned. <br /> |

|                                                                                   Returns                                                                                   ||
|------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|
| [TimeInterpolator](https://developer.android.com/reference/android/animation/TimeInterpolator) | TimeInterpolator The interpolator that the specified animation uses. <br /> |

**See also:**

- [Animator.setInterpolator(TimeInterpolator)](https://developer.android.com/reference/android/animation/Animator#setInterpolator(android.animation.TimeInterpolator))  

### getStagger

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public long getStagger (int transitionType)
```

Gets the length of time to delay between starting each animation during one of the change animations.

<br />

|                                                                                                                                                                                     Parameters                                                                                                                                                                                      ||
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `transitionType` | `int`: A value of[CHANGE_APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_APPEARING),[CHANGE_DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_DISAPPEARING), or[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING). <br /> |

|                                                        Returns                                                         ||
|--------|----------------------------------------------------------------------------------------------------------------|
| `long` | long The length of time, in milliseconds, to delay before launching the next animation in the sequence. <br /> |

### getStartDelay

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public long getStartDelay (int transitionType)
```

Gets the start delay on one of the animation objects used by this transition. The`transitionType`parameter determines the animation whose start delay is returned.

<br />

|                                                                                                                                                                                                                                                                                                                       Parameters                                                                                                                                                                                                                                                                                                                        ||
|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `transitionType` | `int`: One of[CHANGE_APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_APPEARING),[CHANGE_DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_DISAPPEARING),[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING),[APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#APPEARING), or[DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#DISAPPEARING), which determines the animation whose start delay is returned. <br /> |

|                             Returns                             ||
|--------|---------------------------------------------------------|
| `long` | long The start delay of the specified animation. <br /> |

**See also:**

- [Animator.getStartDelay()](https://developer.android.com/reference/android/animation/Animator#getStartDelay())  

### getTransitionListeners

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public List<LayoutTransition.TransitionListener> getTransitionListeners ()
```

Gets the current list of listeners for layout changes.

<br />

|                                                                                                     Returns                                                                                                      ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|
| [List](https://developer.android.com/reference/java/util/List)`<`[LayoutTransition.TransitionListener](https://developer.android.com/reference/android/animation/LayoutTransition.TransitionListener)`>` | <br /> |

### hideChild

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void hideChild (ViewGroup parent, 
                View child)
```

<br />

**This method was deprecated in API level 16.**   
Use[hideChild(android.view.ViewGroup, android.view.View, int)](https://developer.android.com/reference/android/animation/LayoutTransition#hideChild(android.view.ViewGroup,%20android.view.View,%20int)).

<br />

<br />

|          Parameters          ||
|----------|--------------------|
| `parent` | `ViewGroup` <br /> |
| `child`  | `View` <br />      |

### hideChild

Added in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void hideChild (ViewGroup parent, 
                View child, 
                int newVisibility)
```

This method is called by ViewGroup when a child view is about to be hidden in container. This callback starts the process of a transition; we grab the starting values, listen for changes to all of the children of the container, and start appropriate animations.

<br />

|                                                                                                                      Parameters                                                                                                                      ||
|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `parent`        | `ViewGroup`: The parent ViewGroup of the View being hidden. <br />                                                                                                                                                                  |
| `child`         | `View`: The View being hidden. <br />                                                                                                                                                                                               |
| `newVisibility` | `int`: The new visibility value of the child View, either[View.GONE](https://developer.android.com/reference/android/view/View#GONE)or[View.INVISIBLE](https://developer.android.com/reference/android/view/View#INVISIBLE). <br /> |

### isChangingLayout

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean isChangingLayout ()
```

Returns true if animations are running which animate layout-related properties. This essentially means that either CHANGE_APPEARING or CHANGE_DISAPPEARING animations are running, since these animations operate on layout-related properties.

<br />

|                                               Returns                                               ||
|-----------|------------------------------------------------------------------------------------------|
| `boolean` | true if CHANGE_APPEARING or CHANGE_DISAPPEARING animations are currently running. <br /> |

### isRunning

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean isRunning ()
```

Returns true if any of the animations in this transition are currently running.

<br />

|                                 Returns                                 ||
|-----------|--------------------------------------------------------------|
| `boolean` | true if any animations in the transition are running. <br /> |

### isTransitionTypeEnabled

Added in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean isTransitionTypeEnabled (int transitionType)
```

Returns whether the specified transitionType is enabled for this LayoutTransition object. By default, all transition types except[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING)are enabled.

<br />

|                                                                                                                                                                                                                                                                                        Parameters                                                                                                                                                                                                                                                                                         ||
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `transitionType` | `int`: One of[CHANGE_APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_APPEARING),[CHANGE_DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_DISAPPEARING),[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING),[APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#APPEARING), or[DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#DISAPPEARING). <br /> |

|                                            Returns                                            ||
|-----------|------------------------------------------------------------------------------------|
| `boolean` | true if the specified transitionType is currently enabled, false otherwise. <br /> |

### removeChild

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void removeChild (ViewGroup parent, 
                View child)
```

This method is called by ViewGroup when a child view is about to be removed from the container. This callback starts the process of a transition; we grab the starting values, listen for changes to all of the children of the container, and start appropriate animations.

<br />

|                                    Parameters                                     ||
|----------|-------------------------------------------------------------------------|
| `parent` | `ViewGroup`: The ViewGroup from which the View is being removed. <br /> |
| `child`  | `View`: The View being removed from the ViewGroup. <br />               |

### removeTransitionListener

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void removeTransitionListener (LayoutTransition.TransitionListener listener)
```

Remove a listener for layout changes.

<br />

|                                            Parameters                                            ||
|------------|--------------------------------------------------------------------------------------|
| `listener` | `LayoutTransition.TransitionListener`: The listener for layout bounds change. <br /> |

### setAnimateParentHierarchy

Added in[API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setAnimateParentHierarchy (boolean animateParentHierarchy)
```

This flag controls whether CHANGE_APPEARING or CHANGE_DISAPPEARING animations will cause the default changing animation to be run on the parent hierarchy as well. This allows containers of transitioning views to also transition, which may be necessary in situations where the containers bounds change between the before/after states and may clip their children during the transition animations. For example, layouts with wrap_content will adjust their bounds according to the dimensions of their children.

The default changing transitions animate the bounds and scroll positions of the target views. These are the animations that will run on the parent hierarchy, not the custom animations that happen to be set on the transition. This allows custom behavior for the children of the transitioning container, but uses standard behavior of resizing/rescrolling on any changing parents.

<br />

|                                                                                       Parameters                                                                                        ||
|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `animateParentHierarchy` | `boolean`: A boolean value indicating whether the parents of transitioning views should also be animated during the transition. Default value is true. <br /> |

### setAnimator

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setAnimator (int transitionType, 
                Animator animator)
```

Sets the animation used during one of the transition types that may run. Any Animator object can be used, but to be most useful in the context of layout transitions, the animation should either be a ObjectAnimator or a AnimatorSet of animations including PropertyAnimators. Also, these ObjectAnimator objects should be able to get and set values on their target objects automatically. For example, a ObjectAnimator that animates the property "left" is able to set and get the`left`property from the View objects being animated by the layout transition. The transition works by setting target objects and properties dynamically, according to the pre- and post-layoout values of those objects, so having animations that can handle those properties appropriately will work best for custom animation. The dynamic setting of values is only the case for the CHANGE animations; the APPEARING and DISAPPEARING animations are simply run with the values they have.

It is also worth noting that any and all animations (and their underlying PropertyValuesHolder objects) will have their start and end values set according to the pre- and post-layout values. So, for example, a custom animation on "alpha" as the CHANGE_APPEARING animation will inherit the real value of alpha on the target object (presumably 1) as its starting and ending value when the animation begins. Animations which need to use values at the beginning and end that may not match the values queried when the transition begins may need to use a different mechanism than a standard ObjectAnimator object.

<br />

<br />

|                                                                                                                                                                                                                                                                                                                      Parameters                                                                                                                                                                                                                                                                                                                       ||
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `transitionType` | `int`: One of[CHANGE_APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_APPEARING),[CHANGE_DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_DISAPPEARING),[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING),[APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#APPEARING), or[DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#DISAPPEARING), which determines the animation whose animator is being set. <br /> |
| `animator`       | `Animator`: The animation being assigned. A value of`null`means that no animation will be run for the specified transitionType. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

### setDuration

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setDuration (int transitionType, 
                long duration)
```

Sets the duration on one of the animation objects used by this transition. The`transitionType`parameter determines the animation whose duration is being set.

<br />

|                                                                                                                                                                                                                                                                                                                      Parameters                                                                                                                                                                                                                                                                                                                       ||
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `transitionType` | `int`: One of[CHANGE_APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_APPEARING),[CHANGE_DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_DISAPPEARING),[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING),[APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#APPEARING), or[DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#DISAPPEARING), which determines the animation whose duration is being set. <br /> |
| `duration`       | `long`: The length of time, in milliseconds, that the specified animation should run. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

**See also:**

- [Animator.setDuration(long)](https://developer.android.com/reference/android/animation/Animator#setDuration(long))  

### setDuration

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setDuration (long duration)
```

Sets the duration to be used by all animations of this transition object. If you want to set the duration of just one of the animations in particular, use the[setDuration(int, long)](https://developer.android.com/reference/android/animation/LayoutTransition#setDuration(int,%20long))method.

<br />

|                                                 Parameters                                                  ||
|------------|-------------------------------------------------------------------------------------------------|
| `duration` | `long`: The length of time, in milliseconds, that the transition animations should last. <br /> |

### setInterpolator

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setInterpolator (int transitionType, 
                TimeInterpolator interpolator)
```

Sets the interpolator on one of the animation objects used by this transition. The`transitionType`parameter determines the animation whose interpolator is being set.

<br />

|                                                                                                                                                                                                                                                                                                                        Parameters                                                                                                                                                                                                                                                                                                                         ||
|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `transitionType` | `int`: One of[CHANGE_APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_APPEARING),[CHANGE_DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_DISAPPEARING),[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING),[APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#APPEARING), or[DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#DISAPPEARING), which determines the animation whose interpolator is being set. <br /> |
| `interpolator`   | `TimeInterpolator`: The interpolator that the specified animation should use. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

**See also:**

- [Animator.setInterpolator(TimeInterpolator)](https://developer.android.com/reference/android/animation/Animator#setInterpolator(android.animation.TimeInterpolator))  

### setStagger

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setStagger (int transitionType, 
                long duration)
```

Sets the length of time to delay between starting each animation during one of the change animations.

<br />

|                                                                                                                                                                                     Parameters                                                                                                                                                                                      ||
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `transitionType` | `int`: A value of[CHANGE_APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_APPEARING),[CHANGE_DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_DISAPPEARING), or[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING). <br /> |
| `duration`       | `long`: The length of time, in milliseconds, to delay before launching the next animation in the sequence. <br />                                                                                                                                                                                                                                                 |

### setStartDelay

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setStartDelay (int transitionType, 
                long delay)
```

Sets the start delay on one of the animation objects used by this transition. The`transitionType`parameter determines the animation whose start delay is being set.

<br />

|                                                                                                                                                                                                                                                                                                                        Parameters                                                                                                                                                                                                                                                                                                                        ||
|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `transitionType` | `int`: One of[CHANGE_APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_APPEARING),[CHANGE_DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGE_DISAPPEARING),[CHANGING](https://developer.android.com/reference/android/animation/LayoutTransition#CHANGING),[APPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#APPEARING), or[DISAPPEARING](https://developer.android.com/reference/android/animation/LayoutTransition#DISAPPEARING), which determines the animation whose start delay is being set. <br /> |
| `delay`          | `long`: The length of time, in milliseconds, to delay before starting the animation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

**See also:**

- [Animator.setStartDelay(long)](https://developer.android.com/reference/android/animation/Animator#setStartDelay(long))  

### showChild

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void showChild (ViewGroup parent, 
                View child)
```

<br />

**This method was deprecated in API level 16.**   
Use[showChild(android.view.ViewGroup, android.view.View, int)](https://developer.android.com/reference/android/animation/LayoutTransition#showChild(android.view.ViewGroup,%20android.view.View,%20int)).

<br />

<br />

|          Parameters          ||
|----------|--------------------|
| `parent` | `ViewGroup` <br /> |
| `child`  | `View` <br />      |

### showChild

Added in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void showChild (ViewGroup parent, 
                View child, 
                int oldVisibility)
```

This method is called by ViewGroup when a child view is about to be made visible in the container. This callback starts the process of a transition; we grab the starting values, listen for changes to all of the children of the container, and start appropriate animations.

<br />

|                                                                                                                        Parameters                                                                                                                         ||
|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `parent`        | `ViewGroup`: The ViewGroup in which the View is being made visible. <br />                                                                                                                                                               |
| `child`         | `View`: The View being made visible. <br />                                                                                                                                                                                              |
| `oldVisibility` | `int`: The previous visibility value of the child View, either[View.GONE](https://developer.android.com/reference/android/view/View#GONE)or[View.INVISIBLE](https://developer.android.com/reference/android/view/View#INVISIBLE). <br /> |