Tuesday, 3 September 2013

Set the heater and the footer of the list view not clickable

One of the good implementation of the list view in Android is the possibility to add header (and footer), which are a new view that could be based another layout file.

The problem is by default they are clickables, which could not be desired. To disable them, the follow method should be used.

listView.addHeaderView(View v, Object data, boolean isSelectionable)

listView.addFooterView(View v, Object data, boolean isSelectionable)

For most of the cases, data is null.

StackOverFlow - Android ListView Header Disable Click

For more information:
Android References - ListView

No comments:

Post a Comment