Here is my code using AndroidDriver:
public void scrollUpManually() {
Dimension size = driver.manage().window().getSize();
int starty = (int) (size.height * 0.40);
int endy = (int) (size.height * 0.90);
int startx = size.width / 2;
driver.swipe(startx, starty, startx, endy, 1000);
}
public void scrollDownManually() {
Dimension size = driver.manage().window().getSize();
int starty = (int) (size.height * 0.80);
int endy = (int) (size.height * 0.20);
int startx = size.width / 2;
driver.swipe(startx, starty, startx, endy, 1000);
}