本文整理了Java中android.widget.ImageView.getHitRect()
方法的一些代码示例,展示了ImageView.getHitRect()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.getHitRect()
方法的具体详情如下:
包路径:android.widget.ImageView
类名称:ImageView
方法名:getHitRect
暂无
代码示例来源:origin: Bearded-Hen/Android-Bootstrap
@Override
public void run() {
Rect bounds = new Rect();
closeButton.getHitRect(bounds);
bounds.top -= DimenUtils.dpToPixels(6);
bounds.bottom += DimenUtils.dpToPixels(6);
bounds.left -= DimenUtils.dpToPixels(6);
bounds.right += DimenUtils.dpToPixels(6);
TouchDelegate touchDelegate = new TouchDelegate(bounds, closeButton);
if (View.class.isInstance(closeButton.getParent())) {
((View) closeButton.getParent()).setTouchDelegate(touchDelegate);
}
}
});
代码示例来源:origin: TakuSemba/CropMe
@Override
public boolean isOffOfFrame() {
ImageView imageView = findViewById(R.id.cropme_image_view);
Rect targetRect = new Rect();
imageView.getHitRect(targetRect);
return !targetRect.contains((int) frame.left, (int) frame.top, (int) frame.right, (int) frame.bottom);
}
代码示例来源:origin: stackoverflow.com
image.getHitRect(mImageRect);
代码示例来源:origin: TakuSemba/CropMe
ImageView imageView = findViewById(R.id.cropme_image_view);
final Rect targetRect = new Rect();
imageView.getHitRect(targetRect);
final Bitmap sourceBitmap = ((BitmapDrawable) imageView.getDrawable()).getBitmap();
new Thread(new Runnable() {
内容来源于网络,如有侵权,请联系作者删除!