次の方法で共有


Visibility.OnDisappear Method

Definition

Overloads

OnDisappear(ViewGroup, View, TransitionValues, TransitionValues)

The default implementation of this method returns a null Animator.

OnDisappear(ViewGroup, TransitionValues, Int32, TransitionValues, Int32)

Subclasses should override this method or #onDisappear(ViewGroup, View, TransitionValues, TransitionValues) if they need to create an Animator when targets disappear.

OnDisappear(ViewGroup, View, TransitionValues, TransitionValues)

The default implementation of this method returns a null Animator.

[Android.Runtime.Register("onDisappear", "(Landroid/view/ViewGroup;Landroid/view/View;Landroid/transition/TransitionValues;Landroid/transition/TransitionValues;)Landroid/animation/Animator;", "GetOnDisappear_Landroid_view_ViewGroup_Landroid_view_View_Landroid_transition_TransitionValues_Landroid_transition_TransitionValues_Handler")]
public virtual Android.Animation.Animator? OnDisappear (Android.Views.ViewGroup? sceneRoot, Android.Views.View? view, Android.Transitions.TransitionValues? startValues, Android.Transitions.TransitionValues? endValues);
[<Android.Runtime.Register("onDisappear", "(Landroid/view/ViewGroup;Landroid/view/View;Landroid/transition/TransitionValues;Landroid/transition/TransitionValues;)Landroid/animation/Animator;", "GetOnDisappear_Landroid_view_ViewGroup_Landroid_view_View_Landroid_transition_TransitionValues_Landroid_transition_TransitionValues_Handler")>]
abstract member OnDisappear : Android.Views.ViewGroup * Android.Views.View * Android.Transitions.TransitionValues * Android.Transitions.TransitionValues -> Android.Animation.Animator
override this.OnDisappear : Android.Views.ViewGroup * Android.Views.View * Android.Transitions.TransitionValues * Android.Transitions.TransitionValues -> Android.Animation.Animator

Parameters

sceneRoot
ViewGroup

The root of the transition hierarchy

view
View

The View to make disappear. This will be in the target scene's View hierarchy or in an android.view.ViewGroupOverlay and will be VISIBLE.

startValues
TransitionValues

The target values in the start scene

endValues
TransitionValues

The target values in the end scene

Returns

An Animator to be started at the appropriate time in the overall transition for this scene change. A null value means no animation should be run.

Attributes

Remarks

The default implementation of this method returns a null Animator. Subclasses should override this method to make targets disappear with the desired transition. The method should only be called from #onDisappear(ViewGroup, TransitionValues, int, TransitionValues, int).

Java documentation for android.transition.Visibility.onDisappear(android.view.ViewGroup, android.view.View, android.transition.TransitionValues, android.transition.TransitionValues).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

OnDisappear(ViewGroup, TransitionValues, Int32, TransitionValues, Int32)

Subclasses should override this method or #onDisappear(ViewGroup, View, TransitionValues, TransitionValues) if they need to create an Animator when targets disappear.

[Android.Runtime.Register("onDisappear", "(Landroid/view/ViewGroup;Landroid/transition/TransitionValues;ILandroid/transition/TransitionValues;I)Landroid/animation/Animator;", "GetOnDisappear_Landroid_view_ViewGroup_Landroid_transition_TransitionValues_ILandroid_transition_TransitionValues_IHandler")]
public virtual Android.Animation.Animator? OnDisappear (Android.Views.ViewGroup? sceneRoot, Android.Transitions.TransitionValues? startValues, int startVisibility, Android.Transitions.TransitionValues? endValues, int endVisibility);
[<Android.Runtime.Register("onDisappear", "(Landroid/view/ViewGroup;Landroid/transition/TransitionValues;ILandroid/transition/TransitionValues;I)Landroid/animation/Animator;", "GetOnDisappear_Landroid_view_ViewGroup_Landroid_transition_TransitionValues_ILandroid_transition_TransitionValues_IHandler")>]
abstract member OnDisappear : Android.Views.ViewGroup * Android.Transitions.TransitionValues * int * Android.Transitions.TransitionValues * int -> Android.Animation.Animator
override this.OnDisappear : Android.Views.ViewGroup * Android.Transitions.TransitionValues * int * Android.Transitions.TransitionValues * int -> Android.Animation.Animator

Parameters

sceneRoot
ViewGroup

The root of the transition hierarchy

startValues
TransitionValues

The target values in the start scene

startVisibility
Int32

The target visibility in the start scene

endValues
TransitionValues

The target values in the end scene

endVisibility
Int32

The target visibility in the end scene

Returns

An Animator to be started at the appropriate time in the overall transition for this scene change. A null value means no animation should be run.

Attributes

Remarks

Subclasses should override this method or #onDisappear(ViewGroup, View, TransitionValues, TransitionValues) if they need to create an Animator when targets disappear. The method should only be called by the Visibility class; it is not intended to be called from external classes.

The default implementation of this method attempts to find a View to use to call #onDisappear(ViewGroup, View, TransitionValues, TransitionValues), based on the situation of the View in the View hierarchy. For example, if a View was simply removed from its parent, then the View will be added into a android.view.ViewGroupOverlay and passed as the view parameter in #onDisappear(ViewGroup, View, TransitionValues, TransitionValues). If a visible View is changed to be View#GONE or View#INVISIBLE, then it can be used as the view and the visibility will be changed to View#VISIBLE for the duration of the animation. However, if a View is in a hierarchy which is also altering its visibility, the situation can be more complicated. In general, if a view that is no longer in the hierarchy in the end scene still has a parent (so its parent hierarchy was removed, but it was not removed from its parent), then it will be left alone to avoid side-effects from improperly removing it from its parent. The only exception to this is if the previous Scene was Scene#getSceneForLayout(ViewGroup, int, android.content.Context) created from a layout resource file, then it is considered safe to un-parent the starting scene view in order to make it disappear.

Java documentation for android.transition.Visibility.onDisappear(android.view.ViewGroup, android.transition.TransitionValues, int, android.transition.TransitionValues, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to