Skip to content

Commit

Permalink
bug : 修复图片不断裁剪造成crush问题。
Browse files Browse the repository at this point in the history
  • Loading branch information
Green221101 committed Nov 18, 2022
1 parent b7839fb commit 96a11ba
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.xinlan.imageeditlibrary.R;
import com.xinlan.imageeditlibrary.editimage.ModuleConfig;

Expand Down Expand Up @@ -121,8 +122,11 @@ private void onFilterClick() {
* @author panyi
*/
private void onCropClick() {
activity.bottomGallery.setCurrentItem(CropFragment.INDEX);
activity.mCropFragment.onShow();
//如果图片非常小,还去裁剪,没有裁剪效果,还会造成crush。在此限制图片如果太小,裁剪就不去响应。
if (activity.getMainBit().getHeight() > 10 && activity.getMainBit().getWidth() > 10) {
activity.bottomGallery.setCurrentItem(CropFragment.INDEX);
activity.mCropFragment.onShow();
}
}

/**
Expand Down

0 comments on commit 96a11ba

Please sign in to comment.