Package-level declarations

Types

Link copied to clipboard
class AppOpsUtil(context: Context)

Utility class to check whether app operations (app ops) are allowed.

Link copied to clipboard
class JobPropertyDelegate(job: Job? = null)

A property delegate for a Job that cancels the previous job if any, and sets the property to null once the job is completed using Job.invokeOnCompletion.

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Checks whether any element in the collection is false. Returns false if empty.

Link copied to clipboard

Checks whether any element in the collection is true. Returns false if empty.

Link copied to clipboard
suspend fun delay(duration: Duration)

Coroutine delay convenience syntax taking a java.time.Duration instead of kotlin.time.Duration.

Link copied to clipboard

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.

Link copied to clipboard

Returns a Rect, bounding the view.

Link copied to clipboard

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.

Link copied to clipboard

Same as the type-safe variant of Bundle.getParcelable on Android 13 and later, or the type-unsafe variant on Android 12 or earlier.

Link copied to clipboard
Link copied to clipboard

Same as the type-safe variant of Bundle.getSerializable on Android 13 and later, or the type-unsafe variant on Android 12 or earlier.

Link copied to clipboard

Hides platform system UI.

Link copied to clipboard
fun <T> Iterable<T>.indexOfFirstOrNull(predicate: (T) -> Boolean): Int?

Returns index of the first element matching the given predicate, or null if the iterable does not contain such element.

Link copied to clipboard
fun <T> Iterable<T>.indexOfLastOrNull(predicate: (T) -> Boolean): Int?

Returns index of the last element matching the given predicate, or null if the iterable does not contain such element.

Link copied to clipboard

Whether the event is within the bounds of the view.

Link copied to clipboard

Returns true if the current process is a main one. A current process is considered the main process if its name is the same as the package name (application ID).

Link copied to clipboard
inline fun <T> isNullable(): Boolean

Checks if a type is nullable.

Link copied to clipboard

Removes a view from its parent. Does nothing if it's not attached to a ViewGroup parent.

Link copied to clipboard
fun View.traverse(applyOnViewFunction: View.() -> Unit)

Traverses across the view and all its children, and applies applyOnViewFunction to them.

Link copied to clipboard
suspend fun <T> withTimeout(timeout: Duration, block: suspend CoroutineScope.() -> T): T

Coroutine withTimeout convenience syntax taking a java.time.Duration instead of kotlin.time.Duration.