Setting clickable on individual ListView's ChildViews

by » Wed, 04 Mar 2009 23:50:16 GMT

Sponsored Links

I'm in a situation where I have a ListView in which I want some of the
entries to be clickable and some not to be. Setting
listView.setClickable(false) disables clicks on everything even if
textView.setClickable(true) is set when the child view is being added
in my customised ArrayAdapter. Conversely, leaving clickableness of a
ListView at the default of true, textView.setClickable(false) doesn't

I've tried:


but none of them have any effect.

The issue at ;can=1&q=clickable&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary
notes that clicks don't go to the child view in a ListView. This being
the case, is it even possible to disable clicks for an individual
element which isn't a header?

Thanks =].


Setting clickable on individual ListView's ChildViews

by » Thu, 05 Mar 2009 18:40:33 GMT

 Thanks for your reply,

What do you mean by disable the items in my adapter?


Sponsored Links

Setting clickable on individual ListView's ChildViews

by » Fri, 06 Mar 2009 18:13:48 GMT

 Aha, figured it out. By overriding isEnabled in my adapter I can check
whether a certain position should be clickable or not.

Thanks! :D

Open source is fun... :D

On Mar 5, 10:40am, ""


Other Threads

1. problem download descriptor file (.dd)

Hi ! It's a very difficult problem ! I try to load a picture (.jpg) in
Nexus One Phone with a download descriptor file (.dd file). The Nexus
One don't reconize the dd file and just open it in the browser.

help me please !


2. How can I change focus of my Tab ???

I guys. I have a little problem :D. I have a application, which can't
change the focus. Can someone help me?


3. C2DM production issues

4. RFCOMM devices

5. pagesize

6. OpenJDK on Android

7. How to programmatically send SMS attachments?