OneTimeEvent

class OneTimeEvent<T>(content: T)

A wrapper for data that is exposed via a LiveData that represents an event.

Parameters

T

The type of the content.

Constructors

Link copied to clipboard
constructor(content: T)

Functions

Link copied to clipboard

Returns the content if it has not been handled yet, and marks it as handled.

Link copied to clipboard
fun peekContent(): T

Returns the content, even if it has already been handled.