Last active
January 16, 2017 13:28
-
-
Save gSrikar/92ec5a4c4a78cb21e1cd4ed7657262d8 to your computer and use it in GitHub Desktop.
This gist shows when a Resources Not Found Exception is thrown especially when implementing CountDownTimer. I've explained about the exception in detail in my blog post http://gsrikar.blogspot.com/2017/01/resources-not-found-exception-in-android.html
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
new CountDownTimer(10000, 1000) { | |
@Override | |
public void onTick(long millisUntilFinished) { | |
Log.i(TAG, "Time in Milli until finished: " + millisUntilFinished); | |
int remainingTimeInSec = (int) (millisUntilFinished / 1000); | |
countDownTimeTextView.setText(remainingTimeInSec); | |
} | |
@Override | |
public void onFinish() { | |
Log.i(TAG, "On Finish called"); | |
countDownTimeTextView.setText(0); | |
} | |
}.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment