List of usage examples for android.widget ImageView getRight
@ViewDebug.CapturedViewProperty public final int getRight()
From source file:com.mooc.viewpage_photoview_circleindicator.photoview.PhotoViewAttacher.java
@Override public void onGlobalLayout() { ImageView imageView = getImageView(); if (null != imageView) { if (mZoomEnabled) { final int top = imageView.getTop(); final int right = imageView.getRight(); final int bottom = imageView.getBottom(); final int left = imageView.getLeft(); /**/*from ww w.j a v a2 s. co m*/ * We need to check whether the ImageView's bounds have changed. * This would be easier if we targeted API 11+ as we could just use * View.OnLayoutChangeListener. Instead we have to replicate the * work, keeping track of the ImageView's bounds and then checking * if the values change. * ? */ if (top != mIvTop || bottom != mIvBottom || left != mIvLeft || right != mIvRight) { // Update our base matrix, as the bounds have changed updateBaseMatrix(imageView.getDrawable(), false); // Update values as something has changed mIvTop = top; mIvRight = right; mIvBottom = bottom; mIvLeft = left; } } else { updateBaseMatrix(imageView.getDrawable(), false); } } }