Guest User

Untitled

a guest
Jul 16th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. package com.legalimpurity.asynctaskwrittenfromscratch.MyAsyncTaskCode.executors
  2.  
  3. import android.os.Looper
  4. import java.util.concurrent.Executor
  5.  
  6. class MainThreadExecutor : Executor
  7. {
  8. private val handler = android.os.Handler(Looper.getMainLooper())
  9.  
  10. override fun execute(runnable: Runnable?) {
  11. handler.post(runnable)
  12. }
  13. }
Add Comment
Please, Sign In to add comment