Android学习
千夜1014
这个作者很懒,什么都没留下…
展开
-
Android Json学习
Json(JavaScript Object Notation)是一种轻量级的数据交换格式。 json建构和两种结构 “名称/值”对的集合。不同语言中,它被理解为对象(object)、记录(record)、结构(struct)、字典(dictionary)、哈希表(hash table)、有键列表(keyed list)、或者关联数组(associative array); 值的有序列表(An ...原创 2020-01-06 20:33:27 · 145 阅读 · 0 评论 -
使用Paginate库实现RecyclerView分页加载功能(一):基本实现
Paginate库的地址:https://github.com/MarkoMilos/Paginate 首先在Gradle中进行引入: compile 'com.github.markomilos:paginate:0.5.1' Implement Paginate.Callbacks 使用Paginate库的类需要实现Paginate.Callbacks接口,该接口中拥有三个方法,分别是onL...原创 2019-11-19 16:00:26 · 1097 阅读 · 0 评论 -
Android控件RecyclerView(一):初识RecyclerView
最近在一个Demo中接触到了RecyclerView,下面就来学习一下这个强大的滑动组件。 RecyclerView是什么 RecyclerView的官方定义如下: A flexible view for providing a limited window into a large data set. 从定义中可以看出,flexible(可扩展性)是RecyclerView的特点。Recyc...原创 2019-10-18 19:56:00 · 181 阅读 · 0 评论 -
Android Retrofit学习(二):Retrofit的注解类型
在上一篇中已经初步了解了Retrofit的使用,现在来看看Retrofit中的注解类型 Retrofit中的注解类型 第一类 网络请求方法 1、@GET 用于发送一个GET请求,GET注解一般必须添加相对路径或绝对路径或者全路径,如果不想在GET注解后添加请求路径,则可以在方法的第一个参数中用@Url注解添加请求路径。 2、@POST 用于发送一个POST请求,POST注解一般必须添加相对路径...原创 2019-10-14 11:19:52 · 899 阅读 · 0 评论 -
Android Retrofit学习(一):Retrofit的使用
Retrofit是一个RESTful的HTTP网络请求框架的封装,网络请求的工作本质上是okHttp完成,而Retrofit仅负责网络请求接口的封装。 Retrofit的使用步骤 1、添加Retrofit库的依赖 implementation 'com.squareup.retrofit2:retrofit:2.1.0' implementation 'com.squareup.retrofit2...原创 2019-10-08 16:38:04 · 252 阅读 · 0 评论