Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

Observer

interface Observer<T : Any!>
androidx.lifecycle.Observer

A simple callback that can receive from LiveData.

Summary

Public methods

abstract Unit
onChanged(t: T)

Called when the data is changed.

Public methods

onChanged

abstract fun onChanged(t: T): Unit

Called when the data is changed.

Parameters
t T: The new data