ListView: disabling clicking/focus

后端 未结 2 695
耶瑟儿~
耶瑟儿~ 2021-01-07 23:45

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

相关标签:
2条回答
  • 2021-01-08 00:00

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

    0 讨论(0)
  • 2021-01-08 00:12

    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. :-)

    0 讨论(0)
提交回复
热议问题