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

Showing search results as the user scrolls through pages

More
IP: 204.138.115.201 6 years 11 months ago - 6 years 11 months ago #14578 by sswathi
Is there any direct method for showing highlighted search text as you scroll through the document? I am able to display search results in 1 page using PDFFindStart() and PDFFind(), but if I scroll down, the search results are NOT highlighted in the next page (see image attached -- "text" is highlighted in first page but not second one). I would like to load search results as the user scrolls to the next pages.

Would this only be possible to highlight search results through entire document? I saw this article , but I dont want to search entire document programatically and manually highlight them myself... I just want to extend existing feature to other pages.

MAIN WANT: highlight search results in full document (not just that page)
Last edit: 6 years 11 months ago by sswathi.
More
IP: 109.118.48.134 6 years 11 months ago #14588 by nermeen
You can achieve this behavior by keeping track of the search status(if it's active or not) and the word to search, then in PDFViewAct.OnPDFPageChanged add something like:
Code:
public void OnPDFPageChanged(int pageno) { ... if(m_controller.getFindQuery() != null) { m_view.PDFFindStart(m_controller.getFindQuery(), false, false); m_view.PDFFind(1); } }
More
IP: 99.250.33.153 6 years 10 months ago #14654 by sswathi
Thank you. However, that leads to every first search item being blue/highlighted in every page. Would I need to modify VFinder.find_draw in order to preserve selected search item in a specific page as blue, while showing other matches even in other pages as gray?
More
IP: 212.97.62.176 6 years 10 months ago #14657 by nermeen
Yes, this is the default behavior, to change it you need to keep track of this specific page and modify
Code:
VFinder.find_draw
accordingly.
Time to create page: 0.475 seconds
Powered by Kunena Forum