views:

124

answers:

1

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?

+1  A: 

Just add a OnClickListener to your RelativeLayout

Roflcoptr
yeah I did that and the listener doesn't seem to be firing...I feel like such a nub. I forgot to change the onClick to react to the id's...Next question: why doesn't the view's background colourise?
skooter
hmm why it should color? do you have code for that?
Roflcoptr