Hello,
In an Android application I have a ListActivity. After creating it I have a broadcast receiver which has to disable some items in the list. So I have a pice of code ike this one:
View child = getListView().getChildAt(i);
child.setEnabled(false);
It works in the way it changes the color of the disabled views to gray. But I need to avoid this items can be clicked. So I've tried to call
child.setFocusable(false);
or
child.setClickable(false);
but in both cases onListItemClick is called after pressing on a disabled option.
How can I avoid that onListItemClick method is called when these textviews are clicked?
Thanks.