Android EditText without Line Break
Question by Guest | 2013-09-23 at 14:06
In my XML layout for an Android app, I have set a button next to an EditText control. With the button, you can handle the content of the EditText field.
Sometimes, the content of the EditText field is about 2 or 3 characters longer than it is possible limited through its width. That would not be so bad, but in this moment, the EditText field extends down in an ugly way and the text is displayed with a line break, destroying my whole layout.
What can I do, that this transition does not occur and the text still remains in a single-line in the EditText, even if the field is not long enough for the text?
Related Topics
MySQL: Line Breaks in MySQL
Tip | 0 Comments
Android Splash Screen Tutorial
Tutorial | 0 Comments
Rewrite Text Files with a fixed Line Length
Tutorial | 0 Comments
Android Table Layout with columns of equal width
Tutorial | 0 Comments
Repair Text Files with mixed Line Breaks
Tutorial | 0 Comments
How to Replace multiple Texts at the same Time
Tutorial | 0 Comments
Android Getting Sound Levels
Open Question | 1 Answer
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
Just add the line android:singleLine="true" to the properties of the field:
This makes the text staying in a row and it is no longer breaking.
2013-09-24 at 18:27