I want to use a Master-Detail-Flow with a GridView on the left (master) side.
According to the documentation, GridView
has a method setItemChecked(position, value)
that was added in API level 1. Eclipse however states that the method requires API level 11.
Which one is true? If I want to have checked items in my GridView, do I need to implement the logic (with background changes etc) myelf?
From my experience, the official documentation is wrong.
AbsListView.setItemChecked(position, value)
only exists from HoneyComb (API 11) onwards. What makes it confusing is that ListView.setItemChecked(position, value)
did exist from API 1 while GridView.setItemChecked(position, value)
didn't. I think it was just bad API design that was fixed in API 11.
Maybe it's due to a limitation in the documentation generator because the method was moved up the inheritance chain to AbsListView
in API 11. The method in AbsListView
should be marked as Added in API level 11
while the method in ListView
should be marked as Added in API level 1
.
I haven't used it but someone has created a GridViewCompat
to fix this issue.
https://github.com/paramvir-b/AndroidGridViewCompatLib
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With