Base classes for easier handling MVVM in android/Kotlin
Contains
- android.arch.lifecycle:extensions:2.2.0
- androidx.appcompat:appcompat:1.1.0
maven { url 'https://jitpack.io' }
implementation 'com.github.Luteoos:Android--MVVMLib:4.0.0'
Library implements simple 'event bus' between VM and View able to transfer Event to listening classes
override fun onVMMessage(msg: Event<Int>){
when(msg.peek())
...
}- after initialization viewModel invoke
connectToVMMessage() - using
Event<T>.get()returnsnullafter one use, usepeek()for multiple uses
- added
Event<T> - added
BaseActivityWithoutVM - updated appcompat and lifecycle-extensions
- simplified unused imports