Skip to content

Instantly share code, notes, and snippets.

@amitshekhariitbhu
Created July 10, 2016 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amitshekhariitbhu/75034e3a69fdb835fa29bc63ae8a2d33 to your computer and use it in GitHub Desktop.
Save amitshekhariitbhu/75034e3a69fdb835fa29bc63ae8a2d33 to your computer and use it in GitHub Desktop.
public class MainThreadExecutor implements Executor {
private final Handler handler = new Handler(Looper.getMainLooper());
@Override
public void execute(Runnable runnable) {
handler.post(runnable);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment