Deprecated: android:singleLine - Set a TextView to 1 Line with ellipsis(...) at end

Deprecated: How to Set a TextView to 1 Line with ellipsis(...) at end

added in API Level 1, Deprecated in API Level 3
Use android:lines or androidmaxLines instead.

Constrains the text to a single line instead of letting it wrap onto multiple lines. If text is longer than one line an ellipsis (...) will automatically be added to the end.

1. Add a TextView in your main.xml file.

2. In the main.xml file, add the code below.

  <TextView
        ...
       android:singleLine = "true"
  />

3. Compile and run!

Related Articles:
Resources: