diff --git a/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java b/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java index 8c4ca79..4764eab 100644 --- a/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java +++ b/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java @@ -99,9 +99,10 @@ public void onClick(View v){ if(v.getId() == R.id.okButtton) {//okButtonが押されたときの処理 // Bitmap bitmap = null; - drawingCanvas.setDrawingCacheEnabled(true); + drawingCanvas.setDrawingCacheEnabled(true);//キャッシュを取得する設定にする drawingCanvas.buildDrawingCache(); Bitmap bitmap = Bitmap.createBitmap(drawingCanvas.getDrawingCache()); + drawingCanvas.destroyDrawingCache();//既存のキャッシュをクリアする drawingStateViewModel.putDrawing(bitmap); }else if(v.getId() == R.id.clearButton){//clearButtonが押されたときの処理 drawingCanvas.clearCanvas();