Skip to content Skip to sidebar Skip to footer

Listview: Disabling Clicking/focus

I added a header view to my ListView and it's working quite well, the problem I'm having right now is that I need to remove the default clicking/focus effect when I click the heade

Solution 1:

Of course you can do this! For header or footer views you can just call addHeaderView (View v, Object data, boolean isSelectable) or addFooterView (View v, Object data, boolean isSelectable) respectively with isSelectable == false.

For regular list items you may just return false for the boolean isEnabled (int position) method. :-)

Solution 2:

I solved this by just setting the onClickHandler for the header view to null...worked for me.

Post a Comment for "Listview: Disabling Clicking/focus"