diff --git a/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java b/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java index 52faef6..75df024 100644 --- a/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java +++ b/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java @@ -30,7 +30,7 @@ private Integer drawingNum; private Integer drawingNow = 0; private Integer nowTime; - private Integer alphaNow; //今のペンの透明度 + private Integer alphaNow=255; //今のペンの透明度 private ToggleButton okToggleButton; @Override @@ -197,9 +197,21 @@ drawingCanvas.clearCanvas(); } else if (v.getId() == R.id.eraserButton) {//eraserButtonが押されたときの処理 drawingCanvas.setColor(Color.WHITE); + v.setBackgroundColor(Color.rgb(173,216,230)); + findViewById(R.id.blackPenButton).setBackgroundColor(Color.rgb(211,211,211)); + findViewById(R.id.blackPenButton).setScaleX(0.9f); + findViewById(R.id.blackPenButton).setScaleY(0.9f); + findViewById(R.id.eraserButton).setScaleX(1.0f); + findViewById(R.id.eraserButton).setScaleY(1.0f); } else if (v.getId() == R.id.blackPenButton) { drawingCanvas.setColor(Color.BLACK); drawingCanvas.setAlpha(alphaNow); + v.setBackgroundColor(Color.rgb(173,216,230)); + findViewById(R.id.eraserButton).setBackgroundColor(Color.rgb(211,211,211)); + findViewById(R.id.eraserButton).setScaleX(0.9f); + findViewById(R.id.eraserButton).setScaleY(0.9f); + findViewById(R.id.blackPenButton).setScaleX(1.0f); + findViewById(R.id.blackPenButton).setScaleY(1.0f); } } }