需要导的包
implementation 'com.squareup.okhttp3:okhttp:3.2.0'
implementation 'com.squareup.okio:okio:1.7.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1'
implementation 'com.android.support:recyclerview-v7:28.+'
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.google.code.gson:gson:2.8.5'
需要写权限(网络权限)
以上是工具类(OkHttp和拦截器)
在每个P中都应该写上一个解绑的方法
如下
在每个Activity中都应该写
如下
有几个条目就写几个ViewHolder类
每个条目都必须有相应的ViewHolder类
所以以下的代码不标准
请查看 多条目Adapter 的博客