Package com.skydoves.whatif_android

Functions

Link copied to clipboard
inline fun <T : Fragment> FragmentActivity.whatIfFindFragment(@IdRes id: Int, whatIf: (T) -> Unit)
inline fun <T : Fragment> FragmentActivity.whatIfFindFragment(tag: String?, whatIf: (T) -> Unit)
inline fun <T : Fragment> FragmentActivity.whatIfFindFragment(@IdRes id: Int, whatIf: (T) -> Unit, whatIfNot: () -> Unit)
inline fun <T : Fragment> FragmentActivity.whatIfFindFragment(tag: String?, whatIf: (T) -> Unit, whatIfNot: () -> Unit)
Link copied to clipboard
inline fun <T> Fragment?.whatIfFindParentInterface(whatIf: (T) -> Unit)
inline fun <T> Fragment?.whatIfFindParentInterface(whatIf: (T) -> Unit, whatIfNot: () -> Unit)
Link copied to clipboard
inline fun Fragment?.whatIfHasArguments(whatIf: (Bundle) -> Unit)
inline fun Fragment?.whatIfHasArguments(whatIf: (Bundle) -> Unit, whatIfNot: () -> Unit)
Link copied to clipboard
inline fun Activity.whatIfHasCharSequenceExtra(name: String, whatIf: (CharSequence) -> Unit)

An expression for invoking whatIf when the Activity's intent extras is has a CharSequence extra by name.

inline fun Activity.whatIfHasCharSequenceExtra(name: String, whatIf: (CharSequence) -> Unit, whatIfNot: () -> Unit)

An expression for invoking whatIf when theActivity's intent extras is has a CharSequence extra by name. If the intent extras is null, whatIfNot will be invoked instead of the whatIf.

Link copied to clipboard
inline fun Activity.whatIfHasDeepLinkUri(whatIf: (Uri) -> Unit)

An expression for invoking whatIf when the Activity's intent deep link uri is not null and not empty.

inline fun Activity.whatIfHasDeepLinkUri(whatIf: (Uri) -> Unit, whatIfNot: () -> Unit)

An expression for invoking whatIf when the Activity's intent deep link uri is not null and not empty. If the intent deep link uri is null or empty, whatIfNot will be invoked instead of the whatIf.

Link copied to clipboard
inline fun Activity.whatIfHasExtras(whatIf: (Bundle) -> Unit)
inline fun Activity.whatIfHasExtras(name: String, whatIf: () -> Unit)

An expression for invoking whatIf when the Activity's intent extras is not null and not empty.

inline fun Activity.whatIfHasExtras(whatIf: (Bundle) -> Unit, whatIfNot: () -> Unit)
inline fun Activity.whatIfHasExtras(name: String, whatIf: () -> Unit, whatIfNot: () -> Unit)

An expression for invoking whatIf when the Activity's intent extras is not null and not empty. If the intent extras is null or empty, whatIfNot will be invoked instead of the whatIf.

Link copied to clipboard
inline fun <T : Parcelable> Activity.whatIfHasParcelableArrayListExtra(name: String, whatIf: (ArrayList<T>) -> Unit)

An expression for invoking whatIf when the Activity's intent extras is has an ArrayList of object extra by name.

inline fun <T : Parcelable> Activity.whatIfHasParcelableArrayListExtra(name: String, whatIf: (ArrayList<T>) -> Unit, whatIfNot: () -> Unit)

An expression for invoking whatIf when the Activity's intent extras is has an ArrayList of object extra by name. If the intent extras is null, whatIfNot will be invoked instead of the whatIf.

Link copied to clipboard
inline fun <T : Parcelable> Activity.whatIfHasParcelableExtra(name: String, whatIf: (T) -> Unit)

An expression for invoking whatIf when the Activity's intent extras is has an object extra by name.

inline fun <T : Parcelable> Activity.whatIfHasParcelableExtra(name: String, whatIf: (T) -> Unit, whatIfNot: () -> Unit)

An expression for invoking whatIf when theActivity's intent extras is has an object extra by name. If the intent extras is null, whatIfNot will be invoked instead of the whatIf.

Link copied to clipboard
inline fun <T : Serializable> Activity.whatIfHasSerializableExtra(name: String, whatIf: (T) -> Unit)

An expression for invoking whatIf when the Activity's intent extras is has a Serializable extra by name.

inline fun <T : Serializable> Activity.whatIfHasSerializableExtra(name: String, whatIf: (T) -> Unit, whatIfNot: () -> Unit)

An expression for invoking whatIf when theActivity's intent extras is has a Serializable extra by name. If the intent extras is null, whatIfNot will be invoked instead of the whatIf.

Link copied to clipboard
inline fun Activity.whatIfHasStringExtra(name: String, whatIf: (String) -> Unit)

An expression for invoking whatIf when the Activity's intent extras is has a string extra by name.

inline fun Activity.whatIfHasStringExtra(name: String, whatIf: (String) -> Unit, whatIfNot: () -> Unit)

An expression for invoking whatIf when the Activity's intent extras is has a string extra by name. If the intent extras is null, whatIfNot will be invoked instead of the whatIf.

Link copied to clipboard
inline fun Fragment?.whatIfNotNullActivity(whatIf: (FragmentActivity) -> Unit)
inline fun Fragment?.whatIfNotNullActivity(whatIf: (FragmentActivity) -> Unit, whatIfNot: () -> Unit)
Link copied to clipboard
inline fun Fragment?.whatIfNotNullContext(whatIf: (Context) -> Unit)
inline fun Fragment?.whatIfNotNullContext(whatIf: (Context) -> Unit, whatIfNot: () -> Unit)