I've been struggling with this problem in layout for sometime now. To make things simpler, I've a screenshot.
I want to right align that textview which has content "3 hours ago" to the right. For this TextView I've layout_below property set to the Linearlayout above(contains two textviews which has contents 36.90 & deg celius as in the picture).
I tried android:layout_alignRight="@+id/rl1", It aligns the textview to the right. But when the content of hours ago TextView is bigger than that above, It get clipped off().
Someone, Please help me.
Here's code( not the whole code). just the part on the right side
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:id="@+id/rl1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/subVitalValueTextView"
android:gravity="center_vertical"
android:text="5.05"
android:textSize="22dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/subVitalUnitTextView"
android:text="feet"
android:paddingLeft="5dp"/>
</LinearLayout>
<TextView
android:layout_marginTop="-6dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/subVitalTimeAgoTextView"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="5 hours ago"
android:fontFamily="sans-serif-thin"
android:layout_below="@+id/rl1"/>
</RelativeLayout>