2013-04-03 19 views
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" 
    /> 

有什麼辦法可以使整個組的選擇,而不是單獨?謝謝,羅斯。

回答

0

你可以把它們放入LinearLayout並設置一個點擊方法,當用戶點擊任何一個時,他們實際上點擊他們所在的佈局,並給出他們是整個組的印象。

相關問題