android - deshabilita el clic del elemento Listview y vuelve a habilitarlo
Así que tengo el siguiente código en el adaptador:
@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í: Entonces, si desactivé mi elemento durante el enlace inicial, ahora levanto el evento en la pantalla y necesito habilitarlos a todos sin importar qué. ¿Lo vuelvo a vincular todo después de realizar 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 también puedo tener una vista de lista muy larga. Supone soportar 6000 artículos. Por lo tanto, volver a vincularlo ciertamente no es una opción.
Gracias