Deprecated: How to Set EditText to One Horizontally Scrolling Line, with finger
Deprecated in API Level 3, added in API Level 1Use scrollHoriztonally instead for an EditText.
Constrains the text to a single horizontally scrolling line instead of letting it wrap onto multiple lines, and advances focus instead of inserting a newline when you press the enter key.
1. Create an Android project, if you don't already have one.
3. In the main.xml file, add the code below.
...
android:singleLine = "true"
/>
4. Compile and run!
Related Articles:
Resources:
http://developer.android.com/reference/android/R.attr.html#singleLine