Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

How to add thumbnails 9 years 5 months ago #7959

  • asliyanage
  • asliyanage's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 100
  • Thank you received: 0
1)I need to know how to add the thumbnails.I know below is the thumbnail tag which to add xml file.Can you tell me how to get the reference to this tag from java code and set the thumbnail from given path in sdcard?


<com.radaee.util.PDFThumbView
android:id="@+id/thumbs"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_above="@+id/bar_find"
android:layout_alignParentBottom="true" />

2)can't we use the pdf file to get the thumbnail view?

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

How to add thumbnails 9 years 5 months ago #7960

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
in PDFReaderAct.onCreate(), there are codes:
m_layout = (RelativeLayout)LayoutInflater.from(this).inflate(R.layout.reader, null);
m_reader = (PDFReader)m_layout.findViewById(R.id.view);
m_thumb = (PDFThumbView)m_layout.findViewById(R.id.thumbs);
codes above, shows how to get thumb view object from layout.

when open a PDF file, invoke:
m_thumb.thumbOpen(m_reader.PDFGetDoc(), this);

and close PDF file, shall:
m_thumb.thumbClose();

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

How to add thumbnails 9 years 5 months ago #7962

  • asliyanage
  • asliyanage's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 100
  • Thank you received: 0
I have viewpager with several fragments.I need to show thumbnails.But i am opening the pdf file in the fragment.So i am unable to get all thumbnails.It just so me the relevant page fragment.I need to see all thumnails?

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

How to add thumbnails 9 years 5 months ago #7963

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
do u mean that show many Documents in 1 thumb view?
there are 2 ways:
1. derive a Document class, which manged many Documents like 1 Document object.
2. Merge all Documens in 1 PDF file.

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

  • Page:
  • 1
Powered by Kunena Forum