Fragment.PostponeEnterTransition Method

Definition

Postpone the entering Fragment transition until #startPostponedEnterTransition() or FragmentManager#executePendingTransactions() has been called.

[Android.Runtime.Register("postponeEnterTransition", "()V", "GetPostponeEnterTransitionHandler", ApiSince=26)]
public virtual void PostponeEnterTransition ();
[<Android.Runtime.Register("postponeEnterTransition", "()V", "GetPostponeEnterTransitionHandler", ApiSince=26)>]
abstract member PostponeEnterTransition : unit -> unit
override this.PostponeEnterTransition : unit -> unit
Attributes

Remarks

Postpone the entering Fragment transition until #startPostponedEnterTransition() or FragmentManager#executePendingTransactions() has been called.

This method gives the Fragment the ability to delay Fragment animations until all data is loaded. Until then, the added, shown, and attached Fragments will be INVISIBLE and removed, hidden, and detached Fragments won't be have their Views removed. The transaction runs when all postponed added Fragments in the transaction have called #startPostponedEnterTransition().

This method should be called before being added to the FragmentTransaction or in #onCreate(Bundle), #onAttach(Context), or #onCreateView(LayoutInflater, ViewGroup, Bundle)}. #startPostponedEnterTransition() must be called to allow the Fragment to start the transitions.

When a FragmentTransaction is started that may affect a postponed FragmentTransaction, based on which containers are in their operations, the postponed FragmentTransaction will have its start triggered. The early triggering may result in faulty or nonexistent animations in the postponed transaction. FragmentTransactions that operate only on independent containers will not interfere with each other's postponement.

Calling postponeEnterTransition on Fragments with a null View will not postpone the transition. Likewise, postponement only works if FragmentTransaction optimizations are enabled.

Java documentation for android.app.Fragment.postponeEnterTransition().

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