If you want to enable the text selection on LongPress event, you can Modify
onLongPress in
PDFLayoutView as follows:
public void onLongPress(MotionEvent e) {
if(m_status == STA_NONE && e.getActionMasked() == MotionEvent.ACTION_DOWN) {
PDFSetSelect();
onTouchSelect(e);
}
}
The selected text can be retrieved from the listener
public void OnPDFSelectEnd(String text), found in
PDFViewAct.
Then you can pass this text to your method that manages the dictionary, or
developer.android.com/reference/android/...ts/TextToSpeech.html to play it as audio.