0

I have a multi lines editText:

    <EditText
              android:id="@+id/et1" 
              android:imeOptions="actionDone"
              android:layout_width="300sp"
              android:layout_height="90sp"
              android:layout_marginTop="5dp"
              android:layout_marginLeft="5dp"
              android:layout_marginBottom="5dp"
              android:background="@drawable/edittext_bg_white"
              android:ems="10"
              android:inputType="textMultiLine"
              android:lines="8"
              android:minLines="6"
              android:textSize="18sp"
              android:layout_gravity="left" 
              android:gravity="top|left"
              />
  1. I add a text of 4 lines inside the EditText.
  2. I double click on the text and the cut/copy/selectall bar shows.
  3. I click on the SELECT ALL Icon in the cut/copy/selectall bar.
  4. The bar dissapears (letting the activity more place), so now I can not copy/cut anything, and that's exactly the problem: I do want to copy what I have just selected.

I will appreciate any help.

1 Answers1

0

The code to add to your code:

android:textIsSelectable="true"

or

android:textIsSelectable="false"

Your Code :

<EditText
          android:id="@+id/et1" 
          android:imeOptions="actionDone"
          android:layout_width="300sp"
          android:layout_height="90sp"
          android:layout_marginTop="5dp"
          android:layout_marginLeft="5dp"
          android:layout_marginBottom="5dp"
          android:background="@drawable/edittext_bg_white"
          android:ems="10"
          android:inputType="textMultiLine"
          android:lines="8"
          android:minLines="6"
          android:textSize="18sp"
          android:layout_gravity="left" 
          android:gravity="top|left"
          android:textIsSelectable="true"/>

====================================

Probably good for you will be the link below: Action Bar Select All/Cut/Copy not showing for alert dialog

Community
  • 1
  • 1
Ali Aliasghar
  • 49
  • 1
  • 9
  • Not so good, because now I can not perform the first phase, which means I can not add any text to the editText (Now a click in the edittext will not make the soft keyboard to show). – user2746711 Jan 16 '16 at 11:36
  • What API level is the 2nd screen cap from? – Ali Aliasghar Jan 16 '16 at 13:32
  • Probably good for you will be the link below: http://stackoverflow.com/questions/22005126/action-bar-selet-all-cut-copy-not-showing-for-alert-dialog – Ali Aliasghar Jan 16 '16 at 14:00
  • Hi, thanks but it brings me to the same solution as you wrote before, so still...It doesn't let me enter text to the editText if I use android:textIsSelectable="true". – user2746711 Jan 18 '16 at 13:05