本文整理了Java中android.widget.ImageView.getGlobalVisibleRect()
方法的一些代码示例,展示了ImageView.getGlobalVisibleRect()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.getGlobalVisibleRect()
方法的具体详情如下:
包路径:android.widget.ImageView
类名称:ImageView
方法名:getGlobalVisibleRect
暂无
代码示例来源:origin: razerdp/FriendCircle
private Rect getDrawableBoundsInView(ImageView iv) {
if (iv != null && iv.getDrawable() != null) {
Drawable d = iv.getDrawable();
Rect result = new Rect();
iv.getGlobalVisibleRect(result);
Rect tDrawableRect = d.getBounds();
Matrix drawableMatrix = iv.getImageMatrix();
float[] values = new float[9];
if (drawableMatrix != null) {
drawableMatrix.getValues(values);
}
result.left += (int) values[2];
result.top += (int) values[5];
result.right = (int) ((float) result.left + (float) tDrawableRect.width() * (values[0] == 0.0F ? 1.0F : values[0]));
result.bottom = (int) ((float) result.top + (float) tDrawableRect.height() * (values[4] == 0.0F ? 1.0F : values[4]));
return result;
} else {
return null;
}
}
}
代码示例来源:origin: andforce/iBeebo
boolean isVisible = imageView.getGlobalVisibleRect(rect);
if (!isVisible) {
int[] location = new int[2];
代码示例来源:origin: andforce/iBeebo
boolean isVisible = imageView.getGlobalVisibleRect(rect.imageViewVisibleRect);
代码示例来源:origin: stackoverflow.com
ImageView drop_icon = (ImageView) findViewById(R.id.main_image);
Rect icon_rect = new Rect();
drop_icon.getGlobalVisibleRect(icon_rect);
Log.d(TAG, "icon at " + icon_rect.left + "<- ->" + icon_rect.right + ", " +
icon_rect.top + " ^ v" + icon_rect.bottom);
代码示例来源:origin: tony-Shx/Swface
expandedImageView.getGlobalVisibleRect(startBounds);
findViewById(R.id.container)
.getGlobalVisibleRect(finalBounds, globalOffset);
代码示例来源:origin: sismics/reader
thumbView.getGlobalVisibleRect(startBounds);
getView().findViewById(R.id.container)
.getGlobalVisibleRect(finalBounds, globalOffset);
代码示例来源:origin: guardianproject/Ripple
if (!mSwipeArrows.getGlobalVisibleRect(mArrowRect)) {
mArrowRect = null;
} else {
Rect symbolRect = new Rect();
if (mPanicSwipeButton.getGlobalVisibleRect(symbolRect)) {
yMaxTranslation = mArrowRect.bottom - symbolRect.bottom;
代码示例来源:origin: Jerey-Jobs/KeepGank
if (itemView != null) {
ImageView thumbView = (ImageView) itemView.findViewById(R.id.item_img);
thumbView.getGlobalVisibleRect(bound);
内容来源于网络,如有侵权,请联系作者删除!