I was thinking of the Instagram comment card layout. The layout bounds are shown as the below,
In the purplish block, two TextViews are aligned as a single one, both are clickable as separate. One navigates to user's page and the other selects the comment card. How is it possible? I can only think of it as a LinearLayout/RelativeLayout with two textviews, how can we get it look and behave like this?
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="60dp"
android:layout_marginBottom="20dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="\@someusername"
android:id="@+id/comment_username"
android:layout_marginLeft="15dp"
android:textSize="18sp"
android:textStyle="bold"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "
android:layout_marginLeft="5dp"
android:textSize="18sp"
android:layout_toRightOf="@+id/comment_username"
android:id="@+id/comment"/>
</RelativeLayout>
which is rendered as the pic below,
How do Instagram make the layout looks like the above pic?