The problem is that you are using the android:ems
attribute, which sets an exact width to the TextView (measured in EMs).
This overrides android:layout_width="wrap_content"
, and thus the text in the EditText overflows.
I'm guessing what you actually wanted was to set the size of the text, which should be done using android:textSize
and SP units.