Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Android development and PDF

Page is not centered after orientation change

More
10 years 6 months ago #9272 by tobgen
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.
More
10 years 6 months ago - 10 years 6 months ago #9273 by Davide
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
Last edit: 10 years 6 months ago by Davide.
More
10 years 6 months ago #9276 by Davide
Hi,
to center the page I suggest you to look at:
Code:
vCenterPage(int) ;
For more info check this: www.radaeepdf.com/documentation/javadocs...tml#vCenterPage(int)
More
10 years 6 months ago #9284 by tobgen
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.
Code:
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.
Time to create page: 0.510 seconds
Powered by Kunena Forum