Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Remove Enter Key from softkeyboard

In my login form when user clicks on an EditText and presses the enter key, this inserts a new line, therefore increasing the EditText's size. Next moment, it returns to its previous place and prints a dot in the password field (which is the next field).

I want to remove this enter key from the softkeyboard. Is it possible?

like image 283
Jay Mayu Avatar asked Aug 09 '11 04:08

Jay Mayu


2 Answers

Use : android:singleLine = "true" or edittext.setSingleLine();

And your ENTER key is gone

like image 143
mDroidd Avatar answered Oct 21 '22 19:10

mDroidd


add this tag to textView in xml

    android:singleLine = "true"
like image 34
ngesh Avatar answered Oct 21 '22 19:10

ngesh