Last active
April 9, 2017 06:40
-
-
Save gpetuhov/1c8151618413f6aea4137fe0fa7d6482 to your computer and use it in GitHub Desktop.
Android TextView limit text to one line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add to TextView tag in the layout XML file: | |
android:ellipsize="end" | |
android:maxLines="1" | |
This will limit number of lines to 1 and if text exceeds limit, TextView will display ... in the end of line. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment