mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 20:13:36 +00:00
Updated pause/blink style.
This commit is contained in:
parent
09fb5f1f4b
commit
c4486b3158
@ -53,6 +53,7 @@ public class MainActivity extends WebSocketActivityBase {
|
||||
private View disconnectedOverlay;
|
||||
private SeekBar seekbar;
|
||||
private int seekbarValue = -1;
|
||||
private int blink = 0;
|
||||
|
||||
static {
|
||||
REPEAT_TO_STRING_ID = new HashMap<>();
|
||||
@ -361,14 +362,15 @@ public class MainActivity extends WebSocketActivityBase {
|
||||
seekbar.setProgress((int) current);
|
||||
seekbar.setSecondaryProgress((int) playback.getBufferedTime());
|
||||
|
||||
int currentTimeColor = R.color.theme_foreground;
|
||||
if (playback.getPlaybackState() == PlaybackState.Paused) {
|
||||
final boolean visible = currentTime.getVisibility() == View.VISIBLE;
|
||||
currentTime.setVisibility(visible ? View.INVISIBLE : View.VISIBLE);
|
||||
}
|
||||
else {
|
||||
currentTime.setVisibility(View.VISIBLE);
|
||||
currentTimeColor = ++blink % 2 == 0
|
||||
? R.color.theme_foreground
|
||||
: R.color.theme_blink_foreground;
|
||||
}
|
||||
|
||||
currentTime.setTextColor(ContextCompat.getColor(this, currentTimeColor));
|
||||
|
||||
scheduleUpdateTime(false);
|
||||
};
|
||||
|
||||
|
@ -3,13 +3,13 @@
|
||||
<color name="color_primary">#44661f</color>
|
||||
<color name="color_primary_dark">#2c4214</color>
|
||||
<color name="color_accent">#d1ff9f</color>
|
||||
|
||||
<color name="theme_red">#DC5256</color>
|
||||
<color name="theme_green">#A6E22E</color>
|
||||
<color name="theme_yellow">#E6DC74</color>
|
||||
<color name="theme_orange">#FF9620</color>
|
||||
<color name="theme_blue">#66D9EE</color>
|
||||
<color name="theme_disabled_foreground">#808080</color>
|
||||
<color name="theme_blink_foreground">#606060</color>
|
||||
<color name="theme_foreground">#E6E6E6</color>
|
||||
<color name="theme_selected_background">#424238</color>
|
||||
<color name="theme_button_background">#303030</color>
|
||||
|
Loading…
Reference in New Issue
Block a user