Click here to Skip to main content
15,795,791 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi this is my activity
protected void onCreate(Bundle savedInstanceState) {
        et =(EditText)findViewById(;
        btnz =(Button)findViewById(;
        btncopy =(Button)findViewById(;
        tv =(TextView)findViewById(;
        btnz.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                String name =et.getText().toString();
                Typeface myfont=Typeface.createFromAsset(getAssets(), "ComialUnicoder.ttf");

        btncopy.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
                ClipData clip = ClipData.newPlainText("ComialUnicoder.ttf",tv.getText());



when click to btnc copy in text view but without font
i want when click to btnc copy text with font
what is solution?

What I have tried:

search in internet?search in internet?search in internet?
Updated 24-Jul-16 3:58am

1 solution

You need to save all information relating to the item that you are putting on the clipboard. This is described in the section titled "Implementing Copy or Drag" at ClipData | Android Developers[^].
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900