Blink current time when paused, like old CD players used to.

This commit is contained in:
casey langen 2017-06-04 18:58:08 -07:00
parent c5d88afd1c
commit 6634db9ae0
2 changed files with 11 additions and 3 deletions

View File

@ -3,14 +3,14 @@ apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "io.casey.musikcube.remote"
minSdkVersion 16
targetSdkVersion 25
versionCode 10
versionName "0.8"
versionCode 11
versionName "0.9"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

View File

@ -361,6 +361,14 @@ public class MainActivity extends WebSocketActivityBase {
seekbar.setProgress((int) current);
seekbar.setSecondaryProgress((int) playback.getBufferedTime());
if (playback.getPlaybackState() == PlaybackState.Paused) {
final boolean visible = currentTime.getVisibility() == View.VISIBLE;
currentTime.setVisibility(visible ? View.INVISIBLE : View.VISIBLE);
}
else {
currentTime.setVisibility(View.VISIBLE);
}
scheduleUpdateTime(false);
};