- Dagger
- Kotlin
- Retrofit/Okhttp
- Picaso
- RxJava
- Android Architecture Room, LiveData, ViewModel
- MVVM Pattern
- Proguard Rule
very easy to use just as a simple create view
- Create ViewModel and Provide it in the modul
class MainViewModel @Inject constructor(val api:Api) :BaseViewModel() {
public var state:MutableLiveData<State> = MutableLiveData()
public var data:MutableLiveData<Pair<List<Contributor>?, Throwable>> = MutableLiveData()
public fun getData(){
asyncRxExecutor(api.getContributor(), state, {
data.postValue(
Pair(it, Throwable("null"))
)
}, {
data.postValue(
Pair(null, it)
)
})
}
}