@Override public AyahToolBar.AyahToolBarPosition getToolBarPosition( int sura, int ayah, int toolBarWidth, int toolBarHeight) { final List<AyahBounds> bounds = mCoordinatesData == null ? null : mCoordinatesData.get(sura + ":" + ayah); final int screenWidth = mImageView == null ? 0 : mImageView.getWidth(); if (bounds != null && screenWidth > 0) { final int screenHeight = QuranScreenInfo.getInstance().getHeight(); AyahToolBar.AyahToolBarPosition position = ImageAyahUtils.getToolBarPosition( bounds, mImageView.getImageMatrix(), screenWidth, screenHeight, toolBarWidth, toolBarHeight); // If we're in landscape mode (wrapped in SV) update the y-offset position.yScroll = 0 - mQuranPageLayout.getCurrentScrollY(); return position; } return null; }