focusable row inside table android
Posted
by
Nikitas
on Stack Overflow
See other posts from Stack Overflow
or by Nikitas
Published on 2011-02-02T10:56:43Z
Indexed on
2011/03/16
0:10 UTC
Read the original article
Hit count: 407
Hello guys, i have in xml a ScrollView which includes one TableLayout. My question is if it's possible to have a focusable row every time i click on it. Here is my xml code:
<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>
I have already tried the "focusable="true"" and "focusableInTouchMode="true"" but nothing happened..
thanks in advance
© Stack Overflow or respective owner