android - Layout with two TextViews -
i'm trying design layout 2 textviews:
| | | (multilined textview) (60dp textview) | | (of unknown size ) |
if first textview has little text, should this:
| | | (hello!) (12:34:56) | | |
if first textview has many text, should this:
| | | (ey! very very long) (12:34:56) | | (message. ) |
somebody knows how achieve this?
thank much.
edit: got working. solution in own answer.
try this:
<relativelayout android:layout_width="match_parent" android:layout_height="wrap_content" > <textview android:id="@+id/text_1" android:layout_width="wrap_content" android:padding_right = 'fix value of width of textview text 2' android:layout_height="wrap_content" android:layout_alignparentleft="true" android:gravity="left" /> <textview android:id="@+id/text_2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_torightof="@+id/text_1" android:gravity="center" /> </relativelayout>
Comments
Post a Comment