-3

groupViewにはラジオボタンがほとんどなく、すべてのラジオボタンに独自のテキストがあります。このテキストに複数の行がある場合、このテキストのラジオボタンはテキストの中央に揃えられますが、ラジオボタンをテキストの上部に揃えたいと思います。

私の目的:-

私は持っています:

   | text line 1

RB | text line 2

   | text line 3

が欲しいです:

     RB    
 | text line 1

 | text line 2

 | text line 3

テキストを設定するには、rb.setText(text);を使用します。

4

1 に答える 1

1

あなたはこの方法を試すことができます:

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" >

    <RadioButton
        android:id="@+id/rb1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

    <TextView
        android:id="@+id/tv1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/test_text" />
</LinearLayout>
于 2013-03-26T11:51:50.140 に答える