Demo中的PullRefreshScrollView只有刷新这个方法,并没有细分上拉和下拉,自己找了半天,终于找到了解决方法:
PullToRefreshScrollView mPullRefreshScrollView = (PullToRefreshScrollView) findViewById(R.id.pull_refresh_scrollview);
mPullRefreshScrollView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2()
{
@Override
public void onPullDownToRefresh(PullToRefreshBase refreshView)
{
Log.e("下拉", "下拉");
}
@Override
public void onPullUpToRefresh(PullToRefreshBase refreshView)
{
Log.e("上拉", "上拉");
}
});
用PullToRefreshBase.OnRefreshListener2这个可以重写上拉和下拉方法。在次记录上方便以后使用。