I have a use case when it's needed only a part of text to be clickable and different color,on some screens my text have to be written in 2 lines as:
Using this code:
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageButton
android:id="@+id/btn_accept_terms"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/selected" />
<TextView
android:id="@+id/terms1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/btn_accept_terms"
android:text="@string/txt_terms" />
<TextView
android:id="@+id/terms2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/terms1"
android:text="@string/txt_terms_hyperlink"
android:textColor="@color/colorAccent"
android:textStyle="italic"/>
</RelativeLayout>
How can I achieve expected behavior?