android:clickable = true makes layout not clickable?

by dxw_es » Sat, 10 Jul 2010 02:01:19 GMT


Sponsored Links
 Hey everyone..... I noticed something odd. I have a listview with
custom BaseAdapter, and getView() inflates a layout. On 1.6 SDK (I've
been developing on a G1), if I set android:clickable="true" on the
layout, then the item is NOT clickable (but otherwise the item is
clickable). Is this the correct behavior? It seems backwards to me.

Furthermore, no matter now matter how i set android:clickable for the
same layouts using 2.2 SDK (run using emulator), the layout always is
clickable... eh? I'm really bothered by this.

--



android:clickable = true makes layout not clickable?

by Matt » Sat, 10 Jul 2010 04:58:33 GMT


 How do you know it isn't clickable?  Did you try adding an onClick
listener?

Just because a view is clickable, does NOT mean it will change
background colors when clicked.  You have to use <state> to change the
backgrounds when something is focused, pressed, etc.

-Matt




--


Sponsored Links


Other Threads

1. How can I start the ADB Deamon programatically ???

I want to communicate with the ADB Deamon service on device for get
some special data without using ADB server on development machine
(suggest that my application running on device and do not know about
ABD tools, except deamon). Can anyone show me how to do this ??? How
to start the deamon service ? what is its provided function/command ???

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

2. Focusing the spinner object

Hi,
     When components like TextViews got focus we can focus them using
highlighting the border of the component.Like that how can we
highlight the border of a spinner object when it got focus?.U can
highlight borders of each and every item in the spinner at the time of
selection.
   What I need is to highlight the border of spinner object when it
got focus initially.I went through xml attributes and couldnt find
matching one.Let me know if u have any clue to do this.

Thanks & Regards,
Isuru

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

3. how do real-time monitor the state of SD card

4. Video Decoding Memory buffer

5. Kernels fail to boot on Rogers HTC Dream, but works on other Dream platforms (ADP1, T-Mo G1)

6. Couldn't get connection factory client

7. Multiple data for an intent