replace

open fun replace(@NonNull() srcFragment: Fragment, @NonNull() destFragment: Fragment)

Replace fragment.

Parameters

srcFragment

The source of fragment.

destFragment

The destination of fragment.

open fun replace(@NonNull() srcFragment: Fragment, @NonNull() destFragment: Fragment, isAddStack: Boolean)

Replace fragment.

Parameters

srcFragment

The source of fragment.

destFragment

The destination of fragment.

isAddStack

True to add fragment in stack, false otherwise.

open fun replace(@NonNull() srcFragment: Fragment, @NonNull() destFragment: Fragment, @AnimRes() enterAnim: Int, @AnimRes() exitAnim: Int)

Replace fragment.

Parameters

srcFragment

The source of fragment.

destFragment

The destination of fragment.

enterAnim

An animation or animator resource ID used for the enter animation on the viewof the fragment being added or attached.

exitAnim

An animation or animator resource ID used for the exit animation on the view ofthe fragment being removed or detached.

open fun replace(@NonNull() srcFragment: Fragment, @NonNull() destFragment: Fragment, isAddStack: Boolean, @AnimRes() enterAnim: Int, @AnimRes() exitAnim: Int)

Replace fragment.

Parameters

srcFragment

The source of fragment.

destFragment

The destination of fragment.

isAddStack

True to add fragment in stack, false otherwise.

enterAnim

An animation or animator resource ID used for the enter animation on the viewof the fragment being added or attached.

exitAnim

An animation or animator resource ID used for the exit animation on the view ofthe fragment being removed or detached.

open fun replace(@NonNull() srcFragment: Fragment, @NonNull() destFragment: Fragment, @AnimRes() enterAnim: Int, @AnimRes() exitAnim: Int, @AnimRes() popEnterAnim: Int, @AnimRes() popExitAnim: Int)

Replace fragment.

Parameters

srcFragment

The source of fragment.

destFragment

The destination of fragment.

enterAnim

An animation or animator resource ID used for the enter animation on the viewof the fragment being added or attached.

exitAnim

An animation or animator resource ID used for the exit animation on the view ofthe fragment being removed or detached.

popEnterAnim

An animation or animator resource ID used for the enter animation on theview of the fragment being readded or reattached caused by popBackStack() or similar methods.

popExitAnim

An animation or animator resource ID used for the enter animation on theview of the fragment being removed or detached caused by popBackStack() or similar methods.

open fun replace(@NonNull() srcFragment: Fragment, @NonNull() destFragment: Fragment, isAddStack: Boolean, @AnimRes() enterAnim: Int, @AnimRes() exitAnim: Int, @AnimRes() popEnterAnim: Int, @AnimRes() popExitAnim: Int)

Replace fragment.

Parameters

srcFragment

The source of fragment.

destFragment

The destination of fragment.

isAddStack

True to add fragment in stack, false otherwise.

enterAnim

An animation or animator resource ID used for the enter animation on the viewof the fragment being added or attached.

exitAnim

An animation or animator resource ID used for the exit animation on the view ofthe fragment being removed or detached.

popEnterAnim

An animation or animator resource ID used for the enter animation on theview of the fragment being readded or reattached caused by popBackStack() or similar methods.

popExitAnim

An animation or animator resource ID used for the enter animation on theview of the fragment being removed or detached caused by popBackStack() or similar methods.

open fun replace(@NonNull() srcFragment: Fragment, @NonNull() destFragment: Fragment, sharedElements: Array<View>)

Replace fragment.

Parameters

srcFragment

The source of fragment.

destFragment

The destination of fragment.

sharedElements

A View in a disappearing Fragment to match with a View in an appearingFragment.

open fun replace(@NonNull() srcFragment: Fragment, @NonNull() destFragment: Fragment, isAddStack: Boolean, sharedElements: Array<View>)

Replace fragment.

Parameters

srcFragment

The source of fragment.

destFragment

The destination of fragment.

isAddStack

True to add fragment in stack, false otherwise.

sharedElements

A View in a disappearing Fragment to match with a View in an appearingFragment.

open fun replace(@NonNull() fm: FragmentManager, @NonNull() fragment: Fragment, @IdRes() containerId: Int)

Replace fragment.

Parameters

fm

The manager of fragment.

fragment

The new fragment to place in the container.

containerId

The id of container.

open fun replace(@NonNull() fm: FragmentManager, @NonNull() fragment: Fragment, @IdRes() containerId: Int, isAddStack: Boolean)

Replace fragment.

Parameters

fm

The manager of fragment.

containerId

The id of container.

fragment

The new fragment to place in the container.

isAddStack

True to add fragment in stack, false otherwise.

open fun replace(@NonNull() fm: FragmentManager, @NonNull() fragment: Fragment, @IdRes() containerId: Int, @AnimRes() enterAnim: Int, @AnimRes() exitAnim: Int)

Replace fragment.

Parameters

fm

The manager of fragment.

containerId

The id of container.

fragment

The new fragment to place in the container.

enterAnim

An animation or animator resource ID used for the enter animation on the viewof the fragment being added or attached.

exitAnim

An animation or animator resource ID used for the exit animation on the view ofthe fragment being removed or detached.

open fun replace(@NonNull() fm: FragmentManager, @NonNull() fragment: Fragment, @IdRes() containerId: Int, isAddStack: Boolean, @AnimRes() enterAnim: Int, @AnimRes() exitAnim: Int)

Replace fragment.

Parameters

fm

The manager of fragment.

containerId

The id of container.

fragment

The new fragment to place in the container.

isAddStack

True to add fragment in stack, false otherwise.

enterAnim

An animation or animator resource ID used for the enter animation on the viewof the fragment being added or attached.

exitAnim

An animation or animator resource ID used for the exit animation on the view ofthe fragment being removed or detached.

open fun replace(@NonNull() fm: FragmentManager, @NonNull() fragment: Fragment, @IdRes() containerId: Int, @AnimRes() enterAnim: Int, @AnimRes() exitAnim: Int, @AnimRes() popEnterAnim: Int, @AnimRes() popExitAnim: Int)

Replace fragment.

Parameters

fm

The manager of fragment.

containerId

The id of container.

fragment

The new fragment to place in the container.

enterAnim

An animation or animator resource ID used for the enter animation on the viewof the fragment being added or attached.

exitAnim

An animation or animator resource ID used for the exit animation on the view ofthe fragment being removed or detached.

popEnterAnim

An animation or animator resource ID used for the enter animation on theview of the fragment being readded or reattached caused by popBackStack() or similar methods.

popExitAnim

An animation or animator resource ID used for the enter animation on theview of the fragment being removed or detached caused by popBackStack() or similar methods.

open fun replace(@NonNull() fm: FragmentManager, @NonNull() fragment: Fragment, @IdRes() containerId: Int, isAddStack: Boolean, @AnimRes() enterAnim: Int, @AnimRes() exitAnim: Int, @AnimRes() popEnterAnim: Int, @AnimRes() popExitAnim: Int)

Replace fragment.

Parameters

fm

The manager of fragment.

containerId

The id of container.

fragment

The new fragment to place in the container.

isAddStack

True to add fragment in stack, false otherwise.

enterAnim

An animation or animator resource ID used for the enter animation on the viewof the fragment being added or attached.

exitAnim

An animation or animator resource ID used for the exit animation on the view ofthe fragment being removed or detached.

popEnterAnim

An animation or animator resource ID used for the enter animation on theview of the fragment being readded or reattached caused by popBackStack() or similar methods.

popExitAnim

An animation or animator resource ID used for the enter animation on theview of the fragment being removed or detached caused by popBackStack() or similar methods.

open fun replace(@NonNull() fm: FragmentManager, @NonNull() fragment: Fragment, @IdRes() containerId: Int, sharedElements: Array<View>)

Replace fragment.

Parameters

fm

The manager of fragment.

containerId

The id of container.

fragment

The new fragment to place in the container.

sharedElements

A View in a disappearing Fragment to match with a View in an appearingFragment.

open fun replace(@NonNull() fm: FragmentManager, @NonNull() fragment: Fragment, @IdRes() containerId: Int, isAddStack: Boolean, sharedElements: Array<View>)

Replace fragment.

Parameters

fm

The manager of fragment.

containerId

The id of container.

fragment

The new fragment to place in the container.

isAddStack

True to add fragment in stack, false otherwise.

sharedElements

A View in a disappearing Fragment to match with a View in an appearingFragment.