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!
 
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
Why don't you use CSBuilder for this?

SS-2017-02-15_14.46.12.png


https://www.b4x.com/android/forum/threads/charsequence-csbuilder-tutorial.76226/#content

BBLabel is another option:
firefox_NvpDr03d9o.png


https://www.b4x.com/android/forum/t...-bbcode-parser-rich-text-view.106207/#content
 
Upvote 0
Back
Top