Event

open class Event<out T>(content: T)

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

Constructors

Event
Link copied to clipboard
fun <out T> Event(content: T)

Functions

getContentIfNotHandled
Link copied to clipboard
fun getContentIfNotHandled(): T?

Returns the content and prevents its use again.

peekContent
Link copied to clipboard
fun peekContent(): T

Returns the content, even if it's already been handled.

Properties

hasBeenHandled
Link copied to clipboard
var hasBeenHandled: Boolean = false