When I set EditText in readonly mode, the Font color and its background become almost unable to read. Pls, see the pic

[![enter image description here](https://i.stack.imgur.com/pF93C.png)](https://i.stack.imgur.com/pF93C.png)

Question: how to keep its appearance the same in ReadOnly mode from code?
=========================================================================

UPDATE: Thank you for your help.. I published my solution.. I forgot to mention "FROM CODE"

```
EditText ed = new EditText(this);
ed.setId(myId);
ed.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, 0));
ed.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_MULTI_LINE);
ed.setText(myText);

int[][] states = new int[][] { new int[] { android.R.attr.state_enabled}, new int[] {-android.R.attr.state_enabled} };
int[] colors = new int[] { Color.BLACK, Color.BLACK };
ColorStateList myList = new ColorStateList(states, colors);
ed.setTextColor(myList);
ed.setEnabled(false);

```