How to disable the particular list item in list-view in android? I mean if once i selected any one of item from a list-view,that item suppose to be disabled which means that ite
When you pass a list of data elements to BaseAdapter
, add a field in this list's element class called isEnabled
and set it to true
/false
as needed, then override isEnabled
method of BaseAdapter
like this:
@Override
public boolean isEnabled(int position) {
return list.get(position).isEnabled;
}
where list
is your list of data element objects.