//XListView主要是要实现条目的上拉加载和下拉刷新的功能
在使用的时候需要导入一个Module包(可以自己手写也可以向小编留言私发)
因为解析时需要网络权限和图片的解析等等,所以记得加权限和依赖等操作,准备就绪开始上代码
1.首先布局-------宽高ID无所谓但必须是xlistview.bawei.com.xlistviewlibrary.XListView这个控件
<xlistview.bawei.com.xlistviewlibrary.XListView 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:id="@+id/x_list_view" android:layout_height="match_parent" tools:context="zhangyanran201800808.bwie.com.day06two.activity.XListViewActivity"> </xlistview.bawei.com.xlistviewlibrary.XListView>
2.网络接口数据的解析小编使用了网络抽取工具类,具体步骤看上一篇文章 《抽取网络工具类+++++多条目展示》
3.Activityz中可以直接调用网络工具类,网络工具类调用后即可设置XListView的刷新和加载&#x