I have a list view holding text views and when the text gets too big, it wraps and the item takes up two spaces. I am wondering if there is a way to turn off line wrap in this case, and if it should be done in the textview or the listview.
Set android:singleLine
attribute in TextView to true
This is just a clarification (I don't have the reputation points to comment yet).
The XML item upon which you need to set the android:singleLine
attribute is the one used for each individual item, not the ListView node (which doesn't support the android:singleLine
attribute.
The individual item TextView is the one that you'd pass to the ArrayAdapter constructor used for the ListView.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With