
使用步骤
文章平均质量分 78
X小飞侠
这个作者很懒,什么都没留下…
展开
-
Retrofit使用
1.建立数据接收的实体类 如:JsonDriver2.创建接口:public interface StowageService { @GET("getLoadingSheetList?") Observable getLoadingSheetList();}3.去使用:先新建一个工具方法: public static Retrofit getRetrofit原创 2016-03-23 17:12:18 · 357 阅读 · 0 评论 -
Retrofit 上传图片(单张)
服务器端返回信息的格式是:{"code":20000,"imgUrl":""}编写interface——ApiUploadImg:/** * *上传图片接口 */public interface ApiUploadImg { /**图片上传API*/ /* @POST("Comm") Observable> uploadImg(@Body RequestApi原创 2016-04-20 09:19:26 · 1885 阅读 · 0 评论 -
Retrofit 上传图片(多张)
修改interface——ApiUploadImg,使用@PartMap注解:public interface ApiUploadImg { /**图片上传API*/ /* @POST("Comm") Observable> uploadImg(@Body RequestApi RequestApi);*/// @Multipart// @POST("Comm原创 2016-04-21 09:23:48 · 5395 阅读 · 0 评论 -
Android Room 使用以及配合 RxJava
最近要做的项目要涉及到数据库,准备使用谷歌新出的架构组件Room,于是学习学习,记录一下。[官方文档](https://developer.android.google.cn/topic/libraries/architecture/index.html)在这里,推荐一个系列的文章,很好的翻译了官方架构的文档——[理解Android Architecture Components系列](htt...原创 2018-09-26 09:19:28 · 2995 阅读 · 0 评论