1

2 つのテキスト ビュー (TV_1、TV_2) があります。TV_2 を TV_1 のすぐ右に設定したいと思います。その意味は

  1. TV1 が画面内の 1 行全体を占めると仮定すると、TV2 は TV1 の下に設定されます。
  2. Tv1 が 1.5 ラインを占有し、tv2 が残りのスペースを占有するとします。これを実装する方法は?試しましたが、取得できません。1つの段落に似ています。

ここに画像の説明を入力

    <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>    
4

2 に答える 2

2

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

enter image description here

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

于 2012-05-21T11:43:22.530 に答える
1

あなたが求めたパターンでは不可能だと思います。

于 2012-05-21T11:54:29.780 に答える