Package-level declarations

Types

Properties

Link copied to clipboard

Get the activity's rootView

Link copied to clipboard

Get the lifecycle of the viewLifecycle owner

Functions

Link copied to clipboard
fun FragmentManager.add(addList: List<Fragment>, @IdRes containerId: Int, showIndex: Int = 0)
fun FragmentManager.add(addFragment: Fragment, @IdRes containerId: Int, isHide: Boolean = false, isAddStack: Boolean = false, tag: String = addFragment::class.java.name)
Link copied to clipboard
fun AppCompatActivity.addFragment(fragment: Fragment, tag: String?, @IdRes layoutId: Int)
fun Fragment.addFragment(fragment: Fragment, tag: String?, @IdRes layoutId: Int)
fun Context.addFragment(title: String?, fragment: Fragment, tag: String?, @IdRes layoutId: Int)
fun AppCompatActivity.addFragment(title: String?, fragment: Fragment, tag: String?, @IdRes layoutId: Int)
fun Fragment.addFragment(title: String?, fragment: Fragment, tag: String?, @IdRes layoutId: Int)
Link copied to clipboard
fun Fragment.alert(style: Int, init: AlertDialog.Builder.() -> Unit)
Link copied to clipboard
fun Fragment.allowOptionsMenu(hasOptionsMenu: Boolean = true)

Calls fragment's setHasOptionMenu with true as default

Link copied to clipboard
fun FragmentManager.applyActions(actions: (fragmentTransaction: FragmentTransaction) -> Unit = { _ -> })
Link copied to clipboard

Get dimension defined by attribute attr

Link copied to clipboard

Get drawable defined by attribute attr

Link copied to clipboard
Link copied to clipboard

Creates an AutoClearedValueInFragment associated with this fragment.

Link copied to clipboard
@RequiresApi(value = 24)
inline fun Fragment.checkPIPPermissionAndEnter(onCantHandleAction: () -> Unit = {}, builderActions: PictureInPictureParams.Builder.() -> Unit = {})
Link copied to clipboard
@RequiresApi(value = 24)
inline fun Fragment.checkPIPPermissions(onPermissionDenied: () -> Unit = {}, onPermissionGranted: () -> Unit)
Link copied to clipboard
Link copied to clipboard
fun Fragment.colors(@ColorRes stateListRes: Int): ColorStateList?
Link copied to clipboard

Get color from resource with fragment context.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@RequiresApi(value = 24)
inline fun Fragment.enterPIPMode(builderActions: PictureInPictureParams.Builder.() -> Unit = {})
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun Fragment.fragmentBooleanResult(requestKey: String, bundleKey: String, defaultValue: Boolean = false, crossinline action: (predicate: Boolean) -> Unit)
inline fun Fragment.fragmentBooleanResult(requestKey: String, bundleKey: String, crossinline onDenied: () -> Unit = {}, crossinline onGranted: () -> Unit)
Link copied to clipboard
inline fun Fragment.fragmentByteArrayResult(requestKey: String, bundleKey: String, crossinline action: (array: ByteArray?) -> Unit)
Link copied to clipboard
inline fun Fragment.fragmentByteResult(requestKey: String, bundleKey: String, crossinline action: (byte: Byte?) -> Unit)
Link copied to clipboard
inline fun Fragment.fragmentCharArrayResult(requestKey: String, bundleKey: String, crossinline action: (charArray: CharArray?) -> Unit)
Link copied to clipboard
inline fun Fragment.fragmentCharResult(requestKey: String, bundleKey: String, crossinline action: (char: Char?) -> Unit)
Link copied to clipboard
inline fun Fragment.fragmentDoubleArrayResult(requestKey: String, bundleKey: String, crossinline action: (DoubleArray?) -> Unit)
Link copied to clipboard
inline fun Fragment.fragmentDoubleResult(requestKey: String, bundleKey: String, crossinline action: (double: Double?) -> Unit)
Link copied to clipboard
inline fun Fragment.fragmentFloatArrayResult(requestKey: String, bundleKey: String, crossinline action: (FloatArray?) -> Unit)
Link copied to clipboard
inline fun Fragment.fragmentFloatResult(requestKey: String, bundleKey: String, crossinline action: (Float?) -> Unit)
Link copied to clipboard
inline fun Fragment.fragmentIntArrayResult(requestKey: String, bundleKey: String, crossinline action: (IntArray?) -> Unit)
Link copied to clipboard
inline fun Fragment.fragmentIntResult(requestKey: String, bundleKey: String, crossinline action: (Int?) -> Unit)
Link copied to clipboard
inline fun <T : Parcelable> Fragment.fragmentParcelableListResult(requestKey: String, bundleKey: String, crossinline action: (ArrayList<T>?) -> Unit)
Link copied to clipboard
inline fun <T : Parcelable> Fragment.fragmentParcelableResult(requestKey: String, bundleKey: String, crossinline action: (T?) -> Unit)
Link copied to clipboard
inline fun <T> Fragment.fragmentResult(requestKey: String, bundleKey: String, crossinline action: (T?) -> Unit)
Link copied to clipboard
inline fun Fragment.fragmentStringArrayListResult(requestKey: String, bundleKey: String, crossinline action: (ArrayList<String>?) -> Unit)
Link copied to clipboard
inline fun Fragment.fragmentStringResult(requestKey: String, bundleKey: String, defaultValue: String? = null, crossinline action: (String?) -> Unit)
Link copied to clipboard
Link copied to clipboard
fun Fragment.goBackToFragment(name: String, flag: Int = 0)

Go back to fragment whose tag matches with name

Link copied to clipboard
Link copied to clipboard
fun FragmentManager.hide(vararg hideFragment: Fragment)
fun FragmentManager.hide(hideFragment: List<Fragment>)
Link copied to clipboard
fun Fragment.ifIsAddedAction(action: () -> Unit = {})
Link copied to clipboard
fun Fragment.ifIsAttachedAction(action: () -> Unit = {})
Link copied to clipboard
fun Fragment.ifIsResumedAction(action: () -> Unit = {})
Link copied to clipboard
fun Fragment.ifIsVisibleAction(action: () -> Unit = {})
Link copied to clipboard
inline fun <T> Fragment.intent(body: Intent.() -> Unit): Intent
inline fun <T> FragmentActivity.intent(body: Intent.() -> Unit): Intent
Link copied to clipboard
inline fun Fragment.inTransaction(allowStateLoss: Boolean = false, block: FragmentTransaction.() -> Unit)
inline fun FragmentActivity.inTransaction(allowStateLoss: Boolean = false, block: FragmentTransaction.() -> Unit)
Link copied to clipboard
Link copied to clipboard
inline fun <T> Fragment.launch()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun Fragment.observeLifecycleOwnerThroughLifecycleCreation(crossinline onCreateAction: (LifecycleOwner) -> Unit = {}, crossinline onResumeAction: (LifecycleOwner) -> Unit = {}, crossinline onPauseAction: (LifecycleOwner) -> Unit = {}, crossinline onStartAction: (LifecycleOwner) -> Unit = {}, crossinline onStopAction: (LifecycleOwner) -> Unit = {}, crossinline onDestroyAction: (LifecycleOwner) -> Unit = {})
Link copied to clipboard
inline fun Fragment.onViewDestroyed(crossinline action: () -> Unit)
Link copied to clipboard
Link copied to clipboard

An extension to postponeEnterTransition which will resume after a timeout.

Link copied to clipboard
Link copied to clipboard
fun FragmentManager.remove(vararg removeFragment: Fragment)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun FragmentManager.removeTo(removeTo: Fragment, isIncludeSelf: Boolean = false)
Link copied to clipboard
fun FragmentManager.replace(fragment: Fragment, @IdRes containerId: Int, isAddStack: Boolean = false, tag: String = fragment::class.java.name)
Link copied to clipboard
fun Context.replaceFragment(@StringRes title: Int, fragment: Fragment, tag: String?, @IdRes layoutId: Int)
fun Context.replaceFragment(title: String?, fragment: Fragment, tag: String?, @IdRes layoutId: Int)
fun AppCompatActivity.replaceFragment(@StringRes title: Int, fragment: Fragment, tag: String?, @IdRes layoutId: Int)
fun AppCompatActivity.replaceFragment(title: String?, fragment: Fragment, tag: String?, @IdRes layoutId: Int)
fun Fragment.replaceFragment(@StringRes title: Int, fragment: Fragment, tag: String?, @IdRes layoutId: Int)
fun Fragment.replaceFragment(title: String?, fragment: Fragment, tag: String?, @IdRes layoutId: Int)
Link copied to clipboard

Call's Parent activity's setSupportActionBar from Fragment

Link copied to clipboard
Link copied to clipboard
fun FragmentManager.show(showFragment: Fragment)
Link copied to clipboard
fun Fragment.showHide(vararg hideFragment: Fragment, transaction: Int = FragmentTransaction.TRANSIT_NONE)
fun FragmentManager.showHide(showFragment: Fragment, vararg hideFragment: Fragment, transaction: Int = FragmentTransaction.TRANSIT_NONE)
Link copied to clipboard
inline fun <T> Fragment.startActivity(body: Intent.() -> Unit)
inline fun <T> FragmentActivity.startActivity(body: Intent.() -> Unit)
Link copied to clipboard
fun FragmentManager.switch(showFragment: Fragment, @IdRes containerId: Int, transaction: Int = FragmentTransaction.TRANSIT_NONE)
Link copied to clipboard
inline fun <T : Fragment> T.withArguments(args: Bundle): T

Set arguments to fragment and return current instance