I'm doing some AsyncTask
work after user clicks an item in my ListView
. I'd like to disable the item so it can't be clicked twice. I've simplified the click listener to contain only this method, but it still doesn't do anything for me, the view looks the same and it lets itself be happily clicked again, much to my annoyance.
public void onItemClick(AdapterView<?> parent, View clickedView,
int position, long id) {
item = (Episode) parent.getItemAtPosition(position);
clickedView.setClickable(false);
clickedView.setEnabled(false);
clickedView.invalidate();
}
My View for each row is a custom LinearLayout
with two TextView
s.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…