华为手机裁剪矩形图时,焦点框不是正方形的
gavin0x00 opened this issue · comments
NFLeo commented
ImageCropActivity.java
int cropWidth = mSpec.cropFocusWidth > 0 && mSpec.cropFocusWidth < UIUtils.getScreenWidth(this) - (int) SizeUtils.dp2px(this, 50)
? mSpec.cropFocusWidth : UIUtils.getScreenWidth(this) - (int) SizeUtils.dp2px(this, 50);
int cropHeight = mSpec.cropFocusHeight > 0 && mSpec.cropFocusHeight < UIUtils.getScreenHeight(this) - (int) SizeUtils.dp2px(this, 400)
? mSpec.cropFocusHeight : UIUtils.getScreenHeight(this) - (int) SizeUtils.dp2px(this, 400);
不设置裁剪框大小默认是根据屏幕尺寸来的,所以在不同分辨率设备上表现也不一样。自己设置一下裁剪框尺寸就好了
gavin0x00 commented
got it