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. how to verify whether an application is lauched or not

Hi All,

I have a basic question regarding how to verify whether an application
is lauched or not.

I am running monkey to test stability of phone. I also want to verify
through monkey or any other

tool whether a particular screen like contacts, messages is lauched or

How can I do that. Please suggest if you have any idea.


2. setContentView fails when creating a new activity

That looks like the content of the stack from the eclipse debug
perspective.  What's the actual exception/error?  If you resume the run
(perhaps more than once) the complete stack with error will eventually get
dumped to the log.  You can then view it in the logcat window (a tab in the
right pane of the debug perspective).


3. communication between android phone and pc using 3G network

4. OutOfMemory Error (Animation)

5. Getting "some" of the Android source

6. who can give a summary about the strong reference and weak reference in Android

7. Unable to start download in Browser