I have an EditText but I want only one line. I put lime this
- 1
android:maxLines="1" allows the text to be multiline but limits the height of edittext to display a single line.
If you want to disable the enter (new line) key, set the input type to text
android:inputType="text"
Or if you wanna use java you could do this:
edittext1.setSingleLine();
You can set the input type to textEmailSubject. I head the same issue and it solve it!
You may use
<EditText
......
android:imeOptions="actionNext" OR "actionDone" />