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

How to add thumbnails

More
IP: 192.168.0.71 11 years 9 months ago #7959 by asliyanage
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?
More
IP: 192.168.0.71 11 years 9 months ago #7960 by radaee
Replied by radaee on topic How to add thumbnails
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();
More
IP: 192.168.0.71 11 years 9 months ago #7962 by asliyanage
Replied by asliyanage on topic How to add thumbnails
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?
More
IP: 192.168.0.71 11 years 9 months ago #7963 by radaee
Replied by radaee on topic How to add thumbnails
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.
Time to create page: 0.396 seconds
Powered by Kunena Forum