Page is not centered after orientation change - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: Page is not centered after orientation change

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

  • tobgen
  • tobgen's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • 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 3 years 5 months ago #9273

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 18
  • 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 3 years 5 months ago #9276

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 18
  • 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 3 years 4 months ago #9284

  • tobgen
  • tobgen's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • 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