Created
October 9, 2017 08:43
-
-
Save ssaurel/55d9def6c65caf3503641ebc859a05a8 to your computer and use it in GitHub Desktop.
StartClock method for a tutorial on the SSaurel's Blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void startClock() { | |
timer = new Timer(); | |
timer.scheduleAtFixedRate(new TimerTask() { | |
@Override | |
public void run() { | |
final String hexaTime = getHexaTime(); | |
runOnUiThread(new Runnable() { | |
@Override | |
public void run() { | |
applyColor(hexaTime); | |
} | |
}); | |
} | |
}, 0, 1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment