views:

40

answers:

0

I have a listview that displays a list of items of a custom resource. I have everything working, I can click on the listitem and I can call a toast or whatever I want to do. But how do I make it so I can change the color of the view's background when the user touches the item? I've tried doing the following and it works for a click, I can change the background. But there's 2 problems.

v = vi.inflate(resource,null);
v.setClickable(true);
v.setOnClickListener(myListClicker);

First this consumes the click so my onItemClickListener doesn't get called, and second I don't have a touchevent or whatever to change it back on the mouseup.

I know there are similar questions, but they don't really address this specific case that I could find.