1. 程式人生 > >PullToRefreshListView簡單實現下拉重新整理、下拉載入

PullToRefreshListView簡單實現下拉重新整理、下拉載入

public class MainActivity extends AppCompatActivity  {
//http://www.qubaobei.com/ios/cf/dish_list.php?stage_id=1&limit=10&page=1
    @BindView(R.id.gridview)
    PullToRefreshListView lv;
    private ArrayList<Bean.DataBean> arrays;
    private MyListViewAdapter adapter;
    private String path="http://www.qubaobei.com/ios/cf/dish_list.php?stage_id=1&limit=10&page=";
    private int index=1;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
        lv.setMode(PullToRefreshBase.Mode.BOTH);
        initView();
    }