Not sure it is clear from this question title what I mean, so here are details.
What I'd like to achive is simple layout with two TextView controls aligned horizontally one after another. First TextView could probably contain several lines of text, second TextView will contain only 1 number.
Second TextView should always have widht as much as it is required to show its content, aligned to the right and height should be equal to height of first TextView so I can show data vertically centered. First TextView should take remaining space (for width) and stretch vertically as needed.
Example 1:
--------------------------------- |Small Text. 123| --------------------------------- Example 2:
--------------------------------- |Long Text starts here .... | |... continues here ....... 123| |... and finishes here .... | --------------------------------- LinearLayout with horizontal orientation is not good here since it places controls from left to right. While in this case I need first set wrap_content to second TextView and then fill_parent to first TextView.
Playing with RelativeLayout I also could not get described layout.
I could not use layout_weight approach here since I do not know length of data in second TextView: in one case it could be 1 character, in another - 8 characters. So in 1 character case I will have unused space.
So, do I have chance to build such layout?