You can for example specify “middle” to have them appear in the middle of the text, thus showing the start and and of the text. ![]() It’s the singleLine attribute that does the trick, but by using the ellipsize attribute, you can also specify where you want the three periods to appear. This will not only look better, but also keep all list items at the same height. An app will send a notification to ask for permission. Text is now nicely cut off with an ellipsize … You can allow some apps to use various features on your phone, such as your camera or contacts list. If you change it by adding the ellipsize and singleLine attributes, the long text will wrap when it goes out of its boundaries: Your custom list item xml layout file may look like this: ![]() ![]() If you are using lists in your app, and some of the list items have too long text, making it wrap to several lines like item number three in the following image, then this trick will show you how to create better looking lists.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |