accepting click events in RelativeLayout

Posted by skooter on Stack Overflow See other posts from Stack Overflow or by skooter
Published on 2010-06-01T11:11:00Z Indexed on 2010/06/01 11:13 UTC
Read the original article Hit count: 282

Filed under:
|
|
|
|

Ok,

I have a RelativeLayout with a few TextViews as children

<RelativeLayout
    android:id="@+id/shift_parent_name"
    android:layout_width="fill_parent"
    android:layout_weight="0.25"
    >
    <TextView
        android:id="@+id/shift_parent_nametitle"
        android:text="@string/shift_parent_nametitle"
        style="@style/header_text"
        />
    <TextView
        android:id="@+id/shift_parent_namefield"
        android:layout_alignParentRight="true"
        android:layout_below="@id/shift_parent_nametitle"
        style="@style/wrap"
        />

How do I go about using the RelativeLayout as the button to react to a click event if any part of the area is pressed?

© Stack Overflow or respective owner

Related posts about android

Related posts about event