Select to view content in your preferred language

android: editable is deprecated: Use an <Edit Text> to make it editable

19116
1
05-21-2014 11:29 PM
ArcGISG_I_S
Deactivated User
Hi,

I am trying to run a Draw Graphic Element sample in android and i am facing this error : android: editable is deprecated: Use an <Edit Text> to make it editable 

<TextView android:id="@+id/label"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:maxLength="25"
    android:singleLine="false" 
    android:editable="false"
    android:gravity="center_horizontal"/>


The error is in the underline line.
Any help please 😞
0 Kudos
1 Reply
cadgism
Regular Contributor
Hi,

I am trying to run a Draw Graphic Element sample in android and i am facing this error : android: editable is deprecated: Use an <Edit Text> to make it editable 

<TextView android:id="@+id/label"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:maxLength="25"
    android:singleLine="false" 
    android:editable="false"
    android:gravity="center_horizontal"/>


The error is in the underline line.
Any help please 😞


Yes it is. You can use android:inputType="none".

OR in the code ,

EditText myEditText = (EditText) findViewById(R.id.yourid);
myEditText .setEnabled(false);


Hope this helps.
0 Kudos