- int bgColor;
- BoxInsetLayout insetLayout = findViewById(R.id.box_inset_layout);
- RelativeLayout layout = findViewById(R.id.relative_main_layout);
-
- ImageButton btn1 = findViewById(R.id.btn1);
- ImageButton btn2 = findViewById(R.id.btn2);
- ImageButton btn3 = findViewById(R.id.btn3);
-
- updateMainSubCounter();
-
- if (timerCounter.isStarted())
- {
- bgColor = Color.BLACK;
- insetLayout.setBackgroundColor(bgColor);
- insetLayout.invalidate();
-
- layout.setBackgroundColor(bgColor);
- layout.invalidate();
-
- btn1.setImageResource(R.drawable.ic_flag_black_24dp);
- btn1.setBackgroundColor(bgColor);
- btn1.setVisibility(View.VISIBLE);
- btn1.invalidate();
-
- btn2.setImageResource(R.drawable.ic_stop_black_24dp);
- btn2.setBackgroundColor(bgColor);
- btn2.setVisibility(View.VISIBLE);
- btn2.invalidate();
-
- btn3.setImageResource(R.drawable.ic_block_black_24dp);
- btn3.setBackgroundColor(bgColor);
- btn3.setVisibility(View.INVISIBLE);
- btn3.invalidate();
-
- updateElapsedTimes();
- }
- else if (timerCounter.isReset())
- {
- bgColor = Color.BLACK;
- insetLayout.setBackgroundColor(bgColor);
- insetLayout.invalidate();
-
- layout.setBackgroundColor(bgColor);
- layout.invalidate();
-
- btn1.setImageResource(R.drawable.ic_play_arrow_black_24dp);
- btn1.setBackgroundColor(bgColor);
- btn1.setVisibility(View.VISIBLE);
- btn1.invalidate();
-
- btn2.setImageResource(R.drawable.ic_format_list_bulleted_black_24dp);
- btn2.setBackgroundColor(bgColor);
- btn2.setVisibility(View.VISIBLE);
- btn2.invalidate();
-
- btn3.setImageResource(R.drawable.ic_refresh_black_24dp);
- btn3.setBackgroundColor(bgColor);
- btn3.setVisibility(View.INVISIBLE);
- btn3.invalidate();
-
- updateElapsedTimes();
- }
- else
- {
- bgColor = Color.BLACK;
- insetLayout.setBackgroundColor(bgColor);
- insetLayout.invalidate();
-
- layout.setBackgroundColor(bgColor);
- layout.invalidate();