samedi 5 mars 2022

Why some Accessibility Services in Android trigger random onItemClick events on spinners despite on setSelection animate: false?

we've been having this issue in our app for some time and after a long search the only thing I found is this commentary saying that this is expected behavior: https://stackoverflow.com/a/17125287/18272600

Unfortunately it was not marked as the main solution, and it also doesn't explain the why of this

I am asking in part out of curiosity and in part to make this topic visible I couldn't get a hint about this on Android documentation (I'm not saying that there isn't any, just I couldn't find it), at least not in spinner docs

In particular, in my case, CAPABILITY_CAN_RETRIEVE_WINDOW_CONTENT was the enabled capability that was causing troubles

I ended up creating a class to check if there are any accessibility services enabled and then asking for deactivation

So, if anyone could clarify why this is normal behavior and/or post a link to android documentation where it is explained why this happens, it would be great

Thanks a lot!




Aucun commentaire:

Enregistrer un commentaire