'How to make dynamic height based on text size?

I want to create custom view which looks like this: enter image description here

I can set the height of the container, but in this case it won't adjust when the text is resized. So, I have to use wrapContentHeight(), but in this case I don't know how to set the height of the first four boxes so that their height is the same as the last one.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source