How can we swipe page horizontally for android native apps?

how can we swipe page horizontally for android native apps?

this is an e reader app and i need to swipe book pages…

this might help

public void swipeLeft(AndroidDriver<?> driver)
{

	Dimension size = driver.manage().window().getSize();
	int startx = (int) (size.width * 0.9);
	int endx = (int) (size.width * 0.10);
	int starty = size.height / 2;

	driver.swipe(startx, starty, endx, starty, 700);
}

public void swipeRight(AndroidDriver<?> driver)
{

	Dimension size = driver.manage().window().getSize();
	int endx = (int) (size.width * 0.9);
	int startx = (int) (size.width * 0.10);
	int starty = size.height / 2;
	driver.swipe(startx, starty, endx, starty, 700);
}

thanks a lot hari…
it works…