Skip to content

Commit

Permalink
fixed background playback when info button pressed
Browse files Browse the repository at this point in the history
  • Loading branch information
Porvil committed Oct 26, 2020
1 parent 718eecb commit 15c66ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,12 @@ public void onClick(View v) {
ImageButton btn_close = view.findViewById(R.id.btn_close);

String comparisons = "-";
if(mergeSort != null)
if(mergeSort != null) {
isAutoPlay = false;
btn_play.setImageDrawable(UtilUI.getDrawable(context, AppSettings.PLAY_BUTTON));
timer.cancel();
comparisons = String.valueOf(mergeSort.comparisons);
}

tv_name.setText(MergeSortStats.name);
tv_avg.setText(MergeSortStats.avg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,12 @@ public void onClick(View v) {
ImageButton btn_close = view.findViewById(R.id.btn_close);

String comparisons = "-";
if(quickSort != null)
if(quickSort != null) {
isAutoPlay = false;
btn_play.setImageDrawable(UtilUI.getDrawable(context, AppSettings.PLAY_BUTTON));
timer.cancel();
comparisons = String.valueOf(quickSort.comparisons);
}

tv_name.setText(QuickSortStats.name);
tv_avg.setText(QuickSortStats.avg);
Expand Down

0 comments on commit 15c66ea

Please sign in to comment.