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

Centering pages after seacrh

More
9 years 8 months ago #10965 by Davide
Replied by Davide on topic Centering pages after seacrh
Hi,
for the two pages mode, you also have to override the vCenterPage method of PDFLayoutDual, something like that :
Code:
@Override public void vCenterPage( int pageno ) { if( m_pages == null || m_doc == null || m_w <= 0 || m_h <= 0 ) return; int ccur = 0; while( ccur < m_cells.length ) { PDFCell cell = m_cells[ccur]; if( pageno == cell.page_left || pageno == cell.page_right ) { int left = m_cells[ccur].left; int w = m_cells[ccur].right - left; int x = left + (w - m_w)/2; int oldx = m_scroller.getCurrX(); int oldy = m_scroller.getCurrY(); m_scroller.startScroll(oldx, oldy, x - oldx, 0); break; } ccur++; } }
More
9 years 8 months ago #10966 by half65
Replied by half65 on topic Centering pages after seacrh
Thank you, it works
Time to create page: 0.343 seconds
Powered by Kunena Forum