public sealed class EnterTransition
EnterTransition defines how an AnimatedVisibility Composable appears on screen as it becomes visible. The 4 categories of EnterTransitions available are:
- fade:
fadeIn - scale:
scaleIn - slide:
slideIn,slideInHorizontally,slideInVertically - expand:
expandIn,expandHorizontally,expandVertically
EnterTransition.None can be used when no enter transition is desired. Different EnterTransitions can be combined using plus operator, for example:
Note: fadeIn, scaleIn and slideIn do not affect the size of the AnimatedVisibility composable. In contrast, expandIn will grow the clip bounds to reveal the whole content. This will automatically animate other layouts out of the way, very much like animateContentSize.
Functions
plus
public operator fun plus(enter: EnterTransition): EnterTransition
Combines different enter transitions. The order of the EnterTransitions being combined does not matter, as these EnterTransitions will start simultaneously. The order of applying transforms from these enter transitions (if defined) is: veil first, then alpha and scale, shrink or expand, then slide.
Parameters
| enter | another EnterTransition to be combined |
Companion Object
Properties
public val None: EnterTransition
This can be used when no enter transition is desired. It can be useful in cases where there are other forms of enter animation defined indirectly for an AnimatedVisibility. e.g.The children of the AnimatedVisibility have all defined their own EnterTransition, or when the parent is fading in, etc.