How to use a timer?


I want to change the background, but I want to change it using a timer. for example in the morning I have a background and evening I have another background. But I don't know what to use in Android. and if you have an example to follow. any idea?

Just to make sure I understand what you mean, do you want to:

-Change the background after a time or
-change the background at different daytimes?

To accomplish the second one, I would set a switch into your OnCreate() method (or any other place e.g. OnResume(), a button click) that looks for the Time with

Time t = new Time();

and then decides what Image to use