My java code need to access a @hide member defined in ViewTreeObserver.java. this hidden member is stable from very old release of android to the last 25, so i don't think it's too much risky (but i don't know, anyway i have no other choice). I can use reflection but it's seam a little over complicated.
i was thinking to add to my jar a dumy ViewTreeObserver.java removing the @hide from the code and compile my app like this. it's seam to work, when i call the hidden member, it's not the code in my dumy java that is executed but the code of android but i don't know if it's a good way because it's look too much easy.
other idea is to create a dumy jar with the dumy ViewTreeObserver.java, in this way i can compile my jar and can deploy it.
so what is the proper way (if their is one) to access @hide member ?
Aucun commentaire:
Enregistrer un commentaire