Hi folks,
I have an ImageView contained in a TableLayout within the "handle"
component of a SlidingDrawer and I'm trying to capture the click event
on the ImageView but it doesn't seem to be fired.
Obviously the SlidingDrawer is capturing the event to handle it
according to the rules governing its behavior, but I would have
expected the event to be populated down to all child views.. which it
doesn't seem to be.
I have a structure somewhat like this:
<SlidingDrawer
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/slider"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:handle="@+id/panelHandle"
android:content="@+id/panelContent"
android:allowSingleTap="false">
<TableLayout
android:layout_width="fill_parent"
android:layout_height="36dp"
android:stretchColumns="1"
android:id="@+id/panelHandle">
<TableRow>
<ImageView
android:id="@+id/slider_refresh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/refresh"
android:paddingRight="8dp"/>
</TableRow>
</TableLayout>
<LinearLayout
android:id="@+id/panelContent"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView
android:id="@+id/section_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:divider="#CCCCCC"
android:cacheColorHint="#00000000"
android:background="@color/white"
android:dividerHeight="1px" />
</LinearLayout>
</SlidingDrawer>
I'm wanting to capture the "onClick" event on the "slider_refresh"
view:
View sliderRefresh = findViewById(R.id.slider_refresh);
sliderRefresh.bringToFront();
sliderRefresh.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
LogSystem.getLogger().info("Refresh clicked");
}
});
But the event doesn't seem to be populated onto this view.
Anyone got any clue as to how I can capture this event?
Thanks
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en