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

TOPIC:

Page is not centered after orientation change 8 years 8 months ago #9272

  • tobgen
  • tobgen's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 0
For several days I am struggling with the problem that a page of pdf document is not centered after device orientation change. Moreover, after several rotations of device I'm on a different page than I was at the beginning.
Anyone have any idea how to solve it issue?
I an mot using PDFLayoutView, just RelativeLayout for PDFReader instance.
Attachments:

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

Page is not centered after orientation change 8 years 8 months ago #9273

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
can you please give us more info about that..
Can you please send use some important lines of code or an AndroidStudio demo project?
If you don't want to make it public you can open a ticket here: www.radaeepdf.com/support/tickets?view=ticket&layout=open

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

Last edit: by Davide.

Page is not centered after orientation change 8 years 8 months ago #9276

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
to center the page I suggest you to look at:
vCenterPage(int) ;
For more info check this: www.radaeepdf.com/documentation/javadocs...tml#vCenterPage(int)

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

Page is not centered after orientation change 8 years 8 months ago #9284

  • tobgen
  • tobgen's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 0
Thank you for yours answers but i don't want to change all my class because of that issue (unless it turns out necessary). My initiation of PDFReader is shown below. I don't manage device rotation in any way (in this activity). I tried to use overrided method onConfigurationChanged(), but with no result.
private void postInit() {
		gestureDetector = new GestureDetector(this, new DoubleTapListener(this));

		ViewGroup container = (ViewGroup) findViewById(R.id.pdf_container);
		m_vPDF = new PDFReader(this, null);

		m_vPDF.PDFOpen(m_doc, false, this);
		m_vPDF.setGestureDetector(gestureDetector);
		container.removeAllViews();
		container.addView(m_vPDF);
	}

Thanks in advance for any idea to solve this mystery.

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

  • Page:
  • 1
Powered by Kunena Forum