android.widget.ImageView#getRight ( )源码实例Demo

下面列出了android.widget.ImageView#getRight ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: star-zone-android   文件: 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();

            /**
             * 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());

                // Update values as something has changed
                mIvTop = top;
                mIvRight = right;
                mIvBottom = bottom;
                mIvLeft = left;
            }
        } else {
            updateBaseMatrix(imageView.getDrawable());
        }
    }
}
 
源代码2 项目: imsdk-android   文件: 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();

            /**
             * 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());

                // Update values as something has changed
                mIvTop = top;
                mIvRight = right;
                mIvBottom = bottom;
                mIvLeft = left;
            }
        } else {
            updateBaseMatrix(imageView.getDrawable());
        }
    }
}
 
源代码3 项目: OmniList   文件: 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();

            /**
             * 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());

                // Update values as something has changed
                mIvTop = top;
                mIvRight = right;
                mIvBottom = bottom;
                mIvLeft = left;
            }
        } else {
            updateBaseMatrix(imageView.getDrawable());
        }
    }
}
 
源代码4 项目: o2oa   文件: PhotoViewAttacher.java
@Override
public final void onGlobalLayout() {
	ImageView imageView = getImageView();

	if (null != imageView && mZoomEnabled) {
		final int top = imageView.getTop();
		final int right = imageView.getRight();
		final int bottom = imageView.getBottom();
		final int left = imageView.getLeft();

		/**
		 * 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());

			// Update values as something has changed
			mIvTop = top;
			mIvRight = right;
			mIvBottom = bottom;
			mIvLeft = left;
		}
	}
}
 
源代码5 项目: Android   文件: 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();

            /**
             * 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());

                // Update values as something has changed
                mIvTop = top;
                mIvRight = right;
                mIvBottom = bottom;
                mIvLeft = left;
            }
        } else {
            updateBaseMatrix(imageView.getDrawable());
        }
    }
}
 
源代码6 项目: RotatePhotoView   文件: 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();

            /**
             * 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());

                // Update values as something has changed
                mIvTop = top;
                mIvRight = right;
                mIvBottom = bottom;
                mIvLeft = left;
            }
        } else {
            updateBaseMatrix(imageView.getDrawable());
        }
    }
}
 
源代码7 项目: zen4android   文件: PhotoViewAttacher.java
@Override
public final void onGlobalLayout() {
    ImageView imageView = getImageView();

    if (null != imageView && mZoomEnabled) {
        final int top = imageView.getTop();
        final int right = imageView.getRight();
        final int bottom = imageView.getBottom();
        final int left = imageView.getLeft();

        /**
         * 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());

            // Update values as something has changed
            mIvTop = top;
            mIvRight = right;
            mIvBottom = bottom;
            mIvLeft = left;
        }
    }
}
 
源代码8 项目: Social   文件: PhotoViewAttacher.java
@Override
public final void onGlobalLayout() {
	ImageView imageView = getImageView();

	if (null != imageView && mZoomEnabled) {
		final int top = imageView.getTop();
		final int right = imageView.getRight();
		final int bottom = imageView.getBottom();
		final int left = imageView.getLeft();

		/**
		 * 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());

			// Update values as something has changed
			mIvTop = top;
			mIvRight = right;
			mIvBottom = bottom;
			mIvLeft = left;
		}
	}
}
 
@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();

            /**
             * 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());

                // Update values as something has changed
                mIvTop = top;
                mIvRight = right;
                mIvBottom = bottom;
                mIvLeft = left;
            }
        } else {
            updateBaseMatrix(imageView.getDrawable());
        }
    }
}
 
源代码10 项目: narrate-android   文件: 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();

            /**
             * 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());

                // Update values as something has changed
                mIvTop = top;
                mIvRight = right;
                mIvBottom = bottom;
                mIvLeft = left;
            }
        } else {
            updateBaseMatrix(imageView.getDrawable());
        }
    }
}
 
源代码11 项目: monolog-android   文件: PhotoViewAttacher.java
@Override
public final void onGlobalLayout() {
	ImageView imageView = getImageView();

	if (null != imageView && mZoomEnabled) {
		final int top = imageView.getTop();
		final int right = imageView.getRight();
		final int bottom = imageView.getBottom();
		final int left = imageView.getLeft();

		/**
		 * 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());

			// Update values as something has changed
			mIvTop = top;
			mIvRight = right;
			mIvBottom = bottom;
			mIvLeft = left;
		}
	}
}
 
源代码12 项目: LLApp   文件: PhotoViewAttacher.java
@Override
public final void onGlobalLayout() {
	ImageView imageView = getImageView();

	if (null != imageView && mZoomEnabled) {
		final int top = imageView.getTop();
		final int right = imageView.getRight();
		final int bottom = imageView.getBottom();
		final int left = imageView.getLeft();

		/**
		 * 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());

			// Update values as something has changed
			mIvTop = top;
			mIvRight = right;
			mIvBottom = bottom;
			mIvLeft = left;
		}
	}
}
 
源代码13 项目: jmessage-android-uikit   文件: PhotoViewAttacher.java
@Override
public final void onGlobalLayout() {
	ImageView imageView = getImageView();

	if (null != imageView && mZoomEnabled) {
		final int top = imageView.getTop();
		final int right = imageView.getRight();
		final int bottom = imageView.getBottom();
		final int left = imageView.getLeft();

		/**
		 * 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());

			// Update values as something has changed
			mIvTop = top;
			mIvRight = right;
			mIvBottom = bottom;
			mIvLeft = left;
		}
	}
}
 
源代码14 项目: jmessage-android-uikit   文件: PhotoViewAttacher.java
@Override
public final void onGlobalLayout() {
	ImageView imageView = getImageView();

	if (null != imageView && mZoomEnabled) {
		final int top = imageView.getTop();
		final int right = imageView.getRight();
		final int bottom = imageView.getBottom();
		final int left = imageView.getLeft();

		/**
		 * 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());

			// Update values as something has changed
			mIvTop = top;
			mIvRight = right;
			mIvBottom = bottom;
			mIvLeft = left;
		}
	}
}
 
源代码15 项目: UltimateAndroid   文件: PanningViewAttacher.java
@Override
public void onGlobalLayout() {
	ImageView imageView = getImageView();

	if (null != imageView) {
		final int top = imageView.getTop();
		final int right = imageView.getRight();
		final int bottom = imageView.getBottom();
		final int left = imageView.getLeft();

		/**
		 * 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();

			// Update values as something has changed
			mIvTop = top;
			mIvRight = right;
			mIvBottom = bottom;
			mIvLeft = left;
		}
	}
}
 
源代码16 项目: aurora-imui   文件: PhotoViewAttacher.java
@Override
public final void onGlobalLayout() {
	ImageView imageView = getImageView();

	if (null != imageView && mZoomEnabled) {
		final int top = imageView.getTop();
		final int right = imageView.getRight();
		final int bottom = imageView.getBottom();
		final int left = imageView.getLeft();

		/**
		 * 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());

			// Update values as something has changed
			mIvTop = top;
			mIvRight = right;
			mIvBottom = bottom;
			mIvLeft = left;
		}
	}
}
 
源代码17 项目: WifiChat   文件: PhotoViewAttacher.java
@Override
public final void onGlobalLayout() {
    ImageView imageView = getImageView();

    if (null != imageView && mZoomEnabled) {
        final int top = imageView.getTop();
        final int right = imageView.getRight();
        final int bottom = imageView.getBottom();
        final int left = imageView.getLeft();

        /**
         * 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());

            // Update values as something has changed
            mIvTop = top;
            mIvRight = right;
            mIvBottom = bottom;
            mIvLeft = left;
        }
    }
}
 
源代码18 项目: twitter-kit-android   文件: TweetMediaView.java
void layoutImage(int i, int left, int top, int right, int bottom) {
    final ImageView view = imageViews[i];
    if (view.getLeft() == left && view.getTop() == top && view.getRight() == right
            && view.getBottom() == bottom) {
        return;
    }

    view.layout(left, top, right, bottom);
}
 
源代码19 项目: Nimingban   文件: 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();

            /**
             * 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());

                // Update values as something has changed
                mIvTop = top;
                mIvRight = right;
                mIvBottom = bottom;
                mIvLeft = left;
            }
        } else {
            updateBaseMatrix(imageView.getDrawable());
        }
    }
}
 
源代码20 项目: school_shop   文件: PhotoViewAttacher.java
@Override
public final void onGlobalLayout() {
	ImageView imageView = getImageView();

	if (null != imageView && mZoomEnabled) {
		final int top = imageView.getTop();
		final int right = imageView.getRight();
		final int bottom = imageView.getBottom();
		final int left = imageView.getLeft();

		/**
		 * 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());

			// Update values as something has changed
			mIvTop = top;
			mIvRight = right;
			mIvBottom = bottom;
			mIvLeft = left;
		}
	}
}