Monday, May 13, 2013

[android help] how to disable longclick for listview in android

how to disable longclick for listview in android - Stack Overflow








Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















I want to disable the response to click and long click on items for a listview in android. I have set isEnabled(int position) of the adapter to return false, so that the cells in the listview does not response to click operation, but they still respond to long click operations(that is, they are highlighted when long clicked). the question is, what can I do to make the cells not highlighted when they are long clicked. Thank you.





























Set any background for your list item main layout.























Try setClickable instead of setEnabled




















default







.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...