- Posts: 2
- Thank you received: 0
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
10 years 6 months ago #9272
by tobgen
Page is not centered after orientation change was created 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.
Anyone have any idea how to solve it issue?
I an mot using PDFLayoutView, just RelativeLayout for PDFReader instance.
10 years 6 months ago - 10 years 6 months ago #9273
by Davide
Replied by Davide on topic Page is not centered after orientation change
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
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.
10 years 6 months ago #9276
by Davide
Replied by Davide on topic Page is not centered after orientation change
Hi,
to center the page I suggest you to look at:
For more info check this:
www.radaeepdf.com/documentation/javadocs...tml#vCenterPage(int)
to center the page I suggest you to look at:
Code:
vCenterPage(int) ;
10 years 6 months ago #9284
by tobgen
Replied by tobgen on topic Page is not centered after orientation change
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.
Thanks in advance for any idea to solve this mystery.
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