我想实现向上滚动并使用回收站视图向下滚动。如果正常则向下滚动,但我不知道如何向上滚动?
recyclerView.setOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
Log.e(TAG,"Onscrolled");
}
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
super.onScrollStateChanged(recyclerView, newState);
Log.e(TAG,"State"+newState);
if (newState==2) {
//do scroll down
}
}
});