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

Enabling listener for Edit box Annotation

More
9 years 7 months ago #10933 by sbettal
Hi,

I want to enable drag-n-drop functionality, as well as to editable functionality on editbox annotation. But i am unable to get event when user clicks on edit text. Always getting onPDFSingleTaped. Please suggest me how to i acheive this functionality. And i want to increase the edit box height dynamically when text is wrapped into edit box.
More
9 years 7 months ago #10936 by nermeen
Dear sbettal,

For the drag/drop functionality, it's already implemented in the demo project .. please check PDFLayoutView.onTouchAnnot (needs a professional or premium license).

For the listener to editbox annotation, it's implemented in the demo project in PDFLayoutView.onSingleTapConfirmed that calls PDFLayoutView.onEditAnnot (premium license).

To increase the editbox height, you can add a listener to check the entered text length and adapte the editbox accordingly, using Annotation.SetRect.

But as a warning it will not be optimal (performance wise)..as a modification on the annotation level, requires a re-render. (so try to do the re-render once after the user has finished entering the text)
More
9 years 7 months ago #10937 by sbettal
I used above methods, but my problem is when user single taps on editbox annotation, it will open editable view with keyboard every time. So when do drag and drop functionality will work on editbox annoataion? since here condition check made as m_annot.GetEditType() >0 so that it will always made edit box as editable. So my questions is to when to enable drag-n-drop functionality on editbox.
More
9 years 7 months ago #10938 by nermeen
For editable annotations, the drag & drop will not work immediately as the edit behavior takes the priority..the demo project has the scope to show you how to implement some of the functionality ..so not all the features are fully implemented.

As a suggestion, you need to separate the events, may be a single tab to edit and a long tab to activate drag & drop.
More
9 years 7 months ago #10939 by sbettal
I implemented editable functionality on long tab. But getting false results. Its misplacing the edit box on page. Is there any other solution for this.
More
9 years 7 months ago #10940 by sbettal
I have enabled drag-n-drop functionality for long tap. When i debug the code, every time event.getActionMasked() is returns 1 ie MotionEvent ACTION_UP. For this switch case break is not defined so its continuing execution to MotionEvent.CANCEL also. In this case, m_annot_rect0 is getting null. so editbox is still on the place. So please suggest me proper solution to enable it.
Time to create page: 0.430 seconds
Powered by Kunena Forum