第一步: 导依赖
compile 'com.jwenfeng.pulltorefresh:library:1.0.3'
第二步: 布局
<?xml version="1.0" encoding="utf-8"?>
<com.jwenfeng.library.pulltorefresh.PullToRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/pu">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/lv">
</ListView>
</com.jwenfeng.library.pulltorefresh.PullToRefreshLayout>
第三步: main里的逻辑
package com.example.http4;
import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.LayoutIn