Package-level declarations

Types

Link copied to clipboard
open class RxView<B : ViewBinding> : LifecycleView<B>

Base class for the view component on an MVVM architecture app. Provides convenience functions for observing sources during the Lifecycle.State.STARTED state of a views lifecycle.

Link copied to clipboard
abstract class RxViewModel : ViewModel

Base class for a view model that stores a CompositeDisposable of all active subscriptions and destroys them on AndroidViewModel.onCleared

Functions

Link copied to clipboard
fun TextView.changes(): Observable<String>

Warning: This skips the initial value!

Link copied to clipboard
fun Completable.whileCreated(owner: LifecycleOwner, onComplete: Action? = null, onError: Consumer<in Throwable>?, onStart: Consumer<Disposable>? = null)

Emits events from this Completable to the consumers as long as the lifecycle owner remains in the state Lifecycle.State.CREATED and then disposes the subscription.

fun <T : Any> Flowable<T>.whileCreated(owner: LifecycleOwner, onNext: Consumer<T>, onError: Consumer<in Throwable>? = null, onStart: Consumer<Disposable>? = null, onComplete: Action? = null)

Emits events from this Flowable to the consumers as long as the lifecycle owner remains in the state Lifecycle.State.CREATED and then disposes the subscription.

fun <T : Any> Maybe<T>.whileCreated(owner: LifecycleOwner, onSuccess: Consumer<T>, onError: Consumer<in Throwable>? = null, onStart: Consumer<Disposable>? = null, onComplete: Action? = null)

Emits events from this Maybe to the consumers as long as the lifecycle owner remains in the state Lifecycle.State.CREATED and then disposes the subscription.

fun <T : Any> Observable<T>.whileCreated(owner: LifecycleOwner, onNext: Consumer<T>, onError: Consumer<in Throwable>? = null, onStart: Consumer<Disposable>? = null, onComplete: Action? = null)

Emits events from this Observable to the consumers as long as the lifecycle owner remains in the state Lifecycle.State.CREATED and then disposes the subscription.

Link copied to clipboard
fun Completable.whileStarted(owner: LifecycleOwner, onComplete: Action? = null, onError: Consumer<in Throwable>?, onStart: Consumer<Disposable>? = null)

Emits events from this Completable to the consumers as long as the lifecycle owner remains in the state Lifecycle.State.STARTED and then disposes the subscription.

fun <T : Any> Flowable<T>.whileStarted(owner: LifecycleOwner, onNext: Consumer<T>, onError: Consumer<in Throwable>? = null, onStart: Consumer<Disposable>? = null, onComplete: Action? = null)

Emits events from this Flowable to the consumers as long as the lifecycle owner remains in the state Lifecycle.State.STARTED and then disposes the subscription.

fun <T : Any> Maybe<T>.whileStarted(owner: LifecycleOwner, onSuccess: Consumer<T>, onError: Consumer<in Throwable>? = null, onStart: Consumer<Disposable>? = null, onComplete: Action? = null)

Emits events from this Maybe to the consumers as long as the lifecycle owner remains in the state Lifecycle.State.STARTED and then disposes the subscription.

fun <T : Any> Observable<T>.whileStarted(owner: LifecycleOwner, onNext: Consumer<T>, onError: Consumer<in Throwable>? = null, onStart: Consumer<Disposable>? = null, onComplete: Action? = null)

Emits events from this Observable to the consumers as long as the lifecycle owner remains in the state Lifecycle.State.STARTED and then disposes the subscription.