diff --git a/app/src/main/java/org/ntlab/acanthus_client/views/paint/PaintActivity.java b/app/src/main/java/org/ntlab/acanthus_client/views/paint/PaintActivity.java index b774448..6cab191 100644 --- a/app/src/main/java/org/ntlab/acanthus_client/views/paint/PaintActivity.java +++ b/app/src/main/java/org/ntlab/acanthus_client/views/paint/PaintActivity.java @@ -6,6 +6,7 @@ import android.content.Intent; import android.os.Bundle; +import android.view.MotionEvent; import android.view.View; import android.widget.Button; import android.widget.TextView; @@ -25,6 +26,8 @@ private ActivityPaintBinding binding; private PaintViewModel paintViewModel; + private boolean buttonView = false; + //----------------------------------------------------------------- //----------------------------------------------------------------- @Override @@ -47,8 +50,21 @@ button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - Intent intent = new Intent(getApplication(), PaintScreenShot.class); - startActivity(intent); + //bottonタップで表示されてたら非表示にする。 + if(buttonView) { + findViewById(R.id.capture).setVisibility(View.INVISIBLE); + findViewById(R.id.image).setVisibility(View.INVISIBLE); + findViewById(R.id.textView3).setVisibility(View.INVISIBLE); + + buttonView = false; + } + else { + findViewById(R.id.capture).setVisibility(View.VISIBLE); + findViewById(R.id.image).setVisibility(View.VISIBLE); + findViewById(R.id.textView3).setVisibility(View.VISIBLE); + + buttonView = true; + } } }); } @@ -97,6 +113,9 @@ paintScreenShot = new PaintScreenShot(this); paintToolBar = new PaintToolBar(this, paintCanvas); + findViewById(R.id.capture).setVisibility(View.INVISIBLE); + findViewById(R.id.image).setVisibility(View.INVISIBLE); + findViewById(R.id.textView3).setVisibility(View.INVISIBLE); } //-----------------------------------------------------------------