Android “Skipped XX frames!”

So I am learning on how to develop android applications. I am trying to get this program to flash some letters, one at a time fairly quickly on a textView, but when I try this on my android device and it does not work I get the message “I/Choreographer﹕ Skipped 57 frames! The application may be doing too much work on its main thread.” (AttetionalBlinkTrial is a class that has a field called “blinkList” that is an ArrayList of strings)

public void startTask(View view) throws InterruptedException {
    TextView textView = (TextView) findViewById(;
    AttentionalBlinkTrial theTrial = new AttentionalBlinkTrial();
    for (int i = 0; i <= 5; i++) {


Thread.sleep makes UI thread inaccessible. You should use Handler class instead. Sorry I can’t provide any codes since I am on mobile but it’s quite easy. If i remember right “postDelayed” method is what you need.

public void blink(TextView textView) {
    if (textView.getText() == "Blink!") {
    } else {

public void blinkingTask() throws InterruptedException {
    final Handler handler = new Handler();
    final TextView textView = (TextView) findViewById(;
    Runnable runnable = new Runnable() {
        public void run() {

    for (int i = 0; i <= 5; i++) {
        handler.postDelayed(runnable, 1000 + (i * 1000)); // 5 delayed actions with 1000 ms interval.

Leave a Reply

Your email address will not be published. Required fields are marked *