diff --git a/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java b/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java index d255f4a..f7af557 100644 --- a/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java +++ b/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java @@ -144,6 +144,14 @@ public void onChanged(Integer time) { nowTime = time; timerText.setText(nowTime+""); + if(nowTime == 0){//タイマーが0秒になったら強制put + //putDrawing + drawingCanvas.setDrawingCacheEnabled(true);//キャッシュを取得する設定にする + drawingCanvas.buildDrawingCache(); + Bitmap bitmap = Bitmap.createBitmap(drawingCanvas.getDrawingCache()); + drawingCanvas.destroyDrawingCache();//既存のキャッシュをクリアする + drawingStateViewModel.putDrawing(bitmap); + } } });