Commit a83bcd8af8d5a99e3b1bd8b064ef2a48a229053d
1 parent
e253e5291b
Exists in
master
切图去字迹时避免重复触发
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
app/src/main/java/com/hjx/parent/ImageActivity.java
... | ... | @@ -132,6 +132,9 @@ public class ImageActivity extends BaseRxActivity<ActivityImageBinding> implemen |
132 | 132 | String filepath = context.getExternalFilesDir("images").getPath() + "/" + String.valueOf(System.currentTimeMillis()) + CommonUtil.getStr() + ".jpg"; |
133 | 133 | CommonUtil.saveBitmapToUri(BitmapUtils.stringToBitmap(image), filepath); |
134 | 134 | list.get(index).setPath(filepath); |
135 | + if (list.get(index).getCuts() == null) { | |
136 | + list.get(index).setCuts(new ArrayList<>()); | |
137 | + } | |
135 | 138 | imageAdapter.notifyItemChanged(index); |
136 | 139 | cut(filepath); |
137 | 140 | } else { | ... | ... |