Reputation: 10392
I have two text views(TV_1,TV_2).I want to set the TV_2 is immediate right of the TV_1. It means
<RelativeLayout
android:id="@+id/xrays_dicom_alert_TnC"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_marginTop="20dp">
<CheckBox
android:id="@+id/xrays_dicom_alert_cb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"/>
<TextView
android:id="@+id/xrays_dicom_alert_TnC_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/xrays_dicom_alert_cb"
android:text="I have read I agree to the following"
android:textColor="@color/black"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/xrays_dicom_alert_statement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/xrays_dicom_alert_cb"
android:layout_below="@id/xrays_dicom_alert_TnC_text"
android:layout_alignRight="@id/xrays_dicom_alert_TnC_text"
android:text="Statement"
android:textColor="@color/black"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>
Upvotes: 1
Views: 1578
Reputation: 42016
Thats impossible act in Android.
A View occupies a rectangular area on the screen.
http://www.androidadb.com/class/android/view/View.java.html
Or you have to do something like this
To make clickable some text in TextView one can go with Spannable concept. http://developer.android.com/reference/android/text/Spannable.html
use URLSpan
http://www.androidadb.com/class/ur/URLSpan.html
Upvotes: 2