belongs to Maven artifact com.android.support:transition:28.0.0-alpha1
Visibility
public
abstract
class
Visibility
extends Transition
java.lang.Object | ||
↳ | android.support.transition.Transition | |
↳ | android.support.transition.Visibility |
![]() |
This transition tracks changes to the visibility of target views in the
start and end scenes. Visibility is determined not just by the
setVisibility(int)
state of views, but also whether
views exist in the current view hierarchy. The class is intended to be a
utility for subclasses such as Fade
, which use this visibility
information to determine the specific animations to run when visibility
changes occur. Subclasses should implement one or both of the methods
onAppear(ViewGroup, TransitionValues, int, TransitionValues, int)
,
onDisappear(ViewGroup, TransitionValues, int, TransitionValues, int)
or
onAppear(ViewGroup, View, TransitionValues, TransitionValues)
,
onDisappear(ViewGroup, View, TransitionValues, TransitionValues)
.
Summary
Constants | |
---|---|
int |
MODE_IN
Mode used in |
int |
MODE_OUT
Mode used in |
Inherited constants |
---|
![]()
android.support.transition.Transition
|
Public constructors | |
---|---|
Visibility()
|
|
Visibility(Context context, AttributeSet attrs)
|
Public methods | |
---|---|
void
|
captureEndValues(TransitionValues transitionValues)
Captures the values in the end scene for the properties that this transition monitors. |
void
|
captureStartValues(TransitionValues transitionValues)
Captures the values in the start scene for the properties that this transition monitors. |
Animator
|
createAnimator(ViewGroup sceneRoot, TransitionValues startValues, TransitionValues endValues)
This method creates an animation that will be run for this transition given the information in the startValues and endValues structures captured earlier for the start and end scenes. |
int
|
getMode()
Returns whether appearing and/or disappearing Views are supported. |
String[]
|
getTransitionProperties()
Returns the set of property names used stored in the |
boolean
|
isTransitionRequired(TransitionValues startValues, TransitionValues newValues)
Returns whether or not the transition should create an Animator, based on the values
captured during |
boolean
|
isVisible(TransitionValues values)
Returns whether the view is 'visible' according to the given values object. |
Animator
|
onAppear(ViewGroup sceneRoot, TransitionValues startValues, int startVisibility, TransitionValues endValues, int endVisibility)
The default implementation of this method does nothing. |
Animator
|
onAppear(ViewGroup sceneRoot, View view, TransitionValues startValues, TransitionValues endValues)
The default implementation of this method returns a null Animator. |
Animator
|
onDisappear(ViewGroup sceneRoot, TransitionValues startValues, int startVisibility, TransitionValues endValues, int endVisibility)
The default implementation of this method does nothing. |
Animator
|
onDisappear(ViewGroup sceneRoot, View view, TransitionValues startValues, TransitionValues endValues)
The default implementation of this method returns a null Animator. |
void
|
setMode(int mode)
Changes the transition to support appearing and/or disappearing Views, depending
on |
Inherited methods | |
---|---|
![]()
android.support.transition.Transition
|