https://github.com/ooftf/mvvm-component
https://github.com/ooftf/mvvm-component
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ooftf/mvvm-component
- Owner: ooftf
- Created: 2019-11-14T04:01:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-23T06:28:29.000Z (almost 5 years ago)
- Last Synced: 2023-07-26T22:02:39.930Z (almost 3 years ago)
- Language: Kotlin
- Size: 368 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mvvm-component
更方便实现项目MVVM架构的MVVM框架组件
### http-ui-mapping
[](https://maven-badges.herokuapp.com/maven-central/com.github.ooftf/http-ui-mapping)
定义了网络请求和UI响应之间的联动
#### 引用方式
```groovy
mavenCentral()
dependencies {
implementation 'com.github.ooftf:http-ui-mapping:1.4.1'
}
```
#### 初始化
```kotlin
HttpUiMapping.init(object : HttpUiMapping.Provider {
override fun toast(string: String?) {
//TODO 网络错误toast
}
override fun createLoadingDialog(activity: Activity): HttpUiMapping.MyDialogInterface {
//TODO 创建网络加载dialog
}
override fun onTokenInvalid(baseResponse: IResponse) {
//TODO token 失效
}
}, BuildConfig.DEBUG)
```
### arch-frame-mvvm
[](https://maven-badges.herokuapp.com/maven-central/com.github.ooftf/arch-frame-mvvm)
基于http-ui-mapping,提供了BaseMvvmActivity和BaseMvvmFragment基础类
#### 引用方式
```groovy
mavenCentral()
dependencies {
implementation 'com.github.ooftf:arch-frame-mvvm:0.1.5'
}
```
### mapping-button
[](https://maven-badges.herokuapp.com/maven-central/com.github.ooftf/mapping-button)
#### 引用方式
```groovy
mavenCentral()
dependencies {
implementation 'com.github.ooftf:mapping-button:1.3.8'
}
```
### [mvvm脚手架](https://github.com/ooftf/MVVM-Generator-ooftf)
基于arch-frame-mvvm的AndroidStudio 插件,提供了一键生成Activity ViewModel Layout Fragment 功能
### 混淆
-keepclassmembers class * extends androidx.lifecycle.AndroidViewModel {
(...);
}
-keepclassmembers public class * extends androidx.databinding.ViewDataBinding{
public static inflate(android.view.LayoutInflater);
public static inflate(android.view.LayoutInflater,android.view.ViewGroup,boolean);
}