work with thumbnails - RadaeePDF.com - Results from #6
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF

TOPIC: work with thumbnails

work with thumbnails 2 weeks 3 days ago #14692

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 896
  • Karma: 23
  • Thank you received: 78
Dear User,

We cannot reproduce this flicker behavior.

But the rendering is done in PDFViewThumb.vDraw
The following user(s) said Thank You: ShadMaxim

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

work with thumbnails 2 weeks 3 days ago #14696

  • ShadMaxim
  • ShadMaxim's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
Thanks for the answer, checked on other devices, everything is fine there

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

work with thumbnails 2 weeks 3 days ago #14697

  • ShadMaxim
  • ShadMaxim's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
There was another problem when loading a document with an odd number of pages (in thumbnail mode), the latter is partially displayed (visible in the picture), but you cannot view it, you cannot lift it up. The bottom row of pages can be viewed when the row is completely filled (2 of 2, 3 of 3), but if not (1 of 2, 2 of 3), the row cannot be lifted. Please tell me where to look for the problem.

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

work with thumbnails 2 weeks 3 days ago #14698

  • ShadMaxim
  • ShadMaxim's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
Attachments:

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

Last edit: by ShadMaxim.

work with thumbnails 2 weeks 2 days ago #14703

  • ShadMaxim
  • ShadMaxim's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
Found a solution to this problem: PDFViewThumb.vLayout () in the appropriate location for the Grid mode, added a condition:
if (cnt%columns != 0){
top += m_pages[0].GetHeight() + m_page_gap;
}
m_doch = top;
This condition is triggered when the bottom row of thumbnails is not full.

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

work with thumbnails 2 weeks 2 days ago #14704

  • ShadMaxim
  • ShadMaxim's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
I decided to slightly supplement the answer: if the incomplete series consists of thumbnails of different heights, then we are looking for the largest of them and add this height to the top:

int remainder = cnt % columns;
if (remainder != 0 && columns<cnt) {
int maxHeight = m_pages[cnt - remainder - 1].GetHeight();
for (int y = cnt - remainder; y < cnt; y++) {
if (m_pages[y].GetHeight() > maxHeight) {
maxHeight = m_pages[y].GetHeight();
}
}
top += maxHeight + m_page_gap;
}
m_doch = top;

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

Last edit: by ShadMaxim.
Powered by Kunena Forum