I want to make a read-only EditText view. The XML to do this code seems to be android:editable=\"false\", but I want to do this in code.
EditText
android:editable=\"false\"
H
Use this code:
editText.setEnabled(false); editText.setTextColor(ContextCompat.getColor(context, R.color.black);
Disabling editText gives a read-only look and behavior but also changes the text-color to gray so setting its text color is needed.
editText
text-color