I’m creating an app and i want the text to allign under a button, it looks like this:
so i want the large text starting on the left at(5dp) under the button and end at(155dp from the left) the end of the button. And if the text is too long to fit under the button, i don’t want it to go in the next line, i want it to cut of and put in “..” at the end so, that it looks like this f.e. “Large T..”, i photoshoped that picture real quick to show you what i mean:
I’m kind of new to xml and the whole ndroid app scene, so any help is appreciated 🙂
2
Answers
Use
LinearLayouts
withlayout_wight
. Example code below:Result will be:
In your TextView add these properties:
NOTE: You can adjust the ems size to how many chars you want to show.