whatIfFindFragment

inline fun <T : Fragment> FragmentActivity.whatIfFindFragment(@IdRes id: Int, whatIf: (T) -> Unit)

Author

skydoves (Jaewoong Eum)

An expression for invoking whatIf when the FragmentActivity has an attached fragment T.

Parameters

id

A fragment currently on the back stack associated with this ID resource.

whatIf

An executable lambda function if the FragmentActivity has a fragment T.


inline fun <T : Fragment> FragmentActivity.whatIfFindFragment(@IdRes id: Int, whatIf: (T) -> Unit, whatIfNot: () -> Unit)

Author

skydoves (Jaewoong Eum)

An expression for invoking whatIf when the FragmentActivity has an attached fragment T. If FragmentActivity has not an attached fragment T, whatIfNot will be invoked instead of the whatIf.

Parameters

id

A fragment currently on the back stack associated with this ID resource.

whatIf

An executable lambda function if the FragmentActivity has a fragment T.

whatIfNot

An executable lambda function if the FragmentActivity has not an attached fragment T.


inline fun <T : Fragment> FragmentActivity.whatIfFindFragment(tag: String?, whatIf: (T) -> Unit)

Author

skydoves (Jaewoong Eum)

An expression for invoking whatIf when the FragmentActivity has an attached fragment T.

Parameters

id

A fragment currently on the back stack associated with this tag name.

whatIf

An executable lambda function if the FragmentActivity has a fragment T.


inline fun <T : Fragment> FragmentActivity.whatIfFindFragment(tag: String?, whatIf: (T) -> Unit, whatIfNot: () -> Unit)

Author

skydoves (Jaewoong Eum)

An expression for invoking whatIf when the FragmentActivity has an attached fragment T. If FragmentActivity has not an attached fragment T, whatIfNot will be invoked instead of the whatIf.

Parameters

tag

A fragment currently on the back stack associated with this tag name.

whatIf

An executable lambda function if the FragmentActivity has a fragment T.

whatIfNot

An executable lambda function if the FragmentActivity has not an attached fragment T.