Android: Run a function after a delay


/ Published in: Objective C
Save to your folder(s)

Note that variables that you use within the run function must be marked as 'final'


Copy this code and paste it in your HTML
  1. new Handler().postDelayed(new Runnable() {
  2. public void run() {
  3. myVar.doSomething();
  4. }
  5. }, 2000);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.