124697
124697

Reputation: 21901

How can I detect if the user is scrolling up when the listview has already reached the top

How can I test if the user is scrolling up while the ListView is already all the way up?

answersListView.setOnScrollListener(new OnScrollListener() {
    @Override
    public void onScrollStateChanged(AbsListView view,int scrollState){
        // TODO Auto-generated method stub
    }

    @Override
    public void onScroll(AbsListView view,int firstVisibleItem, int visibleItemCount,
    int totalItemCount) {
        // TODO Auto-generated method stub
    }
});

Upvotes: 0

Views: 235

Answers (1)

Boris Mocialov
Boris Mocialov

Reputation: 3489

look at android-pulltorefresh , specifically at onTouchEvent and on both onScroll and onScrollStateChanged methods. Basically, you should have onTouchEvent

Upvotes: 1

Related Questions