Android Clipboard Copy copy(Context context, String content)

Here you can find the source of copy(Context context, String content)

Description

copy

Declaration

public static void copy(Context context, String content) 

Method Source Code

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

public class Main {

    public static void copy(Context context, String content) {
        ClipboardManager cmb = (ClipboardManager) context
                .getSystemService(Context.CLIPBOARD_SERVICE);
        cmb.setText(content.trim());//  www. j ava2  s .  c o  m
    }
}

Related

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