Android Clipboard Copy setClipboard(Context context, String text)

Here you can find the source of setClipboard(Context context, String text)

Description

set Clipboard

Declaration

@SuppressWarnings("deprecation")
    public static boolean setClipboard(Context context, String text) 

Method Source Code

//package com.java2s;
import android.content.Context;

public class Main {
    @SuppressWarnings("deprecation")
    public static boolean setClipboard(Context context, String text) {
        android.text.ClipboardManager clipboard = (android.text.ClipboardManager) context
                .getSystemService(Context.CLIPBOARD_SERVICE);
        clipboard.setText(text);/*from   www.ja  va  2s.  co m*/
        return true;
    }
}

Related

  1. onCopy(Context context, String content)
  2. copyToClipboard(Context context, String label, String string, int toastMessageId)
  3. copyToClipboard(Context context, String lable, String text)
  4. copyToClipboard(Context context, String lable, String text)
  5. set(Context context, String value)
  6. setText(final Context context, final CharSequence text)
  7. setText(final Context context, final CharSequence text)
  8. copy(Context context, String content)
  9. copyText(Context context, String text)