views:

18

answers:

1

Hi,

I'm making a image gallery with infinite vertical and horizontal scrolling. I put images inside a ListView to make a column, and put the ListViews inside a TableRow. However, it seems that child views of TableRow is not selectable and as a result I can't select the images in my ListView (easily). Is there a way to pass the events down to child views of TableRow so they can be selectable?

+1  A: 

Did you try setting focusable = true on each of the images you want selectable?

Mayra
I just briefly tried but it didn't seem to work. I'm sorry I don't quite understand why they have to take focus to be selected? In a ListView, wouldn't a click event enough to select an item?
Rachel Z
Basically if a view isn't focusable, then you can't select it, and thus can't click it. Are you adding click listeners directly to the images, or to trying to listen to the onItemClick of the listView?
Mayra
I was trying to listen to the onItemClick. But it doesn't seem to be catching that event.
Rachel Z
Ok, you might have a conflict between the ListView and the TableView in terms of which one is clickable/focusable. If the only thing in the square is the ImageView, you might be better off making that clickable instead.
Mayra