【文件属性】:
文件名称:Android代码-livedata-call-adapter
文件大小:79KB
文件格式:ZIP
更新时间:2022-08-28 00:00:30
Android代码
LiveData Call Adapter for Retrofit
A Retrofit 2 CallAdapter.Factory for Android LiveData
Usage
Add LiveDataCallAdapterFactory as a Call adapter when building your Retrofit instance:
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("https://example.com")
.addCallAdapterFactory(LiveDataCallAdapterFactory.create())
.addConverterFactory(LiveDataResponseBodyConverterFactory.create())
.addConverterFactory(YourConverterFactory.create())
.build();
Your service
【文件预览】:
livedata-call-adapter-master
----gradlew(5KB)
----settings.gradle(19B)
----library()
--------src()
--------.gitignore(7B)
--------build.gradle(600B)
--------proguard-rules.pro(751B)
----.travis.yml(196B)
----LICENSE(11KB)
----gradle()
--------wrapper()
--------gradle-mvn-push.gradle(7KB)
----README.md(3KB)
----gradlew.bat(2KB)
----gradle.properties(712B)
----.gitignore(678B)
----build.gradle(355B)