Back to project page Kite.
The source code is released under:
Apache License
If you think the Android project Kite listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.kite.services; // www .j a va 2 s. c o m import android.os.Handler; import android.os.Looper; import java.util.concurrent.Executor; /** * Executes commands in main thread. * * @author Nikolay Soroka */ public class MainThreadExecutor implements Executor { private final Handler handler; /**Constructs new <code>MainThreadExecutor</code>. */ public MainThreadExecutor(){ this.handler = new Handler(Looper.getMainLooper()); } /** {@inheritDoc} */ @Override public void execute(Runnable command) { handler.post(command); } }