I\'m trying to disable multiple click events on listview, say after pressing first click some media gets played from webservice, while it gets played, other items need to be
create Adapter for that list, and there override this method
public boolean isEnabled(int position);
then return false
when you want to disable the click
If what you want is just to diable items being clickable and show the appropriate selector color just use the line
android:listSelector="@android:color/transparent"
in you listview in the layout file(xml)
Manage Click event using flags.
While your media player is running set click to false by using this method.
setClickable(false);
When your media player is stop or not running or on complete set that flag to default value.
setClickable(true);
listView.getChildAt(position).setEnabled(false);
listView.getChildAt(position).setClickable(false);
the above said answers didn't worked for me, so I used list.setEnabled(false)
Its worked for me
In your custom ArrayAdapter overide isEnabled method as following
@Override
public boolean isEnabled(int position) {
return false;
}