1

I was creating an android app in which I need to show an imageview for 2 seconds and then another one ; I know that there are different ways to do it (in fact i've already solved this problem) but I was wondering if does it exist a special function like delay() (for Arduino environment) that stops the program for a while so I can write 2 setimageresource one after the other. I know it may seem a stupid question but it's just a curiosity ... Thank you for your attention

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
  • I think this post will help you with what you need : http://stackoverflow.com/questions/1520887/how-to-pause-sleep-thread-or-process-in-android – ChrisK Mar 20 '17 at 17:33
  • 3
    You shouldn't block the main thread. You could use a [TimerTask](https://developer.android.com/reference/java/util/TimerTask.html) – cylon Mar 20 '17 at 17:34

0 Answers0