Skip to content

Instantly share code, notes, and snippets.

@wada811
Created September 9, 2014 04:01
Show Gist options
  • Save wada811/d41253427134a014a388 to your computer and use it in GitHub Desktop.
Save wada811/d41253427134a014a388 to your computer and use it in GitHub Desktop.
public abstract class UiHandler extends Handler implements Runnable {
public UiHandler(){
super(Looper.getMainLooper());
}
public UiHandler(Handler.Callback callback){
super(Looper.getMainLooper(), callback);
}
public boolean post(){
return post(this);
}
public boolean postAtFrontOfQueue(){
return postAtFrontOfQueue(this);
}
public boolean postAtTime(Object token, long uptimeMillis){
return postAtTime(this, token, uptimeMillis);
}
public boolean postAtTime(long uptimeMillis){
return postAtTime(this, uptimeMillis);
}
public boolean postDelayed(long delayMillis)
return postDelayed(this, delayMillis);
}
public abstract void run();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment