LiveEvent

This library holds a class to handle single live events in Android MVVM architectural pattern. This class is extended form LiveData class, from `androidx.lifecycle:lifecycle-extensions` library, to propagate the data as an event, which means it emits data just once.

Лицензия

Лицензия

Группа

Группа

com.github.hadilq.liveevent
Идентификатор

Идентификатор

liveevent
Последняя версия

Последняя версия

1.2.0
Дата

Дата

Тип

Тип

aar
Описание

Описание

LiveEvent
This library holds a class to handle single live events in Android MVVM architectural pattern. This class is extended form LiveData class, from `androidx.lifecycle:lifecycle-extensions` library, to propagate the data as an event, which means it emits data just once.
Ссылка на сайт

Ссылка на сайт

https://github.com/hadilq/LiveEvent
Система контроля версий

Система контроля версий

https://github.com/hadilq/LiveEvent

Скачать liveevent

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.hadilq.liveevent/liveevent/ -->
<dependency>
    <groupId>com.github.hadilq.liveevent</groupId>
    <artifactId>liveevent</artifactId>
    <version>1.2.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.github.hadilq.liveevent/liveevent/
implementation 'com.github.hadilq.liveevent:liveevent:1.2.0'
// https://jarcasting.com/artifacts/com.github.hadilq.liveevent/liveevent/
implementation ("com.github.hadilq.liveevent:liveevent:1.2.0")
'com.github.hadilq.liveevent:liveevent:aar:1.2.0'
<dependency org="com.github.hadilq.liveevent" name="liveevent" rev="1.2.0">
  <artifact name="liveevent" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.github.hadilq.liveevent', module='liveevent', version='1.2.0')
)
libraryDependencies += "com.github.hadilq.liveevent" % "liveevent" % "1.2.0"
[com.github.hadilq.liveevent/liveevent "1.2.0"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.jetbrains.kotlin : kotlin-stdlib-jdk7 jar 1.3.50
androidx.lifecycle » lifecycle-extensions jar 2.1.0

Модули Проекта

Данный проект не имеет модулей.

Health Check Maven Central

Live Event

This library holds a class to handle single live events in Android MVVM architectural pattern. This class is extended form LiveData class, from androidx.lifecycle:lifecycle-extensions library, to propagate the data as an event, which means it emits data just once, not after configuration changes again. Note that event will only be sent to active observers, any observers that started observing after the emit won't be notified of the event.

Usage

This source has a sample app where you can find LiveEventViewModel in it, in which the LiveEvent class is used as follows.

class LiveEventViewModel : ViewModel() {
    private val clickedState = LiveEvent<String>()
    val state: LiveData<String> = clickedState

    fun clicked() {
        clickedState.value = ...
    }
}

Download

Download via gradle

implementation "com.github.hadilq:live-event:$libVersion"

where you can find the libVersion in the Releases page of this repository.

Snapshots of the development version are available in Sonatype's snapshots repository.

Contribution

Just create your branch from the master branch, change it, write additional tests, satisfy all tests, create your pull request, thank you, you're awesome.

Версии библиотеки

Версия
1.2.0
1.0.1
1.0.0