Así que tengo el siguiente código en el adaptador:Android - Desactivar elemento Listview clic y volver a habilitarlo
@Override
public boolean isEnabled(int position)
{
GeneralItem item = super.getItem(position);
boolean retVal = true;
if (item != null)
{
if (currSection != some_condition)
retVal = !(item.shouldBeDisabled());
}
return retVal;
}
public boolean areAllItemsEnabled()
{
return false;
}
La pregunta aquí: Así que si he deshabilitado mi artículo durante la unión inicial, ahora provocar el evento en la pantalla y necesita habilitarlos a todos sin importar nada. ¿Vuelvo a vincularlo nuevamente después de que se realiza esa acción?
por ejemplo:
onCreate{
// create and bind to adapter
// this will disable items at certain positions
}
onSomeClick{
I need the same listview with same items available for click no matter what the conditions of positions are, so I need them all enabled. What actions should I call on the adapter?
}
El problema es que puedo tener una muy larga vista de lista también. Supone soportar 6000 artículos. Así que volver a enlazarlo ciertamente no es una opción.
Gracias,
sí, así es exactamente como lo resolví :) ¡excelente respuesta, gracias! – dropsOfJupiter