Setting clickable on individual ListView's ChildViews

by chiizuf...@googlemail.com » Wed, 04 Mar 2009 23:50:16 GMT


Sponsored Links
 Hi,

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
work.

I've tried:

textView.setClickable(false);
textView.setFocusable(false);
textView.setFocusableInTouchMode(false);
textView.setLinksClickable(false);
textView.setLongClickable(false);
parent.setClickable(false);
parent.setFocusable(false);
parent.setFocusableInTouchMode(false);
parent.setLongClickable(false);

but none of them have any effect.

The issue at
 http://code.google.com/p/android/issues/detail?id=625& ;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 chiizuf...@googlemail.com » 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 chiizuf...@googlemail.com » 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, "chiizuf...@googlemail.com"




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Android On Nokia N95

Hi to all
 I'm newcomer to android.Can any one tell me how to install Android on
nokia N 95.
Please send me link from where i can download setup SIS file for N95.

--~--~---------~--~----~------------~-------~--~----~

2. Loading Froyo onto ADP2

Hi,

We have an ADP2 running Android 1.6.  We're trying to update this to
2.2. We can build what we beleive is the image for the phone as
follows.

repo init -u git://android.git.kernel.org/platform/manifest.git -b
android-2.2_r1.1

repo sync

edit device/htc/sapphire/board-info.txt
-require version-baseband=2.22.26.07
+require version-baseband=2.22.19.26I

mark@ubuntu:~/adp2$ . build/envsetup.sh
including device/htc/dream/vendorsetup.sh
including device/htc/passion/vendorsetup.sh
including device/htc/sapphire/vendorsetup.sh
mark@ubuntu:~/adp2$

lunch full_sapphire-userdebug
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.2
TARGET_PRODUCT=full_sapphire
TARGET_BUILD_VARIANT=userdebug
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=FRF91
============================================

make clean

make

This gives us a system.img in ~/adp2/out/target/product/sapphire, its
roughly 52MB in size.

to upgrade the phone we do
adb reboot-bootloader
fastboot flash system system.img
fastboot reboot

The phone starts to boot and we see an Android screen but nothing
further.

Any ideas what we are doing incorrectly?

Thanks

Mark





-- 

3. USB host issue on i.MX51: cannot recognize USB Mass Storage Device

4. How to build and flash the images in HTC HERO G2.

5. imports not working with Android libraries

6. Set Options Menu Position Programmatically?

7. [WTA] Motorola Droid gak bisa nelpon