[Android] How to properly hide an annotation?!

Hey, hi.

So, I've been trying (with some success, actually) to hide annotations.

I have tried setting annotation's flags e_hidden and e_invisible to true (tried calling 'refreshAppearance' on it also) and it "works some times"

Also tried calling 'pdfView.hideAnnotation(ann)' and it also didn't work.

Anything I could try?

Thanks;

So, after some empiric testing, doing both “pdfView.hideAnnotation” then “pdfView.update(annotation, annotationPage)” seems to work.
Em segunda-feira, 17 de abril de 2017 14:36:35 UTC-3, Joao Guilherme escreveu:

Hey, hi.

So, I’ve been trying (with some success, actually) to hide annotations.

I have tried setting annotation’s flags e_hidden and e_invisible to true (tried calling ‘refreshAppearance’ on it also) and it “works some times”

Also tried calling ‘pdfView.hideAnnotation(ann)’ and it also didn’t work.

Anything I could try?

Thanks;

Thank you for the feedback. We will look to improve the documentation in a future release.

Please note that the Tools code that is included in the SDK, and which contains almost all of the user interaction logic, currently includes usage of hideAnnotation and subsequent call of update.

One reason it does not trigger immediate drawing, is in case you want to apply this to multiple annotations, in which case calling update every time is not ideal, and a single update call is better.

Understood, thanks for replying anyway.
As you said, the Tools code contains the logic needed for proper hiding/showing.
Thanks for the support
Em terça-feira, 18 de abril de 2017 17:31:11 UTC-3, Ryan escreveu:

Thank you for the feedback. We will look to improve the documentation in a future release.

Please note that the Tools code that is included in the SDK, and which contains almost all of the user interaction logic, currently includes usage of hideAnnotation and subsequent call of update.

One reason it does not trigger immediate drawing, is in case you want to apply this to multiple annotations, in which case calling update every time is not ideal, and a single update call is better.

Hi Ryan, I’m looking for this same hideAnnotation functionality in iOS, and cannot find it. Can you please point me in the right direction? My goal is to hide one or many annotations, and enable un-hiding them as well.

  • Brad