Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

Is it possible to move SDK viewer from an activity to a fragment? 3 years 8 months ago #15181

  • esaw
  • esaw's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 0
Hi!
Is it possible to move SDK viewer from an activity to a fragment? If so, do you have any examples?
Thanks!

Please Log in or Create an account to join the conversation.

Is it possible to move SDK viewer from an activity to a fragment? 3 years 8 months ago #15182

  • luca.f
  • luca.f's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 93
  • Thank you received: 10
The reader is just an Android View (PDFLayoutView or PDFGLLayoutView).
You can include the view to the fragment (programmatically or by xml definition, it can be its root view if you want to), and implement ILayoutView.PDFLayoutListener to handle the callbacks and create a PDFViewController to manage the reader actions (check OpenTask in PDFGLViewAct or PDFViewAct).
More or less everything that's done in the activity can be moved to your fragment.
Do not forget to handle the onDestroy action to release SDK resources

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum