-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update readme, recovered androidManifest, updatted dependency, todo: …
…update network info check
- Loading branch information
Showing
4 changed files
with
25 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
# Android--MVVMLib with LiveData | ||
Base classes for easier handling MVVM in android/Kotlin | ||
|
||
Contains android.arch.lifecycle:extensions:2.0.0 | ||
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:3.1.0x' | ||
``` | ||
|
||
### Library implements simple 'bus' between VM and View able to transfer Int-based parameters, to enable it: | ||
### Library implements simple 'event bus' between VM and View able to transfer Event<Int> to listening classes | ||
|
||
```kotlin | ||
override fun onVMMessage(msg: Int?){ | ||
super.onVMMessage(msg) | ||
override fun onVMMessage(msg: Event<Int>){ | ||
when(msg.peek()) | ||
... | ||
} | ||
``` | ||
|
||
- after initialization viewModel invoke `connectToVMMessage()` | ||
- `0` and `null` are values used to flush data, do not use it as your custom parameter value | ||
- using `Event<T>.get()` returns `null` after one use, use `peek()` for multiple uses | ||
|
||
### changes in 3.1.0x | ||
- migrated to AndroidX | ||
- changed package scope to more valid | ||
- upgraded arch.lifecycle version | ||
### changes in 4.0.0 | ||
- added `Event<T>` | ||
- added `BaseActivityWithoutVM` | ||
- updated appcompat and lifecycle-extensions | ||
- simplified unused imports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.luteoos.kotlin.mvvmbaselib"> | ||
|
||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
</manifest> |