RecyclerView+OkHttp展示网络数据
1、首先先导入需要用到的依赖包 //recyclerview用到的依賴包 compile 'com.android.support:recyclerview-v7:25.1.1' //网络请求依赖包 compile 'net.qiujuer.common:okhttp:3.0.0' 2、在布局文件里面设置RecyclerView控件 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:co...