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 441ed09..e76eaeb 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 @@ -39,7 +39,7 @@ private Timer timer; private CountUpTimerTask timerTask; private Handler handler = new Handler(Looper.getMainLooper()); - private int msec = 500; + private int msec = 1000; //ボタン系 private boolean buttonView = true; @@ -84,12 +84,6 @@ buttonPlayback.setOnClickListener(new View.OnClickListener(){ public void onClick(View v) { onClickPlayback(); - if(player){ - buttonPlayback.setBackgroundDrawable(getResources().getDrawable(R.drawable.ic_baseline_play_arrow)); - } - else { - buttonPlayback.setBackgroundDrawable(getResources().getDrawable(R.drawable.ic_baseline_pause)); - } } }); @@ -130,10 +124,7 @@ buttonDetail = findViewById(R.id.button_detail); buttonDetail.setOnClickListener(new View.OnClickListener(){ public void onClick(View v) { - if(player){ - onClickPlayback(); - buttonPlayback.setBackgroundDrawable(getResources().getDrawable(R.drawable.ic_baseline_play_arrow)); - } + if(player) onClickPlayback(); Intent intent = new Intent(AnimationActivity.this, AnimationDetailActivity.class); intent.putExtra("AnimationJsonData", animationJson); startActivity(intent); @@ -231,14 +222,16 @@ //timerの終了 timer.cancel(); timer = null; - player = true; + buttonPlayback.setBackgroundDrawable(getResources().getDrawable(R.drawable.ic_baseline_play_arrow)); + player = false; } else{ //timerの生成 this.timer = new Timer(); this.timerTask = new CountUpTimerTask(); this.timer.schedule(timerTask,0, this.msec);//スケジュールを100ms毎に設定する。 - player = false; + buttonPlayback.setBackgroundDrawable(getResources().getDrawable(R.drawable.ic_baseline_pause)); + player = true; } }