Just before using zoom and pinch ,
just give a single touch to the element that you need to zoom in or pinch
Here is what i have done and works perfectly..
List imageParent = (List) getDriver().findElements(By.className("android.support.v4.view.ViewPager"));
WebElement imageChild = imageParent.get(0).findElement(By.className("android.widget.ImageView"));
firstScreenShot=image.screenshot(imageChild);
int leftX = imageChild.getLocation().getX();
int rightX = leftX + imageChild.getSize().getWidth();
int upperY = imageChild.getLocation().getY();
int lowerY = upperY + imageChild.getSize().getHeight();
int middleY = (upperY + lowerY) / 2;
int middleX = (leftX + rightX) / 2;
TouchAction action0=new TouchAction(getDriver()).press(middleX,middleY).release();
action0.perform();
gettDriver().zoom(middleX,middleY);