views:

423

answers:

2

Hi all,

Is it possiable to give Focus on listitem chile views , what i need is i have an custom list view , i creating each row using linear layout with two views like button and textview, now i want to get that button click event and have to change the background color while focusing is it possiable?

A: 

Wow, that was hard to read. You should edit the question and try to explain yourself better.

To enable a click listener on those buttons you must add the listener inside the getView() method of the adapter. If you are using the View Holder Pattern

holder.button.setOnClickListener(...)

and then access the parent or whatever to change the background.

If you don't know what I'm talking about with that holder thing, watch this video, it's at the beginning.

Good luck!

Maragues
A: 

From what I could decipher from your question this might be what you need.

Don't quote your own sentences. Also reading what you have typed, before clicking Post would save a lot of effort spent in understanding the question.

primalpop