Android Question Label width same as text width

Fotios Georgiadis

Member
Licensed User
Longtime User
Hello!

I have two labels (different colored text) and i need the first label's width to be the exact size of the word, so the second label can begin right next to it.

Is there a way for the label to be the exact width of the word?

Thank you in advance!
 

Fotios Georgiadis

Member
Licensed User
Longtime User
What are you trying to do? Maybe there are simpler / better ways.

I have two labels (first color text:white, second color text:green). Both of the labels get data from my database (so, they have variable width and text length too).
I need to find the perfect width for the first label, because the second label begins right next to it.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…