5

I define Edittext inside xml layout but when i select text inside EditText default cut copy paste not appeare.

here my xml code

<EditText
    android:id="@+id/xEt"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center"
    android:ems="10"
    android:gravity="top"
    android:padding="15dp"
    android:singleLine="false"
    android:visibility="visible" /> 

my java code is:

    mEt = (EditText) findViewById(R.id.xEt);
    mEt.setTypeface(tf2);
    mEt.setTextColor(Color.BLACK);
    mEt.setTextSize(30);

enter image description here

Attaullah
  • 3,856
  • 3
  • 48
  • 63

1 Answers1

4

Set android:textIsSelectable="true" (API Level 11 and above) then look into the Clipboard manager in : Copy and Paste

Syed Osama Maruf
  • 1,895
  • 2
  • 20
  • 37
  • i try **[this link](http://stackoverflow.com/a/13004720/2387564)** for copy paste but how to use clipboard manger it crash my app. using this **[tutorial](http://www.tutorialspoint.com/android/android_clipboard.htm)** – Attaullah Sep 22 '15 at 07:44