Android Clipboard Copy copyText(Context context, String text)

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

Description

copy Text

Declaration

@SuppressWarnings("deprecation")
    public static void copyText(Context context, String text) 

Method Source Code

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

public class Main {
    @SuppressWarnings("deprecation")
    public static void copyText(Context context, String text) {
        android.text.ClipboardManager cm = (android.text.ClipboardManager) context
                .getSystemService(Context.CLIPBOARD_SERVICE);
        cm.setText(text);// w ww .j a  va 2s .  co m
    }
}

Related

  1. set(Context context, String value)
  2. setClipboard(Context context, String text)
  3. setText(final Context context, final CharSequence text)
  4. setText(final Context context, final CharSequence text)
  5. copy(Context context, String content)
  6. copyText(Context context, String text)
  7. copyText(Context context, String text)