Skip to content

Instantly share code, notes, and snippets.

@ninthdrug
Created July 20, 2015 13:45
Show Gist options
  • Save ninthdrug/40cbbb4849c727c9c20c to your computer and use it in GitHub Desktop.
Save ninthdrug/40cbbb4849c727c9c20c to your computer and use it in GitHub Desktop.
Handler mHandler;
public void useHandler() {
mHandler = new Handler();
mHandler.postDelayed(mRunnable, 1000);
}
private Runnable mRunnable = new Runnable() {
@Override
public void run() {
/** Do something **/
mHandler.postDelayed(mRunnable, 1000);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment