Java tutorial
//package com.java2s; //License from project: Apache License import android.os.Handler; public class Main { /** * Get a handler object tied to the callback implemented in the activity / fragment * @return {@link Handler} */ public static Handler getHandlerWithCallback(Handler.Callback callback) { Handler handler = new Handler(callback); return handler; } }