prabu prabu - 15 days ago 8
Android Question

How to disable the particular list item in list-view in android?

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 item should not be select-able again.
How to do this?

Suggestions please

Thanks for your precious time!..

Answer

try using this code in setOnItemClicklistener()

if(listview.getChildAt(selectedPosition).isEnabled())
{
    listview.getChildAt(selectedPosition).setEnabled(false);
}