Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.text.ClipboardManager;

public class Main {
    private final static String initializeErrorString = "Class has not been initialized\nYou need to call ClipboardHelper.Initialize(context) first.";
    private static ClipboardManager clipboardManager;

    public static void setText(CharSequence text) {
        if (clipboardManager == null)
            throw new NullPointerException(initializeErrorString);

        clipboardManager.setText(text);
    }
}