I have this resource file for colors
#00f
#f00
setBackgroundResource is expecting a drawable, not a color. You want setBackgroundColor.
Also, your colors should have at least 6 digits, #RRGGBB
I.e., for blue: #0000FF
I think what you have might be equivalent to #00000F, which is close to black...
And finally, you should never sleep in the UI thread (or change UI items not in the UI thread). See Painless Threading for a number of different ways of using other threads. I think that postDelayed might be what you are looking for.