xmlには1つのTableLayoutを含むScrollViewがあります。 私はそれをクリックするたびにフォーカス可能な行を持つことが可能かどうかです。 ...事前にテーブル内のフォーカス可能な行
おかげ
<ScrollView
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TableLayout
android:id="@+id/table2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TableRow>
<RelativeLayout
android:id="@+id/rowlayout"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:background="@drawable/rowbackground2" >
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_code_contact"
android:padding="7dip"
android:layout_alignParentLeft="true" />
<TextView
android:id="@+id/contacts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="Contacts"
android:textColor="#000"
android:textSize="18dip"
android:layout_toRightOf="@id/icon"
android:paddingTop="10dip" />
</RelativeLayout>
</TableRow>
<TableRow>
<Button
android:id="@+id/contacts_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/contact_button" />
</TableRow>
は、私はすでに "フォーカス可能=" "真" と "focusableInTouchMode =" true "を" しかし、何事もなかっ試してみました: はここに私のXMLコードであります
私はすでにあなたが行IDについて言ったことを行っているが、それはうまくいきませんでした。.. 私の問題は、それがクリックされていますときに私は行がフォーカス可能にすることができないということです// – Nikitas
、私はわかりませんよあなたはfucusableを意味しますか、それはそれが選択されていることを示すべきであることを意味しますか?行内に相対レイアウトがあるため、クリックすると他のビューにフォーカスが当てられることがあります。おそらく、他の内部ビューはクリック可能であるためにfalseになるはずです... – Lumis