ListView touch mode click on child views

by Xavier » Sat, 16 Jan 2010 02:07:16 GMT

Sponsored Links

This is driving me nuts. I have a ListView that uses an extended
ArrayAdapter<T>. Each row "cell.xml" contains a RelativeLayout and
within a few TextViews and ImageViews.

I have declared in the list xml definition a selector to change the
row background:

<item name="android:listSelector">@drawable/list_selector_background</

It works. But only if the click (touch mode) not done over any of the
elements contained in the RelativeLayout. Any click outside this
elements will (correctly) trigger the selector. I have tried using
android:focusable="false" on each child view without avail.

What do I need to do to be able to trigger the selector, no matter
where the user clicks?


ListView touch mode click on child views

by Zsolt Vasvari » Sat, 16 Jan 2010 09:07:06 GMT

 Have you tried setting focusable="true" on the entire View the makes
up the list item?

> Thanks!

Sponsored Links

Other Threads

1. Android - $50 Bounty for selection in WebView.

We are offering a $ 50 bounty to the first person, who is able to do
the following:

* Create a webview, 2 text fields (x and y) and a button.

* On click of that button, use some API call to:

- Select the contents of some text at specified coordinates (x,y to
for example x+100, y+20).
- Copy the contents to the clipboard.

The functionality is exactly the same as those used by the Browser,
when Menu->More->Select is chosen.

The bounty will be paid via PayPal after successful completion of the
task. This means that the program is running successfully on our
phones or emulators and the source code was verified.

Please send files to This is also and
opportunity to qualify for integration into a development team for a
compelling product. The code will be analyzed as well as your



2. No sound when press too much

Hi all, I have a button that will trigger a sound when pressed
however, when I press the button many times in a short while
there will be no sound emitted.
How can it emit sound even I press many times on a button?
I create the sound effect by MediaPlayer.create(mcontext,


3. screen display issue after slider open/close

4. Deciding which method to call when intent is received

5. Serious android app problem in Canada

6. All For Porters --Help me port Dark Nova to Andriod

7. How can scroll GridView's item by other events(not touch event)