0

我有一个生成文本视图列表的 XML 页面。我必须让它们单独使用,否则将无法正常工作。他们来了:

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/name_of_var_code"
        android:typeface="monospace" 
        android:textSize="16sp"
        android:textIsSelectable="true"
    />

    <TextView 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/equals"
        android:typeface="monospace" 
        android:textSize="16sp"
        android:textIsSelectable="true"
    />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/val_of_var_code"
        android:typeface="monospace" 
        android:textSize="16sp"
        android:textIsSelectable="true"
    />

有没有办法让整个组而不是单独选择?谢谢,罗斯。

4

1 回答 1

0

您可以将它们放在 a 中LinearLayout并设置一个 click 方法,当用户点击其中任何一个时,他们实际上是点击了他们所在的布局并给人一种他们是一个整体的印象。

于 2013-11-27T12:16:27.400 回答