Do stuffs inside a for in a thread android : @Override

    public void run() {

        act.runOnUiThread(new Runnable() {

            @Override

            public void run() {

                for (int i = 0; i < randomNumber.size(); i++) {

                    Log.d("N",randomNumber.get(i).toString());

                    if (randomNumber.get(i).intValue() == 1) imgColor.setBackgroundColor(Color.RED);
                    if (randomNumber.get(i).intValue() == 2) imgColor.setBackgroundColor(Color.GREEN);
                    if (randomNumber.get(i).intValue() == 3) imgColor.setBackgroundColor(Color.BLUE);
                    if (randomNumber.get(i).intValue() == 4) imgColor.setBackgroundColor(Color.YELLOW);

                    try {
                        Thread.sleep(1750);
                    } catch (Exception e) {
                        Thread.currentThread().interrupt();
                    }

                    imgColor.setBackgroundColor(Color.BLACK);

                    try {
                        Thread.sleep(400);
                    } catch (Exception e) {
                        Thread.currentThread().interrupt();
                    }

                }

                Toast.makeText(act, "Ripeti la sequenza", Toast.LENGTH_SHORT).show();
            }
        });
    }

I'm trying to have imgColor ImageView colored each 1,75 second with a different color according to the value of the number in the randomColor ArrayList, but it doesn't work ! What should I do ?

Thanks in advance 