I am creating an Android application where part of it consists of storing contacts in groups. In the image below you can see the group "CEOs" and the group members that belong to it.
However, I would like to not show this whole text, but only the part that can fit on the line (without creating a newline). So, in this case everything after "Mark" would have to be deleted.
I am struggling to find a way to make this relative. At first I hard-coded that the text should be deleted after 28 characters, but this is obviously not a good solution.
When I tried to split the text on the newline and delete the last part, this did not work either, as apparently the newline I see on the layout is not "recorded" in the checkbox text.
Does anyone have an idea on how to solve this?
Aucun commentaire:
Enregistrer un commentaire