Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.os.Handler;
import android.os.Looper;

public class Main {
    public static Handler mMainHandler;

    public static void removeCallbacks(Runnable runnable) {
        getMainThreadHandler().removeCallbacks(runnable);
    }

    public static Handler getMainThreadHandler() {
        if (mMainHandler == null) {
            mMainHandler = new Handler(Looper.getMainLooper());
        }
        return mMainHandler;
    }
}