Compartir a través de


SharedElementCallback.OnRejectSharedElements(IList<View>) Method

Definition

Called after #onMapSharedElements(java.util.List, java.util.Map) when transferring shared elements in.

[Android.Runtime.Register("onRejectSharedElements", "(Ljava/util/List;)V", "GetOnRejectSharedElements_Ljava_util_List_Handler")]
public virtual void OnRejectSharedElements (System.Collections.Generic.IList<Android.Views.View>? rejectedSharedElements);
[<Android.Runtime.Register("onRejectSharedElements", "(Ljava/util/List;)V", "GetOnRejectSharedElements_Ljava_util_List_Handler")>]
abstract member OnRejectSharedElements : System.Collections.Generic.IList<Android.Views.View> -> unit
override this.OnRejectSharedElements : System.Collections.Generic.IList<Android.Views.View> -> unit

Parameters

rejectedSharedElements
IList<View>

Views containing visual information of shared elements that are not part of the entering scene. These Views are positioned relative to the Window decor View. A View removed from this list will not be transitioned automatically.

Attributes

Remarks

Called after #onMapSharedElements(java.util.List, java.util.Map) when transferring shared elements in. Any shared elements that have no mapping will be in <var>rejectedSharedElements</var>. The elements remaining in <var>rejectedSharedElements</var> will be transitioned out of the Scene. If a View is removed from <var>rejectedSharedElements</var>, it must be handled by the SharedElementCallback.

Views in rejectedSharedElements will have their position and size set to the position of the calling shared element, relative to the Window decor View and contain snapshots of the View from the calling Activity or Fragment. This view may be safely added to the decor View's overlay to remain in position.

This method is not called for Fragment Transitions. All rejected shared elements will be handled by the exit transition.

Java documentation for android.app.SharedElementCallback.onRejectSharedElements(java.util.List<android.view.View>).

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