android - desative o clique no item do Listview e ative-o novamente
Então, tenho o seguinte código no 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;
}
A pergunta aqui: Então, se eu desabilitei meu item durante a ligação inicial, agora levanto o evento na tela e preciso habilitá-los todos, não importa o quê. Volto a ligar tudo depois que a ação é executada?
por exemplo
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?
}
O problema é que também posso ter uma lista muito longa. Supõe suportar 6000 itens. Portanto, religá-lo certamente não é uma opçã
Obrigado