How to set a TextView to display text in one line in Android June 4, 2023 by Tarik You should use android:maxLines="1" in your TextView tag. android:singleLine="true" is deprecated.