Last active
May 22, 2018 15:21
-
-
Save Miha-x64/a0f9e6ccf3ecd1860b65dff537bd0370 to your computer and use it in GitHub Desktop.
It is an android.os.Handler and java.util.concurrent.Executor at the same time.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.os.Handler; | |
import android.os.Looper; | |
import android.support.annotation.NonNull; | |
import java.util.concurrent.Executor; | |
public class Handlecutor extends Handler implements Executor { | |
public Handlecutor(@NonNull Looper looper) { | |
super(looper); | |
} | |
@Override | |
public final void execute(@NonNull Runnable command) { | |
post(command); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment