How to set hilight for matched words from search - RadaeePDF.com - Results from #12
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF

TOPIC: How to set hilight for matched words from search

How to set hilight for matched words from search 5 years 7 months ago #5136

  • Sanguanchai
  • Sanguanchai's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
I use the following codes and tried to change layout mode from 0 - 6 in the file "Global.java" (method "default_config"). The result will be correct only for layout mode = 2 (Curl effect). But other layout modes still incorrect. Do you think this is bug for other layout modes?

I also found that if layout mode is 2 (Curl effect) but device is in landscape mode, hi-light for even page (page#2, page#4, etc) will incorrect but hi-light for odd page (page#1, page#3, etc) will incorrect. Do you think this is bug?

Layout | Page that hi-light matched word
0 | 30
1 | 29
2 | 31 (Correct)
3 | 3
4 | 3
5 | 30
6 | 3

private void InitView()
{
// m_doc.SetCache( Global.tmp_path + "/temp.dat" );//set temporary cache for editing.
m_reader.PDFOpen(m_doc, false, this);
//m_reader.PDFGotoPage(10);
m_thumb.thumbOpen(m_reader.PDFGetDoc(), this);
setContentView(m_layout);
btn_ink.setEnabled(m_reader.PDFCanSave());
btn_rect.setEnabled(m_reader.PDFCanSave());
btn_oval.setEnabled(m_reader.PDFCanSave());
btn_note.setEnabled(m_reader.PDFCanSave());
btn_save.setEnabled(m_reader.PDFCanSave());
btn_line.setEnabled(m_reader.PDFCanSave());

m_reader.PDFGotoPage(30);
m_thumb.thumbGotoPage(30);
new Handler().postDelayed(new Runnable() {
public void run() {
txt_find.setText("the");
onFindNext();
}
}, 10);
}
Last edit: by kadrimanaj.
The topic has been locked.

How to set hilight for matched words from search 5 years 7 months ago #5146

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 870
  • Karma: 23
  • Thank you received: 71
It's not a bug, it's just each view handles the search and highlight differently based on the view calculations.. (if you test with the default search in demo project it's working)..

You need to handle the search highlight differently based on the view, check how each view is working and implement your needs accordingly
The topic has been locked.

How to set hilight for matched words from search 5 years 7 months ago #5160

  • Sanguanchai
  • Sanguanchai's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
I need to use layout = 6 (show 2 pages in landscape). Could you please provide code to correct this? Do I need to modify code in the "com.radaee.pdfex_view.jar" to support this?

I notice that if layout = 2 (Curl effect), I cannot zoom-in, zoom-out. I am not sure this is the bug or not. Could you please confirm how do we implement to support zoom-in, zoom-out by using layout = 2 (Curl effect)?
The topic has been locked.

How to set hilight for matched words from search 5 years 7 months ago #5162

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 870
  • Karma: 23
  • Thank you received: 71
for layout = 6 .. may be we need to check it

For layout = 2 .. it does not support zoom (not a bug) .. if you want to support zoom feature for curl you need to implement it yourself
The topic has been locked.
Powered by Kunena Forum