I am using a ListView inside of a GridView but I want to disable the onClick handler of the ListView.
How can I do this?
I am using a ListView inside of a GridView but I want to disable the onClick handler of the ListView.
How can I do this?
check this answer disable click
@Override
public boolean isEnabled(int position) {
return false;
}
@Override
public boolean areAllItemsEnabled() {
return false;
}
You can call setClickable like this:
setClickable(false)
on your ListView object to prevent it responding to click events.
Yo can try to create your subclass of ArrayAdapter with the funcion AreAllItemsEnabled() andd return false.
Hope this helps
Please try adding android:clickable="false"
to your ListView
.
Try to type this in layout XML file:
android:scrollbars="none"