I want all the 'not available' item to be disabled i.e. the dropdown should stay intact when I click them.
I tried setting the convertView
clickable
false
, but that didn't help.
I want all the 'not available' item to be disabled i.e. the dropdown should stay intact when I click them.
I tried setting the convertView
clickable
false
, but that didn't help.
in your adapter's `getView()' method check
if (text.equals("not available")) {
convertView.setEnabled(false);
} else {
convertView.setEnabled(true);
}
override in your adapter
public boolean areAllItemsEnabled() {
return false;
}
public boolean isEnabled(int position) {
// return false if position == position you want to disable
}
check it here Android ListView child View setEnabled() and setClickable() do nothing