diff --git a/app/src/main/java/org/ntlab/acanthus_client/views/animation/AnimationActivity.java b/app/src/main/java/org/ntlab/acanthus_client/views/animation/AnimationActivity.java index 242a3b8..e6113a4 100644 --- a/app/src/main/java/org/ntlab/acanthus_client/views/animation/AnimationActivity.java +++ b/app/src/main/java/org/ntlab/acanthus_client/views/animation/AnimationActivity.java @@ -49,6 +49,7 @@ private Button buttonDetail; private Button buttonSkip; private Button buttonBack; + private Button buttonVisible; //animationCanvasの表示 @@ -56,7 +57,7 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_animation); - //animationCanvas = this.findViewById(R.id.animationMyCanvas); + animationCanvas = this.findViewById(R.id.animationMyCanvas); init(); //intentでHomeFragmentから渡されたanimation情報を取得 @@ -131,13 +132,11 @@ startActivity(intent); } }); - } - //Activity内のボタンの表示/非表示 - @Override - public boolean onTouchEvent(MotionEvent motionEvent) { - switch (motionEvent.getAction()){ - case MotionEvent.ACTION_DOWN: - //画面タップで表示されてたら非表示にする。 + + //Activity内のボタンの表示/非表示 + buttonVisible = findViewById(R.id.button_visible); + buttonVisible.setOnClickListener(new View.OnClickListener(){ + public void onClick(View v) { if(buttonView) { buttonReset.setVisibility(View.INVISIBLE); buttonPlayback.setVisibility(View.INVISIBLE); @@ -158,9 +157,38 @@ buttonView = true; } - } - return false; + } + }); } + //Activity内のボタンの表示/非表示 +// @Override +// public boolean onTouchEvent(MotionEvent motionEvent) { +// switch (motionEvent.getAction()){ +// case MotionEvent.ACTION_DOWN: +// //画面タップで表示されてたら非表示にする。 +// if(buttonView) { +// buttonReset.setVisibility(View.INVISIBLE); +// buttonPlayback.setVisibility(View.INVISIBLE); +// buttonDetail.setVisibility(View.INVISIBLE); +// buttonClose.setVisibility(View.INVISIBLE); +// buttonSkip.setVisibility(View.INVISIBLE); +// buttonBack.setVisibility(View.INVISIBLE); +// +// buttonView = false; +// } +// else { +// buttonReset.setVisibility(View.VISIBLE); +// buttonPlayback.setVisibility(View.VISIBLE); +// buttonDetail.setVisibility(View.VISIBLE); +// buttonClose.setVisibility(View.VISIBLE); +// buttonSkip.setVisibility(View.VISIBLE); +// buttonBack.setVisibility(View.VISIBLE); +// +// buttonView = true; +// } +// } +// return false; +// } ////////////////////////////////////////////////////////////////////////////